Trim trailing whitespace, fix EOF newlines, collapse blank lines, and align
pipe tables in appendices A-E that the pre-commit hooks flag. Content unchanged.
The release pill assigned a data-link attribute straight to a.href, which
CodeQL flags as DOM XSS (js/xss-through-dom). Add a scheme allowlist so only
anchor, relative, and http(s) links pass; anything else such as javascript:
or data: falls back to #release.
Merged dev branch to main for publication.
Release Type: patch
Published by: profvjreddi
Dev Commit: origin/dev
Specific Commit: latest dev
Description: Vol II content updates
The Subscribe link (desktop and mobile) targeted a non-existent #subscribe
anchor. Point both at https://mlsysbook.ai/newsletter/, matching the canonical
shared/config/navbar-common.yml, which documents why an internal #subscribe
anchor is avoided (Safari content blockers hide anchors containing 'subscribe').
Fixes#1844.
Module 06's test_unit_broadcast_gradients ran Tensor(data, requires_grad=True)
before enable_autograd() upgrades the constructor to accept it, so the exported
notebook cell raised TypeError. Match the sibling test_unit_function_classes
convention and set requires_grad as an attribute instead; the constructor stays
minimal by design. Fixes#1893.
Napkin gate tighten pass (audit 2026-07-02), vol2 half:
- compute_infrastructure: H100-vs-H200 solver speedup now bracketed by a
visible HBM bandwidth ratio (4.8/3.35 ~ 1.4x) with a guard that the
solver tracks the ratio within 10 percent
- ops_scale: two-proportion sample-size formula surfaced with plug-in
reproducing the 2,207-sample requirement (cell already computed it)
- performance_engineering: MFU formula displayed with the fleet plug-in
(14.9 PFLOP / (128 x 989 TFLOP/s x 245 ms) ~ 48 percent) before the tax
ratio
All new operands exported with typed fmt_* helpers; no existing values
changed.
Napkin gate tighten pass (audit 2026-07-02): each box had a real estimate
whose key arithmetic was computed only in the echo:false LEGO cell or
asserted outright. The combining arithmetic is now visible in the box via
inline refs; new operands exported with typed fmt_* helpers, no hand-typed
literals, no existing values changed.
- ml_systems: TCO break-even division, board-sizing chain (derate ->
divide -> round up), thermal 12/4=3 W counterfactual vs ceiling (trace
steps reframed as scenario assumptions)
- ml_workflow: payback = capex / annual savings shown
- training: speedup division + time/cost subtractions shown; 1.7x wall-clock
vs 2.4x throughput gap surfaced honestly (schedule includes unaccelerated
work) instead of implied consistency
- model_compression: A100 INT8/FP16 spec operands (624 TOPS / 312 TFLOP/s)
shown for the 2x
- model_serving: JSON-vs-Protobuf half-a-core chain shown; batching box
gains a worked representative row reusing the table's own exports
- ml_ops: observability volumes derived visibly (rate x payload / interval)
The Four Deployment Paradigms callout stated a 10^5 memory / 10^6 compute gap
between Cloud and TinyML, but Table 1.5 carried only qualitative envelope
descriptions, so the Observation could not be read off the table.
Add per-tier order-of-magnitude anchors (bytes for memory, base ops/s for
compute) to the Memory and Compute columns, all derived from the same MLSysIM
tiers and hardware twins that already computed the span. The Cloud-to-TinyML
endpoints now visibly produce the 10^5 / 10^6 span, and a new guard locks those
endpoints to the cited span so the table and the Observation cannot silently
diverge. Reword the Observation to read the span off the columns rather than
assert it.
Napkin Math audit (2026-07-02, 218 boxes): these boxes are profile tables,
qualitative comparisons, traces, or conceptual arguments — not redoable
estimates — so they move to the type their content promises:
- 12 -> .callout-perspective (budget/profile tables, asserted-benchmark
comparisons, conceptual arguments); Problem-question openers rewritten
declaratively per the perspective register
- 5 -> .callout-example (scenario walkthroughs, worked formula, trace)
IDs renamed nbk- -> psp-/exmp- (slugs unchanged); all refs swept; tables,
LEGO cells, and computed values untouched. Gate now documented in
.claude/rules/callouts.md (napkin gate).
site/newsletter/posts/ is auto-generated from Buttondown (sync-newsletter.yml) and uses intentional 2-space markdown hard line breaks. The trailing-whitespace hook was stripping those and failing CI on the full-repo run (the posts bypass the local pre-commit gate on their automated commit). Exclude the auto-synced posts dir from trailing-whitespace + end-of-file-fixer so future syncs do not break dev CI.
Collapse blank lines and trim trailing whitespace surfaced after the origin merge, and use the book's prose-division glyph (÷) for the prefill TTFT calc (1000 tokens ÷ 10,000 tokens/s), matching the convention used in benchmarking and clearing a spaced-slash false-positive.
Worked-calc percent glyphs across 6 chapters (fmt_math), plus the benchmarking Step-4 achievable-perf numeric fix (perf_b32 = util x FP16 peak + guard). Rendered-HTML verified: glyph on calc lines, word in narrative, all read correctly.
Render the shown-division result with the math % glyph (fmt_math), matching the other worked-calc lines on this branch; verified in the rendered HTML (= 39.8%. reads cleanly mid-sentence). Found by the book-wide sweep.
The Actual/Peak roofline derivation rendered its result with the prose word ("~ N percent"); render it with the math % glyph (fmt_math), matching the Step-3/Step-4 benchmarking treatment. The narrative reuse a few lines later keeps the word. Found by a book-wide sweep for the same pattern.
In data_selection (ROI), distributed_training (comm overhead), and fleet_orchestration (checkpoint overhead + the queue-wait throughput bullets), percentages consumed inside worked-calculation lines now render with the math % glyph instead of the prose word, per the MIT Press sentence-vs-data rule. Prose twins are kept for narrative sentences.
Step 4 displayed "perf ~ 85% x 312 TFLOP/s = <value>" but computed the value from p_b32.throughput (solved at fp32, ~19.5 TFLOP/s peak), yielding 16.5 TFLOP/s -- a self-contradictory identity. Compute perf_b32 from the displayed identity (util_peak x FP16 peak = 0.85 x 312 = 265.2) and add a guard that batch-32 perf must exceed batch-1 perf.
Render the Step-3/Step-4 worked-calc percentages with the math % glyph (fmt_math) instead of the prose word, keeping the prose twins for narrative sentences.