-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Initialization for LoRA weights A and B initialized #1728
Comments
You're right, the comment doesn't match the code. After a quick glance at the LoRA paper, I don't see an explicit mention of how LoRA should be initialized for embedding layers. When checking the reference implementation by Microsoft, they, do, however, use the same scheme as we do: Therefore, I think the code is correct. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
The comment and code are contradictory please anyone explain it to me.
Who can help?
@BenjaminBossan
Information
Tasks
examples
folderReproduction
nn.init.zeros_(self.lora_embedding_B[adapter_name])
nn.init.normal_(self.lora_embedding_A[adapter_name])
Expected behavior
nil.
The text was updated successfully, but these errors were encountered: