-
Notifications
You must be signed in to change notification settings - Fork 608
Set member variable to Attention module #6376
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
Set member variable to Attention module #6376
Conversation
chunit-quic
commented
Oct 21, 2024
- Set and use self.n_heads from args.heads
- Use self.dim from args.dim
- Set and use self.n_heads from args.heads - Use self.dim from args.dim
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6376
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 3e99253 with merge base ad0e5e8 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
Looks good to me. I'll trigger more test just in case.
self.wk = nn.Linear(args.dim, self.n_kv_heads * self.head_dim, bias=False) | ||
self.wv = nn.Linear(args.dim, self.n_kv_heads * self.head_dim, bias=False) | ||
self.wo = nn.Linear(args.n_heads * self.head_dim, args.dim, bias=False) | ||
# self.dim = 4096, self.n_heads = 32, self.head_dim = 4096 / 32 = 125 |
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.
let's remove this comment since it is not true anymore. Different models have different configs for these values.
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.
let me remove in the follow up diff
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |