CARD NEWS · Development

KV Cache · 4 cards

Four cards for social posts, teaching materials and presentations. Capture the screen or print to a PDF.

1/4
Development

KV Cache

A KV cache (key-value cache) is a technique used when a large language model (LLM) generates text. The model keeps the attention "key" and "value" tensors it has already computed for earlier tokens in GPU memory and reuses them for each new token, instead of recomputing the whole context every time.[2] This speeds up generation. The trade-off is memory: the cache grows with the length of each sequence, so it becomes a key factor in LLM serving cost and in how much context a system can handle at once.[1][2] Prompt caching offered by API providers applies the same idea across requests: it saves the key-value state for a repeated prompt prefix and reuses it.[9]

2/4
In simple terms

An easy way to understand

Think of the KV cache as the notes an AI keeps while reading a long text.

3/4
Where it is used

Who uses it, and when?

[6][9] Rates change, so check each provider's current pricing page. [8] FP8 or INT8 storage halves KV cache memory.

4/4
Learn more

ai.rookienote.com
/en/term/kv-cache

RookieNote
← Read the full entry

Capture these cards or print them to a PDF.