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

Fix conversion parity script by defaulting RMSNorm to 1e-6 #152

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Conversation

rohan-varma
Copy link
Member

@rohan-varma rohan-varma commented Jan 4, 2024

Changelog

Test plan

  • Run conversion script: python -m scripts.llama2_checkpoint.convert_llama2_to_native --checkpoint_path /home/rvarm1/local/dev/assets/llama2-7b/consolidated.00.pth --device cuda:1 &> out
  • pytest tests/torchtune/models/llama2/test_transformer_decoder.py -k test_rms_norm_propagation

@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 Jan 4, 2024
Copy link

netlify bot commented Jan 4, 2024

Deploy Preview for torchtune-preview ready!

Name Link
🔨 Latest commit 6debf84
🔍 Latest deploy log https://app.netlify.com/sites/torchtune-preview/deploys/6597373b7831a8000878dc48
😎 Deploy Preview https://deploy-preview-152--torchtune-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rohan-varma rohan-varma changed the title [Not for land] patch Fix conversion parity script by defaulting RMSNorm to 1e-6 Jan 4, 2024
Copy link
Contributor

@joecummings joecummings left a comment

Choose a reason for hiding this comment

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

Can you create a GI to add a test for script conversion?

@@ -23,7 +23,7 @@ class RMSNorm(nn.Module):
eps (float): small value to avoid division by zero. Default: 1e-5
Copy link
Contributor

Choose a reason for hiding this comment

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

Change default in description.

@rohan-varma
Copy link
Member Author

Can you create a GI to add a test for script conversion?

Yes, filed an issue: #153

Copy link
Contributor

@gokulavasan gokulavasan left a comment

Choose a reason for hiding this comment

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

Just a question about test, rest seem okay. I will let Joe stamp it

Copy link
Contributor

@joecummings joecummings left a comment

Choose a reason for hiding this comment

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

awesome - thanks for such a quick fix.

@rohan-varma
Copy link
Member Author

@pytorch-labs/team-torchtune-repo-owner

@rohan-varma rohan-varma merged commit 08844cb into main Jan 5, 2024
15 checks passed
@ebsmothers ebsmothers deleted the patch branch April 11, 2024 15:43
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.

None yet

4 participants