-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add KVCacheWithAttentionSink 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/) Co-authored-by: Lunwen He <[email protected]>
- Loading branch information
1 parent
2d499b3
commit 9d084c4
Showing
2 changed files
with
586 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.