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 sensitivity analysis tool for layer-wise FIT and Hessian trace #592

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

Hanxian97
Copy link
Contributor

@Hanxian97 Hanxian97 commented Aug 2, 2024

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

Copy link

pytorch-bot bot commented Aug 2, 2024

🔗 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 Failures

As of commit 88adf14 with merge base 0844de3 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 2, 2024
Copy link
Contributor

@andrewor14 andrewor14 left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have renamed them

@msaroufim
Copy link
Member

@Hanxian97 @andrewor14 is this ready to be merged?

@andrewor14
Copy link
Contributor

Merging this. Thanks!

@andrewor14 andrewor14 merged commit 8eade54 into main Aug 6, 2024
13 checks passed
jainapurva pushed a commit that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants