When serving an LLM, what memory grows with each request's length and limits how many requests fit at once?
The KV cache, the stored keys and values for earlier tokens.
- The KV cache ✔
- The tokenizer vocabulary
- The training dataset
Why: To avoid redoing attention over old tokens, servers keep each token's keys and values. That cache grows as the text gets longer, so it caps the batch size. vLLM's PagedAttention manages it like virtual memory pages.
Huh, didn't know that: vLLM reported 2 to 4 times higher throughput at the same latency, thanks to near-zero KV cache waste.
The KV cache is like my phone's photo storage. It fills up right when things get interesting.
References
Answer: The KV cache. To avoid redoing attention over old tokens, servers keep each token's keys and values. That cache grows as the text gets longer, so it caps the batch size. vLLM's PagedAttention manages it like virtual memory pages.
- Kwon et al., Efficient Memory Management for Large Language Model Serving with PagedAttention arxiv.org/abs/2309.06180
the key-value cache (KV cache) memory for each request is huge and grows and shrinks dynamically
Checked 2026-10-11. - Kwon et al., Efficient Memory Management for Large Language Model Serving with PagedAttention arxiv.org/abs/2309.06180
an attention algorithm inspired by the classical virtual memory and paging techniques in operating systems
Checked 2026-10-11. - Kwon et al., Efficient Memory Management for Large Language Model Serving with PagedAttention arxiv.org/abs/2309.06180
vLLM improves the throughput of popular LLMs by 2-4$\times$ with the same level of latency
Checked 2026-10-11.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.