Skip to content

Fix quantized cache#30

Merged
maxjeblick merged 32 commits intomainfrom
max/fix_quanto_cache
Dec 11, 2024
Merged

Fix quantized cache#30
maxjeblick merged 32 commits intomainfrom
max/fix_quanto_cache

Conversation

@maxjeblick
Copy link
Copy Markdown
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
Comment thread tests/integration/test_ruler.py Outdated
Comment thread tests/integration/test_ruler.py
@maxjeblick maxjeblick merged commit 7503f0d into main Dec 11, 2024
@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