Skip to content

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

Merged
facebook-github-bot merged 1 commit into
pytorch:mainfrom
sxu:export-D70414663
Mar 3, 2025
Merged

Fix static_llama to read some previously hardcoded options from ModelArgs#8846
facebook-github-bot merged 1 commit into
pytorch:mainfrom
sxu:export-D70414663

Conversation

@sxu

@sxusxu commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Differential Revision: D70414663

@sxu
sxu requested a review from cccclai as a code ownerFebruary 28, 2025 21:35
@pytorch-bot

pytorch-botBot commented Feb 28, 2025

Copy link
Copy Markdown

🔗 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-botfacebook-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
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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:mainMar 3, 2025
@navsudnavsud mentioned this pull request Mar 4, 2025
navsud added 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 added 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.fb-exportedtopic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sxu@facebook-github-bot@cccclai@navsud