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

Improve recovery from KV cache starvation #403

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Conversation

tohtana
Copy link
Contributor

@tohtana tohtana commented Feb 2, 2024

This PRs improves efficiency when we are running out of KV cache.

Currently, we free the KV cache for all ongoing requests when we fail to schedule any request. This PR changes this strategy by only freeing the cache allocated to the last request. This approach reduces the recomputation cost and prevents the generation from getting stuck.

@mrwyattii
Copy link
Contributor

@mrwyattii mrwyattii merged commit 237a2c9 into main Feb 2, 2024
2 of 3 checks passed
@mrwyattii mrwyattii deleted the tohtana/deadlock_recovery branch February 2, 2024 22:19
@tohtana tohtana mentioned this pull request Feb 23, 2024
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.

2 participants