AI GLOSSARY
KV Cache and Fast Generation
KV cache trades memory for much faster token-by-token decoding.
Simple explanation
During generation, past tokens do not change. Caching their key and value projections lets each new token reuse prior attention state, reducing repeated work at the cost of memory.
Technical explanation
During generation, past tokens do not change. Caching their key and value projections lets each new token reuse prior attention state, reducing repeated work at the cost of memory.
Example
Trace how Past tokens becomes Faster next token through cached k/v.