Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter count on GPT-2 medium #172

Open
Heimine opened this issue Apr 25, 2024 · 1 comment
Open

Parameter count on GPT-2 medium #172

Heimine opened this issue Apr 25, 2024 · 1 comment

Comments

@Heimine
Copy link

Heimine commented Apr 25, 2024

According to the paper, the lora parameter count for GPT-2 medium is 0.35M, but since the hidden dimension is 1024, and the model have 24 layers, with a rank=4, the correct parameter count should be 1024 * 2[for B,A] * 4[for rank=4] * 2[for Q,V] * 24[num. of layers] = 393216 = 0.39M.

I also checked the code for the above calculation.

Do I miss something here?

Thank you very much!

@HaiminZhang
Copy link

I think your counting is correct. Have you figured it out how 0.35M is counted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants