-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support Rank Stabilized LoRA in the ModelConfig/LoraConfig #1877
Conversation
@JohnGiorgi do we need to pin peft to some version for this? |
yes i believe we will need to pin peft to that for this PR, also could you kindly also add a test? |
@kashif Okay I bumped the peft dependency to >=0.8.0. I also added a test for |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@JohnGiorgi i believe its failing for one of the older python with: AttributeError: 'str' object has no attribute 'removeprefix' |
Fixed! Let me know if anything else is blocking this |
"pytest", | ||
"pytest-xdist", | ||
"accelerate", |
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.
already in required
Merged, thank you @JohnGiorgi |
Thank you! |
Tiny PR to support Rank Stabilized LoRA. To do this we:
ModelConfig
. It is copied straight from https://huggingface.co/docs/peft/en/package_reference/lora#peft.LoraConfig.use_rsloraLoraConfig
inutils.py
Of course, a user could always do this outside TRL, but my motivation for enabling it this way was that I am working with a slightly modified version of the
sft.py
script, so it would be nice if I could enable Rank Stabilized LoRA with a single flag.