Atomic flashcards for this topic. Free for everyone. Pro syncs them into your spaced-repetition queue.
What is the KV cache?▾
Memory of K (key) and V (value) tensors from all prior tokens. Reused at each decoding step to avoid O(n²) recomputation.
How does KV cache memory scale?▾
Linearly with sequence length × layers × heads × head_dim × 2 (K and V).
What is GQA?▾
Grouped-Query Attention, multiple query heads share the same K and V projections, reducing KV cache size at minimal quality cost.
What is PagedAttention?▾
vLLM's technique, treats the KV cache as paged memory blocks, reducing fragmentation when serving many concurrent requests of varying lengths.
+ 1 more cards in the full deck · Drill all cards (Pro)