Skip to content

Fix static_llama to read some previously hardcoded options from ModelArgs #8846

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 1 commit into from
Mar 3, 2025

Conversation

sxu
Copy link
Contributor

@sxu sxu commented Feb 28, 2025

Differential Revision: D70414663

@sxu sxu requested a review from cccclai as a code owner February 28, 2025 21:35
Copy link

pytorch-bot bot commented Feb 28, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8846

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

✅ No Failures

As of commit 53f000f with merge base 781b082 (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 Feb 28, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70414663

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70414663

@@ -37,7 +37,7 @@ def __init__(self, config: ModelArgs, output_new_cache_only=False):
super().__init__()
self.dim = config.dim
self.n_heads = config.n_heads
self.head_dim = config.dim // config.n_heads
self.head_dim = config.head_dim
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I miss something, isn't head_dim the same as dim / n_heads?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not necessarily, it can be anything, it's internal to the attention, the wo layer make sure the output of the attention has size dim.

@facebook-github-bot facebook-github-bot merged commit 542480c into pytorch:main Mar 3, 2025
51 of 52 checks passed
@navsud navsud mentioned this pull request Mar 4, 2025
navsud pushed a commit to navsud/executorch that referenced this pull request Mar 4, 2025
Summary: After pytorch#8846, the models exported correctly, but failed to run on-device with segmentation error. This diff fixes that error.

Reviewed By: sxu, billmguo

Differential Revision: D70538475
navsud pushed a commit to navsud/executorch that referenced this pull request Mar 4, 2025
Summary: After pytorch#8846, the models exported correctly, but failed to run on-device with segmentation error. This diff fixes that error.

Reviewed By: sxu, billmguo

Differential Revision: D70538475
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. fb-exported topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants