{ "lesson": "04-vllm-serving-internals", "title": "Serving Engine Internals — PagedAttention, Continuous Batching, Chunked Prefill", "questions": [ { "stage": "pre", "question": "What is the main problem classic static batching has with mixed-length requests?", "options": [ "It only works with FP4", "It cannot use GPUs at all", "Padding to the longest prompt and longest output wastes memory and stalls the whole batch on the slowest sequence", "It requires NVLink between every GPU" ], "correct": 2, "explanation": "" }, { "stage": "check", "question": "How does PagedAttention reduce KV cache fragmentation from 60-80% to under 4%?", "options": [ "By disabling KV cache entirely", "By holding the full prompt in CPU RAM", "By compressing weights to INT4", "By allocating KV cache in fixed-size blocks (default 16 tokens) referenced through a per-sequence block table" ], "correct": 3, "explanation": "" }, { "stage": "check", "question": "What invariant defines continuous batching in vLLM's V1 scheduler?", "options": [ "Each request gets its own dedicated GPU stream", "The scheduler waits 10 ms windows to fill a batch before running", "The scheduler runs once per request and the batch never changes", "The scheduler runs once per decode iteration, admitting finished sequences out and waiting ones in" ], "correct": 3, "explanation": "" }, { "stage": "check", "question": "Which latency metric does chunked prefill primarily protect under mixed load?", "options": [ "Mean throughput", "Cold-start time", "Network RTT", "P99 inter-token latency (ITL)" ], "correct": 3, "explanation": "" }, { "stage": "post", "question": "What does the vLLM v0.18.0 feature compatibility matrix say about speculative decoding with --enable-chunked-prefill?", "options": [ "The matrix marks the combination as compatible", "They cannot be combined in any configuration", "Only EAGLE-1 draft heads work with chunked prefill", "Only draft-model speculation works with chunked prefill" ], "correct": 0, "explanation": "" }, { "stage": "post", "question": "Why does chunked prefill not in isolation increase mean throughput?", "options": [ "It compresses weights more aggressively", "It only reduces decode-time jitter; the throughput win in practice comes from keeping decode sequences alive during long prefills, not from changing the work done", "It runs on a different GPU than decode", "It uses speculative decoding under the hood" ], "correct": 1, "explanation": "" } ] }