KV Cache Budget Simulator

Exact bytes, OOM walls, PagedAttention wins, and the latency–throughput Pareto frontier — pure client-side math.

Where the memory goes

KV cache vs sequence length — the OOM wall

Total KV bytes at the current batch size, one line per KV precision. Dashed red = memory left for KV after weights + overhead. Where a line crosses it, you OOM.

Latency vs throughput — the Pareto frontier at this budget

Sweeping batch size at the current context length (roofline model: decode reads all weights + all KV every step). Each curve ends where its KV precision hits the memory budget — the dot is the OOM wall, not a performance limit. This is the part most calculators skip: quantizing the KV cache doesn't make a step faster at fixed batch so much as it lets you keep batching past where FP16 falls off the memory cliff.

Where PagedAttention wins

Capacity table