This is the whole chapter in one sitting. Larry pulled the engine apart — neural nets, transformer blocks, attention and the KV cache, MoE, diffusion, and the roofline that governs all of it. Fifteen questions below decide whether it stuck. Clear it and Chapter 3 opens.
Score 80% or better to pass. Every option explains itself, so a wrong pick still teaches — and you can take another pass whenever you like.
01 · The exam
Fifteen questions across the chapter.
Parameters and FLOPs, the KV cache and GQA, MoE, arithmetic intensity and the roofline, FlashAttention and PagedAttention, and the diffusion/video cost model.
Check your understanding0 / 15
Question 1
A matmul multiplies an M×K matrix by a K×N matrix. Roughly how many floating-point operations does it take?
Question 2
Per token, the KV cache stores bytes proportional to which product?
Question 3
Llama-3 70B uses 8:1 GQA (8 KV heads vs 64 query heads). Versus hypothetical MHA (64 KV heads), the KV cache shrinks by roughly:
Question 4
In a Mixture-of-Experts layer with top-k routing, what is true of the parameters used per token?
Question 5
Arithmetic (operational) intensity is defined as:
Question 6
On a roofline plot, the ridge point (where memory-bound meets compute-bound) sits at intensity equal to:
Question 7
Why is single-request LLM decode typically memory-bandwidth-bound?
Question 8
Prefill (processing the prompt) differs from decode because it:
Question 9
FlashAttention is faster mainly because it:
Question 10
Online softmax lets attention be computed tile-by-tile in one pass by tracking, per query, a running:
Question 11
PagedAttention improves serving throughput chiefly by:
Question 12
A model with a 4K sliding-window attention is asked about information at position 20K. What happens?
Question 13
Modern LLM FFNs favor GELU/SiLU over ReLU mainly because they are:
Question 14
Few-step image generation (distilled diffusion) reduces cost primarily by:
Question 15
Video generation is far costlier than image generation mainly because: