Skip to main content
← Lab

kvquant

null resultPython · llama.cppInference, serving & evaluationJuly 6, 2026

the question

Decode is memory-bandwidth-bound, so shouldn't a smaller (quantized) KV cache be faster?

what came out

No. Both the speedup and the drift-reduction predictions were falsified. With llama.cpp on 0.5B and 1.5B models (Q4_K_M weights, flash attention on), quantizing the KV cache to q8_0 or q4_0 makes decode slower, +13-16% per token: the dequant cost outweighs the fewer bytes read. A counter-intuitive, honest null.

method & receipts

  • Result: null result: an honest negative, reported as it came out.
  • Pre-registered: the prediction was written down and committed before the run.
  • Reproducible: one script re-runs the whole thing from scratch.
  • Adversarial self-review: my own skeptic's pass over each claim, kept in the repo.
  • Machine-readable claims: every reported number, in a checkable file.
  • Tested: a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/kvquant