-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add Prodigy Plus Schedule Free optimizer #614
Open
saunderez
wants to merge
12
commits into
Nerogar:master
Choose a base branch
from
saunderez:add-prodigy-plus-schedule-free
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+100
−12
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
dfd0f67
Add Prodigy Plus Schedule Free optimizer
saunderez f58e835
Fixed parameter window hopefully
saunderez 170909e
Add UI components and logic for `PRODIGY_PLUS_SCHEDULE_FREE` in `Opti…
saunderez 8d3155a
Add a bunch of missing params to trainconfig.py
saunderez 1337f82
Found another missing param and another unwanted one.
saunderez 09f6d2b
Damn you decouple
saunderez 5c8affc
Remove `decouple` parameter and add `prodigy_steps` parameter to `cre…
saunderez a05aa2b
ad658e4
2e934c9
878c9c2
Fixed all remaining bugs and trained successfully
saunderez af67848
Merge branch 'add-prodigy-plus-schedule-free' of https://github.com/s…
saunderez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,14 @@ class TrainOptimizerConfig(BaseConfig): | |
adanorm: bool | ||
adam_debias: bool | ||
cautious: bool | ||
split_groups: bool | ||
split_groups_mean: bool | ||
factored: bool | ||
use_stableadamw: bool | ||
use_muon_pp: bool | ||
use_cautious: bool | ||
use_adopt: bool | ||
prodigy_steps: int | ||
|
||
def __init__(self, data: list[(str, Any, type, bool)]): | ||
super().__init__(data) | ||
|
@@ -158,6 +166,14 @@ def default_values(): | |
data.append(("adanorm", False, bool, False)) | ||
data.append(("adam_debias", False, bool, False)) | ||
data.append(("cautious", False, bool, False)) | ||
data.append(("split_groups", True, bool, False)) | ||
data.append(("split_groups_mean", True, bool, False)) | ||
data.append(("factored", True, bool, False)) | ||
data.append(("use_stableadamw", True, bool, False)) | ||
data.append(("use_muon_pp", False, bool, False)) | ||
data.append(("use_cautious", False, bool, False)) | ||
data.append(("use_adopt", False, bool, False)) | ||
data.append(("prodigy_steps", 0, int, False)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing weight_decay_by_lr |
||
|
||
return TrainOptimizerConfig(data) | ||
|
||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ lion-pytorch==0.2.2 # lion optimizer | |
prodigyopt==1.0 # prodigy optimizer | ||
schedulefree==1.3.0 # schedule-free optimizers | ||
pytorch_optimizer==3.3.0 # pytorch optimizers | ||
prodigy-plus-schedule-free==1.8.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.9.0 got released rather recently. Only interface change is an extra parameter, |
||
|
||
# Profiling | ||
scalene==1.5.45 | ||
|
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.
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.
Can you explain this change? I'm not quite sure if or why it's needed
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.
@saunderez Can you comment on this? I don't want to merge something if I don't understand why it's done
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.
I think this is a side effect of setting the lr to 1.0 in the OPTIMIZER_DEFAULT_PARAMETERS and not wanting to present it as configurable.
Is really what it's doing here.
given the other learning rate free optimizers don't do this it's probably better if
lr
is removed fromOptimizer.PRODIGY_PLUS_SCHEDULE_FREE
and then conditional isn't necessary.Out of scope for this change would be to fix this sharp edge for all the optimizers that expect a lr of 1.0