Skip to content
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

[Feature Request] Auto-detect LoRA dimensions and precision when merging #236

Open
TomLucidor opened this issue Dec 28, 2023 · 1 comment

Comments

@TomLucidor
Copy link

The SVD multi-LoRA merging procedure requires "New Rank" and "New Conv Rank", as well as "Merge Precision" and "Save Precision". Those can be automated through reading the metadata of the source LoRA.
Ideally, the ranks would use the maximum of the source LoRAs for maximum information preservation. There can be a secondary option for the median/mode of the source, assuming there are weird outliers.
As for the "Merge Precision" and "Save Precision" (for both regular Merge LoRA and SVD versions), maximizing the precision to be "float" and then collapsing back to the majority precision (most are either BF16 or FP16) would work.

Q1: is it true that sometimes people want to "fix" a bad 128-dimensional LoRA with this?
Q2: What are the benefits in changing "merge precision" to 16 bits when it reduces accuracy? (maybe lower computation cost?)

@rafstahelin
Copy link

I'd love a follow up on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants