Skip to content
inference.academy

glossary/memory/kv-cache-offloading

KV cache offloading

also KV cache tiering, CPU offload

Spilling evicted KV cache to host DRAM, or further to SSD or a remote store, instead of throwing it away. Host memory is far larger than HBM and far slower to reach, so a spilled context costs a copy over PCIe rather than a full prefill. Whether that is a win depends on the size: for long agent contexts the copy is a quarter of the recompute. The tiers form a hierarchy with recompute at the bottom.


2.5 s

To bring 29.5 GB of context back over a 12 GB/s realised host link, against 10.1 s to prefill it again.


See it happen


Related