Skip to content

Conversation

@pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #6579
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/helunwencser/70/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/helunwencser/70/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/helunwencser/70/orig
@diff-train-skip-merge

Pull Request resolved: #6579

This PR adds `KVCacheWithAttentionSink`, which is required for `AttentionSink`. It keeps the first `sink_size` tokens as attention sinks and maintains a sliding window with `window_size` for new tokens.

Note: I am trying to implement and verify `AttentionSink` in eager mode first. So the current implementation may still have some lower errors. Will leave these problems to resolve when we are ready to deploy `AttentionSink` to edge.
ghstack-source-id: 255715047
@exported-using-ghexport

Differential Revision: [D65235798](https://our.internmc.facebook.com/intern/diff/D65235798/)
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 28, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 3905f19 with merge base c726a9b (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 28, 2024
@kirklandsign kirklandsign merged commit 9d084c4 into main Dec 2, 2024
41 of 43 checks passed
@kirklandsign kirklandsign deleted the gh/helunwencser/70/orig branch December 2, 2024 17:28
@jackzhxng jackzhxng added release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava and removed release notes:attention_sink labels Dec 11, 2024
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.

6 participants