Skip to content
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

Add Attention Sinks (TVM portion) #300

Closed
wants to merge 11 commits into from
Closed

Add Attention Sinks (TVM portion) #300

wants to merge 11 commits into from

Conversation

kmn1024
Copy link

@kmn1024 kmn1024 commented Dec 7, 2023

The TVM component to implementing Attention Sinks (https://arxiv.org/abs/2309.17453). See mlc-ai/mlc-llm#1357

This API allows caller to choose 1. how many slots to use as sinks, and 2. how much to trim the cache to.

  1. Callers can pick a low number like in the paper, or something to keep the entire system command.
  2. The typical sliding window approach would call this function after every append, and trim to max_window_size. For better performance, callers can trim more frequently and aggressively.

@kmn1024
Copy link
Author

kmn1024 commented Dec 7, 2023

Sorry bad PR.

@kmn1024 kmn1024 closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants