-
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
Enable PeftConfig & PeftModel to load from revision #433
Conversation
tests/test_config.py
Outdated
@@ -19,6 +19,9 @@ | |||
from peft import AdaptionPromptConfig, LoraConfig, PrefixTuningConfig, PromptEncoderConfig, PromptTuningConfig | |||
|
|||
|
|||
PEFT_MODELS_TO_TEST = [("lewtun/tiny-random-OPTForCausalLM-delta", "3cedab206cbe8e22fc764a96481e994e6868fe7c")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're happy with this approach, I'll move the model to hf-internal-testing
The documentation is not available anymore as the PR was closed or merged. |
@@ -19,6 +19,9 @@ | |||
from peft import AdaptionPromptConfig, LoraConfig, PrefixTuningConfig, PromptEncoderConfig, PromptTuningConfig | |||
|
|||
|
|||
PEFT_MODELS_TO_TEST = [("lewtun/tiny-random-OPTForCausalLM-delta", "v1")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this repo only has weights in the v1
branch to properly test the revision
arg works as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @lewtun for improving the load and save utils! 🤗
@pacman100 This causes a regression when |
This PR enables the
from_pretrained
ofPeftConfig
andPeftModel
to load configs/models with a specificrevision
arg. This is useful when storing many adapter weights as branches in a model repo.Sample usage