-
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
Documentation & error checking for AdaLoRA timing #2341
Merged
githubnemo
merged 12 commits into
huggingface:main
from
githubnemo:improve-adalora-docs
Jan 24, 2025
Merged
Documentation & error checking for AdaLoRA timing #2341
githubnemo
merged 12 commits into
huggingface:main
from
githubnemo:improve-adalora-docs
Jan 24, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The documentation about how the AdaLoRA works was a bit unclear. Especially that `tfinal` is not a point in time but a duration. It was also possible to build schedules that never budget and therefore lead to an exception because the code does not expect this case (which is OK). We prevent such a scenario now by treating this configuration as invalid. (Issue huggingface#2337)
We also check for `total_step` != None since this is also a guaranteed error in the code.
Also added `total_step` argument so that the optimizer will not break.
BenjaminBossan
approved these changes
Jan 24, 2025
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 for this improvement to AdaLoRA argument checking and much better docs. LGTM.
BenjaminBossan
added a commit
to BenjaminBossan/peft
that referenced
this pull request
Jan 27, 2025
PR huggingface#2341 added more rigorous checks for AdaLoRA and adjusted the tests to take that into account. However, one GPU test was missed. This test is now updated too, fixing the failing nightly CI (I ran it locally on GPU to verify). On top of that, I adjusted some numbers on the tests so that each AdaLoRA phase runs for 2 steps, leading to 6 steps total. This means that tests run a little bit longer but I think it's acceptable for better test coverage.
BenjaminBossan
added a commit
that referenced
this pull request
Jan 27, 2025
PR #2341 added more rigorous checks for AdaLoRA and adjusted the tests to take that into account. However, one GPU test was missed. This test is now updated too, fixing the failing nightly CI (I ran it locally on GPU to verify). On top of that, I adjusted some numbers on the tests so that each AdaLoRA phase runs for 2 steps, leading to 6 steps total. This means that tests run a little bit longer but I think it's acceptable for better test coverage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The documentation about how the AdaLoRA works was a bit unclear. Especially that
tfinal
is not a point in time but a duration.It was also possible to build schedules that never budget and therefore lead to an exception because the code does not expect this case (which is OK). We prevent such a scenario now by treating this configuration as invalid. (Issue #2337)
Additionally, it was possible to provide
total_step=None
(the default) which is certainly going to lead to errors. This is technically a breaking change but the same could be said for the new check of the timing values. They both lead to errors in the code.