Skip to content

Implemented fixes in 2:4 sparsity tutorial #2616

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

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

lvoursl
Copy link
Contributor

@lvoursl lvoursl commented Oct 23, 2023

Description

I was running this tutorial on 2:4 sparsity and found a few issues that I'm fixing in this PR. More concrete:

  1. Block with the model definition wasn't rendered on the website since there was some stop symbol in source markdown.
  2. One variable wasn't defined in the code and one comma was missed in another place -- so some code wasn't working.
  3. Model didn't converge to the same level of performance after pruning (gap was substantial in F1 metric). The problem seems to be related to the learning rate schedule in HuggingFace Transformers: during fine-tuning of pruned model learning rate went to 0 super quickly and the model params were not updating at all. To fix it I simply set LR schedule to constant, so we have consistent results in that case.

cc: @jcaip

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 23, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2616

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b804be4 with merge base b51f2b8 (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link
Contributor

@jcaip jcaip left a comment

Choose a reason for hiding this comment

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

lgtm, thank you for the changes!

@jcaip jcaip merged commit 8b1ed83 into pytorch:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants