-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Added additional parameters to mixing multiple LoRAs through SVD, added ability to mix LoRAs through concatenation #817
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
Added additional parameters to mixing multiple LoRAs through SVD, added ability to mix LoRAs through concatenation #817
Conversation
…ty to provide target rank with SVD, added concat as method for mixing LoRAs adapters
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
BenjaminBossan
left a comment
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.
Thanks a lot for the fixes and the new method, this looks pretty solid.
I'm not an expert on this topic (@pacman100 will know better), but the implementation looks quite good. However, I would like to see the unit tests extended to cover the new combination type.
pacman100
left a comment
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 so much @kovalexal for adding the concat method from our previous discussions and improving upon the svd method, you rock 🔥. LGTM! 🤗
BenjaminBossan
left a comment
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.
Looks good, thanks a lot for addressing my comments.
…ngface#817) Added a new feature to concatenate the LoRA weights as a mixing method. SVD now accepts more options, does not clamp by default anymore.
* Use uniform config * quick fix * refactor * update docs
Hi!
This PR introduces the following changes:
peft/src/peft/tuners/lora.py
Lines 659 to 661 in 412d7bc
torch.linalg.svdlikedriverto use during decomposition.You can see my previous results here #643.
webui output:

SVD decomposed mixture of 2 LoRAs, clamped:

SVD decomposed mixture of 2 LoRAs, unclamped:

@pacman100 your review is kindly appreciated.