What is the KV cache?
Stored attention keys and values for all earlier tokens so they need not be recomputed. Grows with context length.
Learn it properly in the lesson →
Where it comes up
Lessons that use this term, most mentions first.
- Capstone: design a production inference platform · 35 min · Pro
- GPU generations, CPU-GPU superchips, multi-GPU instances and MIG · 14 min · Pro
- Prefill, decode and the roofline: predicting inference speed · 18 min · free
- Choosing GPUs and deployment targets · 14 min · Pro
- How generation works: prefill, decode and the KV cache · 12 min · free
- A framework for choosing the right model · 13 min · Pro
- Attention optimisations: FlashAttention, GQA, paged KV and sliding windows · 16 min · Pro
- llama.cpp: build, run and serve · 13 min · free