Title: Quiz 4 — PagedAttention and Continuous Batching Deep Dive
Course: AIINFRA 200: Production Inference Serving & GPU Orchestration > Section: Week 04 — PagedAttention and Continuous Batching Deep Dive

Q: Without PagedAttention, a request specifying a 32K-token context window will reserve a full 32K-token contiguous KV-cache allocation upfront, even if it only ends up generating 200 tokens.
- True
- False
A: True

Q: What is PagedAttention primarily designed to solve?
- Reducing the number of model parameters
- Memory fragmentation and inefficient KV-cache allocation
- Compressing model weights for faster loading
- Reducing the number of attention heads needed
A: Memory fragmentation and inefficient KV-cache allocation

Q: PagedAttention's sole purpose is to enable batching of requests; batching itself is handled entirely by the PagedAttention mechanism.
- True
- False
A: False

Q: How does continuous (iteration-level) batching fundamentally differ from static batching?
- It uses a larger batch size on average
- It only runs on multi-GPU clusters
- It evicts finished sequences and inserts new queued requests at every decode step, rather than waiting for the whole batch to finish
- It pre-allocates a single contiguous memory block per batch
A: It evicts finished sequences and inserts new queued requests at every decode step, rather than waiting for the whole batch to finish

Q: In PagedAttention, what is the role of a "block table"?
Feedback: Sample/expected answer: It maps a sequence's logical token positions to the non-contiguous physical GPU memory blocks that actually store that sequence's KV cache, similar to how a page table maps virtual memory to physical memory in an operating system.

Q: Approximately how much higher throughput does continuous batching typically achieve compared to static batching?
- No measurable difference
- Roughly 3-10x higher throughput
- Exactly 2x higher throughput, always
- It reduces throughput but improves accuracy
A: Roughly 3-10x higher throughput

Q: vLLM's scheduler only admits new sequences into the running batch when the entire current batch has fully finished generating.
- True
- False
A: False

Q: Name one reason PagedAttention and continuous batching together (roughly 2-4x throughput improvement over naive serving) became the reference architecture that competing inference engines converged toward.
Feedback: Sample/expected answer: Accept answers referencing: near-elimination of KV-cache memory waste/fragmentation (up to \~90% reduction) combined with keeping the GPU continuously busy across requests of varying length, which together let far more concurrent requests fit on the same hardware without sacrificing per-request correctness.