-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bug in get_peft_model_state_dict
when using vblora
#2302
Comments
Hey, thanks for reporting :) I think the issue is caused by supplying a surprisingly filtered parameter dictionary due to the way VBLoRA manages the vector bank internally. Your code is the following: params_dict = OrderedDict((name, param.detach()) for name, param in model.named_parameters() if
"default" in name)
get_peft_model_state_dict(model, params_dict, "default") You are retrieving a subset of parameters ( So the fix on your side would be to supply the params_dict = OrderedDict((name, param.detach())
for name, param in model.named_parameters(remove_duplicate=False) if "default" in name) I can see, though, that this is a bit error prone, especially because |
Nice find, yes indeed I think it would be okay to make that change, nested VB-LoRA is probably not a realistic issue to be facing. Let's also ping the VB-LoRA author @leo-yangli (not "leo" as pinged above). |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. |
System Info
The issue occurs when the following line is executed:
state_dict
does not contain a key named"base_model.vblora_vector_bank.default"
.I’m not sure if this is due to how I am calling or configuring the function.
Who can help?
@leo
Information
Tasks
examples
folderReproduction
https://colab.research.google.com/drive/1e6ysneOZflu_TB5Pgj5zLTWyXbZW1Ezy#scrollTo=Da58JezBno0V
Expected behavior
Remove this bug.
The text was updated successfully, but these errors were encountered: