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 WSD scheduler #30231

Merged
merged 5 commits into from
Apr 25, 2024
Merged

Add WSD scheduler #30231

merged 5 commits into from
Apr 25, 2024

Conversation

visheratin
Copy link
Contributor

What does this PR do?

This PR adds the Warmup-Stable-Decay learning rate scheduler. The scheduler and its benefits are described in detail in the MiniCPM blog post. In short, it allows continuous training and performs better than standard cosine scheduler.

Here is an example of learning rate dynamics with this schedule:
image

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?

@muellerzr, @pacman100

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Nice! Seems handy. Could you rebase from main and see if that fixes the failing tests?

@visheratin visheratin force-pushed the wsd-scheduler branch 2 times, most recently from b8e64ec to e8eadd2 Compare April 24, 2024 17:17
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@visheratin
Copy link
Contributor Author

Looks like it fixed some tests but not all.

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

LG2M, no idea why that pytorch test is failing 😕

cc @amyeroberts for final review (and ideas(?) was seeing that on another PR of mine iirc)

Copy link
Collaborator

@amyeroberts amyeroberts 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 adding this!

@muellerzr
Copy link
Contributor

@visheratin CI should be green on rebase, we found the issue :)

@visheratin
Copy link
Contributor Author

@muellerzr a couple of tests are still failing.

@amyeroberts
Copy link
Collaborator

@visheratin Looks like they were failing because of connection issues with the hub. I've re-run - which should hopefully resolve

@amyeroberts amyeroberts merged commit 7b1170b into huggingface:main Apr 25, 2024
20 checks passed
itazap pushed a commit that referenced this pull request May 14, 2024
* Added WSD scheduler.

* Added tests.

* Fixed errors.

* Fix formatting.

* CI fixes.
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