Skip to content

Swap mha #6719

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 3 commits into from
Nov 11, 2024
Merged

Swap mha #6719

merged 3 commits into from
Nov 11, 2024

Conversation

jackzhxng
Copy link
Contributor

@jackzhxng jackzhxng commented Nov 7, 2024

Summary

Swap TorchTune's attention to an ET copy that enables swapping SDPA modules, such as the more performant custom SDPA modules here.

ET version of attention.py is up-to-date as of 73aa1267cd35c84c19bb2eb53c1c551a68d4fff0 (pytorch/torchtune#1763)

Test plan

Added unit tests for eager, export, and et:

python -m unittest extension/llm/modules/test/test_mha.py

Copy link

pytorch-bot bot commented Nov 7, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit b373248 with merge base 7fcd0af (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 Nov 7, 2024
@jackzhxng jackzhxng force-pushed the jz/mha-swap branch 2 times, most recently from 03b44fc to 3f87c3b Compare November 8, 2024 19:31
@jackzhxng jackzhxng marked this pull request as ready for review November 8, 2024 19:31
@jackzhxng jackzhxng added the release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava label Nov 8, 2024
Move to extension/llm/modules

Lint

Add tests
@jackzhxng jackzhxng merged commit 146ca1b into main Nov 11, 2024
39 checks passed
@jackzhxng jackzhxng deleted the jz/mha-swap branch November 11, 2024 18:48
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. release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants