A useful preprint, not a hardware verdict

The September preprint “The KV Cache Is the New Memory Wall” examines key–value cache pressure in transformer inference and surveys ways to manage it. It is a preprint, not a peer-reviewed validation of every implementation or system claim. Its useful framing is that model weights alone do not determine the memory needs of a long-context serving system.

An application can fit a model onto an accelerator and still fail to support the required concurrency. The cache grows with active sequence state, while the service must also reserve memory for runtime operations and other buffers. Capacity planning needs the request distribution and serving policy, not just a model parameter count.

Build a transparent memory model

For a conventional full-attention decoder, a first-order KV estimate is proportional to twice the number of layers, cached tokens, key–value heads, head dimension and bytes per element. The factor of two accounts for keys and values. Architecture-specific techniques, sliding windows, quantisation and allocation overhead can change this estimate.

Use the estimate to explain trends, then validate against the actual runtime. Model weights, allocator fragmentation, temporary activations and implementation reserves need separate accounting. Do not treat an analytical estimate as a measured peak or assume it applies unchanged to every attention architecture.

Concurrency changes the problem

Measure the joint distribution of prompt length, generated length and simultaneous active requests. A small number of very long requests can occupy cache capacity while other requests wait. Averages hide this behaviour. Admission control should account for expected memory demand and the service’s latency objective.

Test bursts, cancelled requests and clients that generate until a maximum length. Confirm that abandoned work releases state promptly. A serving policy should explain whether it queues, rejects, preempts or recomputes work when resources become scarce; each choice affects user experience and operating cost.

Evaluate cache policies as application changes

Paging can improve allocation efficiency, prefix sharing can avoid repeated work, and quantisation or eviction can reduce storage. Their effects differ. A lossy cache policy may change answer quality; a storage tier can exchange capacity for transfer delay. Evaluate each technique under the model and workload you actually serve.

Prefix reuse also introduces a security boundary. Cache lookup keys and access checks must respect tenant and data permissions. A previously computed result should not become accessible merely because another user supplies similar text. Decide what cache metadata is logged and how sensitive state is expired.

A practical acceptance test

Compare a baseline with one cache intervention at a time. Report task quality, time to first token, generation latency, accepted throughput, memory use and recomputation. Include long-tail requests and realistic cancellation. Explain whether a gain comes from more efficient allocation or from changing how much context the model retains.

Publish assumptions alongside measurements so the result can be reproduced after a runtime update. Our infrastructure overview provides related serving context. The objective is predictable service under constrained memory, rather than the largest context window in a single demonstration.