Instructor notes: Frame the problem before naming the mechanism. Collect an initial prediction and retain it for the exit ticket.
Instructor notes: Connect every step to the next with a causal verb. Flag any merely decorative arrow.
Instructor notes: Open with the bill: “your PM wants 131,072 tokens of context — how much memory per request?”. Collect three estimates before any computation; the gap between the answers and 16 GiB structures the whole session.
Instructor notes: Have the computation written on the board factor by factor, no calculator, until it lands on 128 KiB/token. Then have them double d_head aloud: the reflex “which factor moves” is the point of this slide.
Instructor notes: Answer: 32 × 2 × 8 × 128 × 2 = 131,072 B — layers × (K and V) × heads × d_head × bytes/value. Under INT8 the last factor goes from 2 to 1: 64 KiB/token. Expected wrong answer: “INT8 removes a factor” — no, it halves one; no factor disappears.
Instructor notes: Flash recall of sessions 13-16 in one question: “how big is S after a million tokens?”. “The same” must shoot back from the room — otherwise redo sixty seconds of session 13 before moving on.
Instructor notes: Ask before commenting: “at 524,288 tokens, how big is the state?” The answer “still 1 MiB” must come from the room, not the instructor — that is what makes the trade-off credible afterwards.
Instructor notes: Answer: recall quality degrades (accumulated interference), not memory; you notice when an old read comes back blended — hence a controlled recall test, not a RAM monitor. Expected wrong answer: “nothing degrades since the size is constant”.
Instructor notes: Hook question: “can you pay less per token without giving up per-token?”. Let the room articulate the trade-off space — structured fidelity versus coefficient — before saying “MLA”.
Instructor notes: Have someone trace the diagram arrow with a marker: what is stored, what is recomputed? Do not move on until the room has pointed at c_t alone.
Instructor notes: Answer: you move memory (a 4× narrower cache) into compute (reconstruction through W_UK/W_UV on every read); the overhead lands mostly at decode, where each new token re-reads the whole cache. Expected wrong answer: “at prefill” — prefill is already compute-bound.
Instructor notes: Write 16,777,216 on the board and ask: “does splitting W into two matrices always save?”. Take a yes/no vote; the vote sets up the beat’s discovery of the r = 2048 threshold.
Instructor notes: Hand out r = 2048 without comment and let the group discover the zero saving. A computed failure beats a stated rule; only then derive the threshold.
Instructor notes: Answer: factored cost r(d+m) < d·m ⇔ r < d·m/(d+m); with d = m = 4096, r* = 4096/2 = 2048, and at r = 2048 the equality is exact: zero gain. Expected wrong answer: assuming the threshold is d/2 “by luck” — redo it with d = 4096, m = 1024 (r* ≈ 819).
Instructor notes: Have the room compute the r = 1024 row before revealing it, then ask for r* at d = 4096, m = 1024 (≈ 819): the threshold depends on BOTH dimensions, not on a “half” rule.
Instructor notes: Reread the two announcements side by side: “4× compressed cache” and “constant memory”. Ask who budgets what at 524,288 tokens — the harvested budgeting errors are the beat’s content.
Instructor notes: Provoke the error on purpose: take a show of hands on “is MLA fixed-memory?” before revealing 4 GiB → 16 GiB. The vote makes the correction stick.
Instructor notes: Answer: a constant gain — a ÷4 factor on growth that stays linear; the O(n) order is unchanged. Expected wrong answer: “asymptotic, since it is 4× less at every length” — which is precisely the definition of a constant gain. Point to the visual: two straight lines, different coefficients.
Instructor notes: Read the table diagonally: the MLA cell at 524,288 equals the standard cell at 131,072. Then ask: “which row changes if we go to c ÷ 8?” — only the two lines move, never the flat one.
Instructor notes: Show W ≈ AB alone, with no context, and ask: “architecture or adaptation?”. The impossibility of answering without context IS the beat’s lesson — state it explicitly at the end.
Instructor notes: Write W ≈ AB once on the board and have two columns annotated: “trained from scratch / grafted onto frozen”, “immovable / mergeable”. Same algebra, two columns: that is the whole message.
Instructor notes: Answer: the LoRA adapter is removable — a delta beside frozen weights; W_DKV and W_UK are the model’s forward path, removing them breaks it. Expected wrong answer: confusing “LoRA can be merged” (a choice) with “LoRA is required” (false), and the reverse for MLA.
Instructor notes: Hide the column headers and have each cell attributed row by row. Hesitations on “removable?” are the real comprehension diagnostic.
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: For each claim, have the group produce the smallest counterexample before giving the correction.
Instructor notes: Separate verifiable mechanism, reported implementation choice, and experimental result. Evidence precision must match claim precision.
Instructor notes: Answers: d_head ×2 → 256 KiB/token and 32 GiB (quality possibly affected: wider heads); c ÷2 → 16 KiB/token and 2 GiB (quality affected: a tighter reconstruction); length ÷2 → per-token cost UNCHANGED, memory 8 GiB (quality affected only if useful content exceeds the window). Error to harvest: “halving the length halves the per-token cost”. Check that every pair pre-registered before computing. Ten minutes.
Instructor notes: Rebuild the chain without looking at the slides, then fill the ticket in at most six lines. Compare with the opening prediction and name what actually changed.