Key-Value Cache (KV Cache)
Quick definition
Stored attention keys and values reused across autoregressive generation steps.
Stored attention keys and values reused across autoregressive generation steps.
Example: An LLM avoids recomputing earlier-token attention states on every new token.
Where it is useful: model acceleration, efficient inference, training hardware, and resource optimization.
Examples
- An LLM avoids recomputing earlier-token attention states on every new token.
Use cases
- model acceleration, efficient inference, training hardware, and resource optimization.
Frequently asked questions
What is Key-Value Cache (KV Cache)?
Stored attention keys and values reused across autoregressive generation steps.
Can you give an example of Key-Value Cache (KV Cache)?
An LLM avoids recomputing earlier-token attention states on every new token.