-
Notifications
You must be signed in to change notification settings - Fork 522
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
Adding cached KVs #266
Adding cached KVs #266
Conversation
TODO: Update tests
TODO: update tests |
For visibility: updates to lit-parrot caching |
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.
Implementation looks good!
@carmocca what is the difference between |
I opened #313 to track it. I wouldn't try to merge them here. |
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.
I think we're done here! The howto update can be done separately
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.
Awesome job!
This PR adds the option to cache KVs for inference.
Cached KVs portion of splitting #240 into 2 PRs
main changes:
added KV caching
moved rope cache to the whole model from each attention layer
added mask cache to use for attention masking with cached kvs.
fix ops and tensors that would cause recompilation.
Similar to Lightning-AI/litgpt#51
Fixes #197
Fixes #309