Skip to content

Conversation

MikuAndRabbit
Copy link

Added code to the mark_only_lora_as_trainable method to set requires_grad to True for parameters with lora_ in the name.

This change was made for the following reason.

Sometimes requires_grad may be set to False for all parameters of the whole model before calling the mark_only_lora_as_trainable method, and if following the logic of the existing mark_only_lora_as_trainable method, the requires_grad of the parameter whose name contains lora_ is still set to False after calling, which I think has some conflict with the method name mark_only_lora_as_trainable.

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

Successfully merging this pull request may close these issues.

1 participant