← Lab
kvpaging
confirmedGo · CPUInference & servingJuly 7, 2026
the question
What does paged vs contiguous KV cache actually cost in memory?
what came out
Contiguous reservation wastes ~94% (worse the longer the context), so paging fits 18x-72x more concurrent sequences. Paging's own internal fragmentation is only ~block/2 tokens per sequence. Go, exact accounting, pre-registered.
method & receipts
- Result: confirmed
- Pre-registered — the prediction was written down and committed before the run.
- Reproducible — one script re-runs the whole thing from scratch.
- Independently reviewed — an adversarial review pass, kept in the repo.
- Machine-readable claims — every reported number, in a checkable file.
→ read the code and re-run it
github.com/v-code01/kvpaging