-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[LoRA] improve LoRA fusion tests #11274
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
base: main
Are you sure you want to change the base?
Conversation
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. |
I ran those 4 tests locally on a 4090 and they all passed. Same with the CPU. How did you run the tests? My first instinct would be that it's a precision problem. Assuming the issue is that some tensors are not |
@BenjaminBossan could you share your Also, feel free to review the rest of PR for the changes in |
I'll take a look. |
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.
The PR generally LGTM. I have one comment, but it's probably an edge case.
Regarding the failing tests, I don't see why they would start failing now (the ones that were already there), since the changes shouldn't really affect them. Are you sure they pass without the changes, all else being equal? As mentioned, I think tweaking the tolerances might be a solution (albeit not a nice one).
@BenjaminBossan I should have been clear. The first two tests fail without the PR changes (the latter two being added in this PR). |
I see. Did you check by how much the values differ? |
@BenjaminBossan I decided to just relax the tolerance for GPU. I requested for a clarification here: #11274 (comment) |
Makes sense.
I already replied 🤔 |
Co-authored-by: BenjaminBossan <[email protected]>
Co-authored-by: BenjaminBossan <[email protected]>
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.
Overall LGTM, thanks. I made one small suggestion for a possible edge case, up to you if you want to fix it.
Co-authored-by: Benjamin Bossan <[email protected]>
@DN6 could you give the changes under |
What does this PR do?
This PR improves our LoRA fusion tests by:
pipe.num_fused_loras
argument.num_fused_loras
withinlora_base.py
.test_lora_scale_kwargs_match_fusion
that checks LoRA + scale outputs match with LoRA fusion with the same scale.@BenjaminBossan if I could pick your brain, the following tests are failing on a GPU but passing on a CPU:
Would you have any pointers? I have tested this with both
peft
main and latest.