Instructor notes: Frame the problem before naming the mechanism. Collect an initial prediction and retain it for the exit ticket.
Instructor notes: These outcomes are observable: trace, calculation, comparison. A recited definition closes none of them.
Instructor notes: Connect every step to the next with a causal verb. Flag any merely decorative arrow.
Instructor notes: Start by writing shapes (B,T,V) and (B,T) on the board, then ask for the mean’s denominator. Those answering B×T are holding the most common production counting bug — let it live for a minute.
Instructor notes: Answer: divide by 5 — the unmasked positions — never by 8. Dividing by 8 flattens the curve optimistically while no prediction improves. Expected wrong answer: B×T = 8. Useful callback: the same denominator bug as intermediate session 11 (18 vs 13).
Instructor notes: Have them compute 0.408 by hand, then rerun with z + 10 without announcing the expected result. The surprise of equality beats an algebraic proof handed out in advance.
Instructor notes: Answer: the loss stays exactly 0.408 — shift invariance of the log-softmax; only logit differences matter. Expected wrong answer: “bigger logits, so lower loss”. Have them redo the trace line −12 + 12.408 before correcting.
Instructor notes: Have them draw activation memory as a stack growing through the forward pass. Ask where to cut the stack: checkpointing becomes a choice they make, not a library flag.
Instructor notes: Answer: you pay a forward recomputation, roughly 30% more time; the net gain is measured in freed activation memory, hence in feasible batch or model size. Expected wrong answer: “it is free since memory goes down”.
Instructor notes: Have the room quantify the full AdamW memory budget for 7B before showing the table. The gap between their estimate and the real total is the actual content of this slide.
Instructor notes: Answer: m + v in FP32 = 2 × 7 × 10⁹ × 4 bytes ≈ 56 GB — twice the FP32 weights (28 GB); weights + states ≈ 84 GB, i.e. 3× weights alone. Expected misses: counting one moment only, or forgetting FP32’s 4 bytes. The gap between their estimate and 56 GB is this slide’s content.
Instructor notes: Frame parallelism as a communication trade-off: ask what crosses the network each step in each of the three schemes. Reject any answer of the form “it is faster”.
Instructor notes: Answer: the accumulation of updates degrades first — tiny increments vanish in BF16’s short mantissa; the FP32 master copy preserves them. Expected wrong answer: “the forward pass goes wrong” — it tolerates reduced precision far better.
Instructor notes: Hand out a checkpoint field list with three fields missing and have them diagnose the expected symptom of each. This is the exercise that transfers best to a real incident.
Instructor notes: Answer — three fields and their symptoms: missing m,v → badly calibrated first AdamW step; missing scheduler → lr restarts, transient loss spike; missing data position → repeated or skipped samples; missing RNG states → non-reproducible run. Require the observable 200-step effect for every field named.
Instructor notes: Hide the final result. Elicit sign, shape, and order of magnitude before every operation.
Instructor notes: Walk line by line. Locate an inconsistency at the first faulty step, not only on the final line.
Instructor notes: Have learners fill the final row before revealing it: that trade-off is what decides in production.
Instructor notes: Retain initial and final values. Do not allow simultaneous changes that make the delta impossible to attribute.
Instructor notes: Have the group produce the smallest counterexample before giving the correction.
Instructor notes: Have the group produce the smallest counterexample before giving the correction.
Instructor notes: The boundary is not a footnote: it defines the cases where the mechanism no longer suffices.
Instructor notes: Separate verifiable mechanism, reported implementation choice, and experimental result. Evidence precision must match claim precision.
Instructor notes: Attribute each product choice to the supplied packet and retain reported status until an independent primary source confirms it.
Instructor notes: Expected: A resumes at the right step but with m = v = 0 and a restarted scheduler → transient spike then recovery; B replays 2,000 steps (pure GPU cost) with a healthy curve. Costing: full checkpoint ≈ 28 GB FP32 weights + 56 GB moments; B costs 2,000 × cost/step. Misconception to harvest: “weights are enough, the optimizer recalibrates quickly” — true only at small lr. Switch to B once the spike exceeds ~2× current loss. Eight minutes, pairs.
Instructor notes: Rebuild the chain without looking at the slides. Reopen only the first break.
Instructor notes: Six lines maximum. Compare with the initial prediction and name what actually changed. Cite one retained trace that lets a peer verify the conclusion.