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 RAdamScheduleFree optimizer #35313

Merged
merged 6 commits into from
Feb 12, 2025

Conversation

nhamanasu
Copy link
Contributor

@nhamanasu nhamanasu commented Dec 18, 2024

What does this PR do?

Integrates the new RAdamScheduleFree optimizer in meta's schedule_free.
This PR has greatly followed the previous PR to introduce schedule_free #30079

More details

  • Added support for using RAdamScheduleFree through Trainer API
  • Refined doc for trainer (clarified that we recommend to use constant LR scheduler with Schedule-Free family)
  • Added test case for RAdamScheduleFree in test_trainer.py & confirmed the test passes

Backgrounds

I recently made the RAdamScheduleFree optimizer, and it's been merged in schedule_free library since version 1.4.

RAdamScheduleFree eliminates:

  • Learning rate scheduler and terminal steps
  • Warmup steps

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@SunMarc @ydshieh @muellerzr

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution @nhamanasu ! Left a few comments

@nhamanasu
Copy link
Contributor Author

@SunMarc

Thank you for the valuable feedback!
I've reflected your suggestions. I'd be grateful if you could review the changes.

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for iterating !

@SunMarc SunMarc requested a review from ArthurZucker December 26, 2024 14:58
@rvt123
Copy link

rvt123 commented Jan 18, 2025

Hi guys, is anyone working on this?

@nhamanasu
Copy link
Contributor Author

I think I did everything I could do for merging this PR, and just waiting for the approval from @ArthurZucker (sorry for mentioning...)

@SunMarc
Copy link
Member

SunMarc commented Jan 20, 2025

Could you just fix the conflits ? I will merge this right after !

@ArthurZucker ArthurZucker merged commit 377d8e2 into huggingface:main Feb 12, 2025
21 of 23 checks passed
@ArthurZucker
Copy link
Collaborator

Thanks for the fix, merging as the failing test is unrelated!

zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Feb 12, 2025
* add RAdamScheduleFree optimizer

* revert schedulefree version to the minimum requirement

* refine is_schedulefree_available so that it can take min_version

* refine documents

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Feb 16, 2025
* add RAdamScheduleFree optimizer

* revert schedulefree version to the minimum requirement

* refine is_schedulefree_available so that it can take min_version

* refine documents

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
@nhamanasu
Copy link
Contributor Author

Sorry for the delayed follow-up, and thank you for taking care of the final fix to get this PR merged.
I really appreciate everyone’s help! 🎉

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.

4 participants