-
Notifications
You must be signed in to change notification settings - Fork 536
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
Conversation
🔗 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 FailuresAs of commit 53f000f with merge base 781b082 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…Args Differential Revision: D70414663
This pull request was exported from Phabricator. Differential Revision: D70414663 |
This pull request was exported from Phabricator. Differential Revision: D70414663 |
c13bb41
to
53f000f
Compare
@@ -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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
.
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
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
Differential Revision: D70414663