Add KV-cache key compression reproducible comparison#303
Open
yi-fireworks wants to merge 2 commits intomainfrom
Open
Add KV-cache key compression reproducible comparison#303yi-fireworks wants to merge 2 commits intomainfrom
yi-fireworks wants to merge 2 commits intomainfrom
Conversation
Self-contained kernel-level comparison of three KV-cache key compression methods (Conventional, TurboQuant, RotorQuant) on a B200 GPU with matched storage budgets and fused Triton scoring kernels. Includes the measurement harness, library code, reference results, and full documentation for reproduction. Made-with: Cursor
Quality numbers are seed-deterministic but not bitwise-identical across GPU architectures (verified: B200 reference vs H200 smoke test shows deltas in 4th-6th decimal place). Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Self-contained kernel-level comparison of three KV-cache key compression methods
(Conventional scalar quantization, TurboQuant, RotorQuant) on a B200 GPU with
matched storage budgets and fused Triton scoring kernels.
research/kv-cache-compression/Directory structure
What was adjusted from the internal experimental branch
baselineblock from config JSON (referenced internal pathsand an outdated note about RotorQuant being over-budget)
transformersto requirements.txt (needed by an import in fused_attention.py).gitignore__pycache__/,patch_test.py(empty stub),data/LLMTest_NeedleInAHaystack/(vendored third-party, unused by harness),
results/niah/andresults/real_keys_eval/(separate experiments not documented in README)
Reproduce
Requires any Ampere+ NVIDIA GPU (A100, H100, L4, B200, etc.). Quality numbers
are seed-deterministic and should match the reference CSV. Timing varies by hardware.
Test plan