-
Notifications
You must be signed in to change notification settings - Fork 712
Qualcomm AI Engine Direct - Fixed the order of the transforms for llama #5221
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
Qualcomm AI Engine Direct - Fixed the order of the transforms for llama #5221
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5221
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit dfd80b0 with merge base 657789e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @cccclai, |
|
I have a small request. I would like to add a document that explains how to export llama with Qualcomm AI Engine Direct, including steps like downloading spin quant and setting num_sharding. However, I’m not sure where the best place to save this file would be. Could you please advise? |
999a992 to
0e23b45
Compare
| if self._generate_full_logits: | ||
| return torch.cat(result_logits, dim=1) | ||
| else: | ||
| return torch.stack(result_logits, dim=1) |
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.
hmm what's the difference between these?
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.
Because the shape of the function output should be (batch, seq, vocab_size).
If _generate_full_logits, the shape of each result logit in result_logits are (batch, seq, vocab_size)
We could just use cat by dim=1.
If not _generate_full_logits, the shape of each result logit in result_logits are (batch, vocab_size).
We will need use stack to get one more dimension (batch, seq, vocab_size)
cccclai
left a comment
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
|
CI needs to be fixed. |
807d763 to
dfd80b0
Compare
|
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
We need to apply r1 r2 before converting linear to conv.