-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
all-linear + classification models have double-wrapped linear layers #1485
Comments
Thanks a lot Nicholas. Adding more context from our internal discussion: With the given
This is already undesired and we should not allow this. To fix this, we can:
In addition, I think it's dubious to have a Ping @younesbelkada @pacman100 |
Resolves huggingface#1485, but note that some additional solutions are mentioned in thet issue. This checks that when unloading a PEFT model, if the ModulesToSaveWrapper contains a tuner module, it is correctly unloaded. The unloaded model should not have PEFT layers at the end.
Resolves #1485, but note that some additional solutions are mentioned in thet issue. This checks that when unloading a PEFT model, if the ModulesToSaveWrapper contains a tuner module, it is correctly unloaded. The unloaded model should not have PEFT layers at the end.
Resolves huggingface#1485, but note that some additional solutions are mentioned in thet issue. This checks that when unloading a PEFT model, if the ModulesToSaveWrapper contains a tuner module, it is correctly unloaded. The unloaded model should not have PEFT layers at the end.
System Info
all
Who can help?
No response
Information
Tasks
examples
folderReproduction
merged
will still have lora layers in the classifier because it gets double-wrapped due to"all-linear"
Expected behavior
Merged shouldn't have lora layers still in the classifier because calling
merged.save_pretrained
will result in uninitialized weights upon loading againThe text was updated successfully, but these errors were encountered: