🖥️ AI InfrastructureID:
kv-cache-pagedKV Cache & PagedAttention
KV Cache 与 PagedAttention
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep DiveCore Def
Explain the core definition, underlying mechanism/math, and key principles of KV Cache & PagedAttention.
Use Cases
In production engineering, what are the primary use cases for KV Cache & PagedAttention and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Hand-compute KV cache memory: write and explain what each 2 means; for 80 layers, 8 KV heads, , 16K context, batch 16, compute per-sequence and total GB.
2
Why PagedAttention removes memory fragmentation: 16-token blocks plus a block table; how internal and external fragmentation arise and disappear; utilization improvement from ~60-80% to ~100%.
3
How GQA/MLA compress KV memory: which term in the formula shrinks when MHA → GQA shares KV heads; LLaMA-3 70B (64→8) gives an 8× reduction; MLA's low-rank projection idea.
4
KV write patterns in prefill vs decode: prefill writes all s KV entries at once, decode appends one per step; why the memory peak sits at the end of prefill.
5
Precision trade-offs of KV quantization: why quantizing KV (e.g. INT8) is more sensitive than weight quantization; how it composes with FlashAttention and streaming/sliding-window KV to cap memory.
📖 In-depth Guide:📄 kv-cache-and-paged-attention →
Updated 2026-08-12🎯
🚀 Start Card Practice ➔Test Your Knowledge: Practice Questions for "KV Cache & PagedAttention"
Single choice pitfall questions with instant feedback and mistake tracking.