-
Notifications
You must be signed in to change notification settings - Fork 185
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 sensitivity analysis tool for layer-wise FIT and Hessian trace #592
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/592
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 88adf14 with merge base 0844de3 (): 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.
Thanks! In the future we should add a short README to explain how to use this script. We can do that in a separate PR
@@ -0,0 +1,105 @@ | |||
import torch |
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.
nit: can you use lowercase names for these 3 files?
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.
I have renamed them
@Hanxian97 @andrewor14 is this ready to be merged? |
Merging this. Thanks! |
Summary:
This is a sensitivity analysis tool to obtain the layer-wise average Hessian trace and FIT (Fisher Information Trace). (Hanxian's intern project milestone2)
Test Plan:
python scripts/FIT.py --checkpoint=MODEL_CHECKPOINT_PATH
python scripts/Hessian_vhp.py --checkpoint=MODEL_CHECKPOINT_PATH--layer_id=DESIRED_LAYER_TO_COMPUTE
python scripts/Hessian_grad.py --checkpoint=MODEL_CHECKPOINT_PATH --layer_id=DESIRED_LAYER_TO_COMPUTE