# Value Cache

- **Canonical URL:** https://getaimath.com/dictionary/value-cache/
- **Topics:** [LLM Inference: Prefill & Decode](https://getaimath.com/dictionary/category/llm-inference-prefill-and-decode/)
- **Last updated:** 2026-11-25

## What is Value Cache?

**In one sentence:** The value cache is the part of the KV cache that stores the values for all previous tokens.

Once attention decides which earlier tokens matter, it pulls their information from the value cache. Like the key cache, it grows with every token.

![How an AI Replies: 1. Read Your Question → 2. Type the Answer — Simple two-step cartoon: Step 1 (Prefill) shows the AI scanning your entire question in one flash (causing the brief pause before it starts talking); Step 2 (Decode) shows it typing out the reply one word at a time.](https://getaimath.com/diagrams/llm-inference-prefill-and-decode.png)
*Napkin Diagram (LLM Inference: Prefill & Decode): Every AI reply has two halves: gulping down your whole prompt at once, then speaking the answer one word at a time.*

## What is an example of Value Cache?

After attention focuses on the word "dragon," the model reads that word's stored value from the value cache.

## Why does Value Cache matter?

It is the other half of the KV cache's memory use.

## Related Concepts

- [Key Cache](https://getaimath.com/dictionary/key-cache/): The key cache is the part of the KV cache that stores the keys for all previous tokens.
- [KV Cache Size](https://getaimath.com/dictionary/kv-cache-size/): KV cache size is how much memory the KV cache needs, which grows with context length, layers, heads and number of users.
- [KV Cache](https://getaimath.com/dictionary/kv-cache/): The KV cache is the model's short-term memory of the keys and values it already computed for earlier tokens.
- [KV Cache Quantization](https://getaimath.com/dictionary/kv-cache-quantization/): KV cache quantization stores the KV cache in fewer bits to save memory.
- [Autoregressive Generation](https://getaimath.com/dictionary/autoregressive-generation/): Autoregressive generation is creating output one step at a time, where every new token depends on all the tokens before it.
- [PagedAttention](https://getaimath.com/dictionary/pagedattention/): PagedAttention is a way to store the KV cache in small fixed-size blocks, like pages in a book, to avoid wasting memory.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/value-cache/)
