-
Notifications
You must be signed in to change notification settings - Fork 14.1k
kv-cache: Fix state restore fragmented cache #17982
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
kv-cache: Fix state restore fragmented cache #17982
Conversation
Change find_slot to allow non-contiguous allocation during state restore. Fixes 'failed to find available cells in kv cache' error when restoring state to fragmented cache.
|
PS - aimed to implement the direction given by @ggerganov (#17527 (comment)) |
|
Looking good - will do some testing to confirm 👍 |
|
I updated the test to do a proper verification:
@ssweens After you address the comments, we can merge. |
|
Thanks @ggerganov. Comments addressed and committed. |
ggerganov
left a comment
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.
Thanks for the contribution. This is a good improvement.
|
Happy to help where/when I can. Hat tip to you and team on the great project. |
Fix #17527
Change find_slot to allow non-contiguous allocation during state restore. Fixes 'failed to find available cells in kv cache' error when restoring state to fragmented cache.