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

How to optimize B, which is the all zero matrix in the Lora method? #59

Open
Sauloo-huen opened this issue Apr 19, 2023 · 5 comments
Open

Comments

@Sauloo-huen
Copy link

No description provided.

@edwardjhu
Copy link
Collaborator

Thanks for the question! You can optimize B as usual, e.g., with Adam, since it will get a non-zero gradient in general.

@pkubik
Copy link

pkubik commented May 11, 2023

Isn't it the case that all rows of the B matrix are linearly dependent, making it effectively a rank 1 matrix. Could it be simply reduced to a product of two vectors?

Edit:
Nevermind. I went through the gradient update equations again and it seems like this should not happen as long as other weights of the network are initialized randomly.

@liuhui0401
Copy link

I have the same problem. When I perform gradient backpropagation, the weight of A can be updated, but the weight of B is always 0. Please tell me how should I solve this problem? Thank you!

@dreamerlin
Copy link

I have the same problem. When I perform gradient backpropagation, the weight of A can be updated, but the weight of B is always 0. Please tell me how should I solve this problem? Thank you!

I met the same problem, have u solved it?

@edwardjhu
Copy link
Collaborator

This shouldn't happen. Can you elaborate on your setup?

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

5 participants