inference-tradeoffs-explained

Chapter 03 · Prefix caching

Prefix caching

Loading the matrix…

Keeping the KV of shared prompt prefixes so the next request with the same prefix skips their prefill.

The chapter text (the mechanism animated, why it behaves as measured, and the papers) is being written. This page already shows what the sweep measured.

Prefix caching (paged KV)

Change from the baseline on H100, at capacity for goodput and cost, at the reference load for latency. Run it live

Workloadgoodput$/M tokTTFT p99TPOT p99ITL p99
Chat+102% E-50% E$-57% -27% -63%
Coding agent+868% E-90% E$-74% -42% -1%
Offline batch+0% +0% $-6% +0% -82%
Long-context RAG+9% -8% $-5% -9% +1%
Real-time voice+656% E-87% E$-77% -29% -0%

Caveats on these numbers

✓ better than the baseline, ✗ worse, by more than ±2%. Every lever on every metric and device: the matrix; on any two metrics: the explorer.