# KV cache

Source: https://stateofthefuture.io/ai-software/ai-inference/kv-cache/
Checked: 25 Nov 2026

Stored attention data that spares a language model redoing past work per word.

Potential 61. Readiness 88. Position: Won.

## What it is

A language model writes one token, a word or part of one, at a time, looking back at every earlier one. Without a cache it recomputes that past work at each step. With one, it stores two vectors per token per layer, the keys and values, and only computes the new token's share ([Hugging Face](https://huggingface.co/blog/not-lain/kv-caching)). The trade is memory: the cache grows with every token and every user, and at long context it can outweigh the model itself [unverified].

So the work now is managing the cache. PagedAttention stores it in small pages, which cut waste enough to raise throughput two to four times ([arXiv, Sep 2023](https://arxiv.org/abs/2309.06180)). Nvidia's Dynamo routes requests to chips that already hold the right cache and moves cache to cheaper storage ([Nvidia](https://developer.nvidia.com/dynamo)).

The number: 5.2 times faster generation with the cache than without, in one test on a small GPU ([Hugging Face](https://huggingface.co/blog/not-lain/kv-caching)).

Cost: No public price; it is free inside open-source serving engines.

What counts: the cache and the methods that store, share, shrink and move it. Model designs that need no growing cache are [state space models](https://stateofthefuture.io/ai-software/ai-models/state-space-models/).

## The read

Good potential, high readiness: a standard part of every language model service that makes generation several times cheaper. The open question is memory, as context grows.

The catch: Memory. Long contexts and many users can fill a GPU's memory with cache before compute runs out; wasted cache memory limits batch size and throughput ([arXiv](https://arxiv.org/abs/2309.06180)).

## How it scores

- **Impact 3/5.** Generating text costs a fraction of what recomputing would.. Replaced by the next best option, recomputation, generation would run several times slower ([Hugging Face](https://huggingface.co/blog/not-lain/kv-caching)). Every language model service would cost more. Close to 4, but this is one industry's cost. Judgement
- **Novelty 4/5.** About five times faster than recomputing, in the one test found.. It is the standard, so the step is over recomputation it displaced: 5.2 times ([Hugging Face](https://huggingface.co/blog/not-lain/kv-caching)). State space models claim five times a Transformer's throughput ([arXiv](https://arxiv.org/abs/2312.00752)), but leading models still use attention [unverified]. Close to 1 if that changes. Judgement
- **Viability 5/5.** Routine in every major open serving engine.. vLLM, SGLang and TensorRT-LLM all manage a cache, and Dynamo routes across them ([Nvidia](https://developer.nvidia.com/dynamo)). Independent
- **Drivers 3/5.** Used in all paid language model serving; no buyer pays for it alone.. It comes free inside serving software. Demand for the services built on it is large, but no source shows buyers committing ahead for the cache itself. Judgement
- **Ease of adoption 5/5.** A straight swap: on by default.. Serving engines turn it on without the user asking [unverified]. Judgement
- **Supply 5/5.** Open methods in open-source software.. PagedAttention and vLLM are published and open ([arXiv](https://arxiv.org/abs/2309.06180)). Independent

The brake: Supply. GPU memory, a shared input, limits how much cache fits.

## What changed

- 12 Jun 2017: Transformer models appear. Where it began [arXiv](https://arxiv.org/abs/1706.03762)
- 12 Sep 2023: PagedAttention and vLLM raise throughput two to four times. Cache management becomes the lever [arXiv](https://arxiv.org/abs/2309.06180)
- 1 Dec 2023: Mamba claims five times a Transformer's throughput with no growing cache. A rival route [arXiv](https://arxiv.org/abs/2312.00752)
- 7 May 2024: DeepSeek-V2 shrinks its cache 93.3% with a new attention design. Smaller caches stretch memory [arXiv](https://arxiv.org/abs/2405.04434)
- 2025: Nvidia's Dynamo adds cache-aware routing and offload to cheaper storage. The chip maker builds around it [Nvidia](https://developer.nvidia.com/dynamo)

## Who captures the value

Nobody sells the cache. Its value lands with the firms that serve models, as lower cost per token, and with memory makers, since bigger caches need more memory. Judgement.

## What would change this

- Any date: A leading model drops attention for a design with no growing cache. Novelty to 1; position to standard under challenge.
- 2027: Cache offload to flash storage becomes standard. Brake eases.

Prediction: The top three models on a public leaderboard still use attention with a KV cache on 31 December 2027. Probability 85%.

## Against the alternatives

| Way of doing it | What it gives you | What it costs you | Where it is now |
| --- | --- | --- | --- |
| KV cache with paging, sharing and offload (this page) | Several times faster generation | Memory that grows with context and users | Routine |
| Recompute attention at each step | No cache memory | About five times slower in one test ([Hugging Face](https://huggingface.co/blog/not-lain/kv-caching)) | Abandoned |
| Compressed attention, such as DeepSeek's latent attention | 93.3% smaller cache ([arXiv](https://arxiv.org/abs/2405.04434)) | A model trained for it | In paid use [unverified] |
| [State space models](https://stateofthefuture.io/ai-software/ai-models/state-space-models/) | Fixed memory, linear in length ([arXiv](https://arxiv.org/abs/2312.00752)) | Weaker recall of exact earlier text [unverified] | In paid use [unverified] |

## Who is involved

| Name (country, listing) | Role | Money | Stage |
| --- | --- | --- | --- |
| vLLM project (open source) | makes paged cache serving | not disclosed | Routine ([arXiv](https://arxiv.org/abs/2309.06180)) |
| Nvidia (US, Nasdaq) | makes Dynamo and TensorRT-LLM | part of Nvidia | Routine ([Nvidia](https://developer.nvidia.com/dynamo)) |
| SGLang project (open source) | makes a serving engine | not disclosed | Routine |
| DeepSeek (China, private) | shrinks the cache in its models | part of DeepSeek | In use ([arXiv](https://arxiv.org/abs/2405.04434)) |

Works with: High-bandwidth memory; prefix caching of shared prompts.
Needs: GPU memory; Transformer models.
Feeds: Chat services, AI agents, long-document tools.

Author: Lawrence Lundy-Bryan, State of the Future (https://stateofthefuture.io/)
