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

Add Prodigy Plus Schedule Free optimizer #614

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

saunderez
Copy link

@saunderez saunderez commented Dec 25, 2024


For more details, open the Copilot Workspace session.

…mizerParamsWindow.py`

* Add `split_groups` parameter with title, tooltip, and type.
* Adjust formatting for `cautious` parameter to align with new `split_groups` parameter.
…ate_optimizer` function in `modules/util/create.py`.

* **Remove `decouple` parameter:**
  - Remove `decouple` parameter from the `create_optimizer` function for different optimizer configurations.

* **Add `prodigy_steps` parameter:**
  - Add `prodigy_steps` parameter to the `create_optimizer` function for `PRODIGY_PLUS_SCHEDULE_FREE` optimizer configuration.
@@ -154,6 +159,11 @@ def create_dynamic_ui(

# Extract the keys for the selected optimizer
for index, key in enumerate(OPTIMIZER_DEFAULT_PARAMETERS[selected_optimizer].keys()):
if selected_optimizer == Optimizer.PRODIGY_PLUS_SCHEDULE_FREE and key not in [
Copy link
Owner

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

Copy link
Owner

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

@Koratahiu
Copy link

OneTrainer\modules\trainer\GenericTrainer.py", line 539, in __apply_fused_back_pass
for param_group in self.model.optimizer.param_groups:
AttributeError: 'NoneType' object has no attribute 'param_groups'

pretty broken

  This commit adds a variant of the Prodigy Optimizer
  created by LoganBooker
  https://github.com/LoganBooker/prodigy-plus-schedule-free/tree/main

  It is both learning rate free and schedule free.
  It also contains experiemntal optimization techniques
  as well as general memory usage and performance ,
  improvmentsc

  Use with constant scheduler

  Based on code from:
  https://github.com/facebookresearch/schedule_free
  https://github.com/konstmish/prodigy

  Incorporates improvements from these pull requests (credit to https://github.com/dxqbYD and https://github.com/sangoi-exe):
  konstmish/prodigy#23
  konstmish/prodigy#22
  konstmish/prodigy#20

  Supports fused backwards pass.
  Experimental featuures.
  ADOPT https://arxiv.org/abs/2411.02853
  Cautious https://arxiv.org/pdf/2411.16085
  MuonPP https://github.com/KellerJordan/Muon/blob/master/muon.py
  StableAdamW https://optimi.benjaminwarner.dev/optimizers/stableadamw/

  Probably some other stuff I forgot. For full details
@saunderez saunderez force-pushed the add-prodigy-plus-schedule-free branch from 2e934c9 to 878c9c2 Compare December 30, 2024 18:07
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

Successfully merging this pull request may close these issues.

3 participants