AI inference glossary
Serving

KV cache

Also known as key-value cache, attention cache

In plain English

The KV cache is the model’s working memory for the current conversation. It keeps useful notes and avoids rereading everything for every new token.

Technical definition

The KV cache stores attention key and value states for tokens already processed, allowing each decode step to reuse them.

Engineering details

The cache grows with sequence length, batch size, layer count, and the number and width of stored attention heads. During decode it is repeatedly read from accelerator memory, so both capacity and bandwidth matter.

Why it matters

KV-cache pressure limits concurrency and long-context serving. Cache quantization, paged allocation, latent attention, prefix reuse, and disaggregated transfer systems all target its capacity or movement cost.

How to read it in InferenceX

InferenceX disables prefix caching for random-data comparisons unless a recipe states otherwise. That keeps unrelated requests from receiving artificial cache hits and makes raw serving stacks easier to compare.