Repository navigation
[3/9] final_lr_ratio - #17
Merged
Merged
Conversation
This was referenced Jun 27, 2025
Merged
This was referenced Jun 27, 2025
Closed
garrett361
force-pushed
the
padding-free-squashing-2
branch
from
June 27, 2025 19:23
eb9e294 to
8a3148c
Compare
garrett361
force-pushed
the
padding-free-squashing-3
branch
from
June 27, 2025 19:23
d1a5006 to
e231062
Compare
garrett361
force-pushed
the
padding-free-squashing-2
branch
from
June 27, 2025 20:21
8a3148c to
3b77ec7
Compare
garrett361
force-pushed
the
padding-free-squashing-3
branch
from
June 27, 2025 20:21
e231062 to
a2546c2
Compare
garrett361
force-pushed
the
padding-free-squashing-2
branch
from
June 27, 2025 20:48
3b77ec7 to
01e3cfd
Compare
garrett361
force-pushed
the
padding-free-squashing-3
branch
from
June 27, 2025 20:48
a2546c2 to
bdc2c43
Compare
garrett361
force-pushed
the
padding-free-squashing-2
branch
from
June 27, 2025 20:54
01e3cfd to
da5dbb1
Compare
garrett361
force-pushed
the
padding-free-squashing-3
branch
3 times, most recently
from
June 27, 2025 21:19
0548cfd to
b6d7b83
Compare
Collaborator
|
seems like there is some rebasing trouble? |
fabianlim
changed the base branch from
padding-free-squashing-2
to
padding-free-squashing
June 28, 2025 00:26
fabianlim
reviewed
Jun 28, 2025
fabianlim
reviewed
Jun 28, 2025
fabianlim
reviewed
Jun 28, 2025
fabianlim
requested changes
Jun 28, 2025
fabianlim
left a comment
Collaborator
There was a problem hiding this comment.
final_lr_ratio should not be a required setting, if scheduler is not linear it should have have any effect
garrett361
force-pushed
the
padding-free-squashing-3
branch
from
June 28, 2025 01:39
b6d7b83 to
7a0671a
Compare
Owner
Author
|
@fabianlim agree with everything, updated |
fabianlim
reviewed
Jun 28, 2025
| num_warmup_steps = int(num_training_steps_for_scheduler * args.warmup_ratio) | ||
| if args.final_lr_ratio is not None and args.lr_scheduler_type == "linear": | ||
| # Correct num_training_steps_for_scheduler to respect final_lr_ratio for a linear scheduler | ||
| num_training_steps_for_scheduler = ( |
Collaborator
There was a problem hiding this comment.
num_training_steps_for_scheduler is not used anwhere else except get_scheduler right?
Owner
Author
There was a problem hiding this comment.
Correct, it's just defined here, and maybe updated if the user specifies final_lr_ratio and is using a linear scheduler.
Closed
This file contains hidden or 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
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.
Alters the SFT linear learning rate scheduler such that the final lr is configurable, rather than having it run down to zero. The final learning rate is
learning_rate * final_lr_ratioNOTE: this changes the default behavior
--final_lr_ratio 0.1, whereas previouslyfinetune.pyeffectively had--final_lr_ratio 0.0. The 0.1 default is inspired by Qwen.NOTE: only implemented for the
linearscheduler. This PR disables other scheduler options.