-
Notifications
You must be signed in to change notification settings - Fork 499
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
Implement activation offloading and opt_in_bwd in knowledge_distillation recipes #2088
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Anurav Modak <[email protected]>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/2088
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @felipemello1 , As part of this implementation i have made changes only in knowledge_distillation_single_device.py for activation offloading. And enabled testing parameter in |
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.
This looks great, thanks for doing this!! As part of testing can you output memory usage between activation offloading enabled and disabled as part of the way to confirm that this is doing what we expect it to?
Signed-off-by: Anurav Modak <[email protected]>
Hi @joecummings , Added an import for wandb. Conditional Logging: Profiling and Memory: Let me know if it works! |
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.
Hi @AnuravModak thanks for the PR! A couple suggestions:
- Regarding @joecummings's previous suggestion to add WandB logs, you should just be able to add WandB as a metric logger from the command line. So you will not need to make any changes to the code to do this. Once you have the results you can paste them in the PR summary. You can see e.g. the test plan in DoRA fixes #2139 for an example of this.
- I think some extra files under
.idea
directory snuck in, can you remove them? - Why are the activation offloading changes in
knowledge_distillation_single_device
(specifically L461-L475) commented out?
Towards #1959 .
So this is the first PR for implementing the changes in
KD recipes:
https://github.com/pytorch/torchtune/blob/main/recipes/knowledge_distillation_single_device.py
https://github.com/pytorch/torchtune/blob/main/recipes/knowledge_distillation_distributed.py