-
Notifications
You must be signed in to change notification settings - Fork 678
Adds clip_grad_norm to all recipe config that supports it #2220
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
Adds clip_grad_norm to all recipe config that supports it #2220
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/2220
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c9b9c4e with merge base 5d1866f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Awesome! Thanks for doing this :)
Maybe I am missing something but I don't see gradient clipping support in DPO, PPO, or distributed KD recipes. Can we remove the |
@ebsmothers Thanks for catching this! There was a bug in my script for finding the recipes that support gradient clipping. I updated this PR to fix the issue. |
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.
Thanks @thomasjpfan this looks good! Once CI is green I'll merge it
Context
What is the purpose of this PR? Is it to
Fixes #1993
I ran the following script to find the recipes the support
clip_grad_norm
and update the yaml files.Changelog
What are the changes made in this PR?
clip_grad_norm
to all recipes that support it.Test plan
Please make sure to do each of the following if applicable to your PR. If you're unsure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.
pre-commit install
)pytest tests
pytest tests -m integration_test
UX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Here is a docstring example
and a tutorial example