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

Fix quantized cache #30

Merged
merged 32 commits into from
Dec 11, 2024
Merged

Fix quantized cache #30

merged 32 commits into from
Dec 11, 2024

Conversation

maxjeblick
Copy link
Collaborator

This PR fixes the failing quantized cache for answers > 1.

  • Quantized cache also uses a key/value cache (of dummy 0s) that needs to be pruned after answer generation. This caused the original issue.
  • Quantized cache uses _seen_tokens to determine the cache sequence length, adjust this value to be in sync with the actual kv cache.
  • Added several tests (including integration tests for ruler)

Fixes #27

@maxjeblick maxjeblick requested a review from SimJeg December 10, 2024 17:10
@maxjeblick maxjeblick mentioned this pull request Dec 11, 2024
tests/integration/test_ruler.py Outdated Show resolved Hide resolved
tests/integration/test_ruler.py Show resolved Hide resolved
@maxjeblick maxjeblick merged commit 7503f0d into main Dec 11, 2024
2 checks passed
@maxjeblick maxjeblick deleted the max/fix_quanto_cache branch December 11, 2024 16:14
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.

QuantoQuantizedCache fails with number of questions > 1
2 participants