657 Commits
Author SHA1 Message Date
Vijay Janapa Reddi 75c25583ee fix(vol1): correct camera-ready technical content 2026-07-15 06:37:14 +02:00
Vijay Janapa Reddi e4a2e40a82 Remove research-questions callouts, fix ml_ops cascade figure, standardize figure font
Builds on the PR #1957 merge (Zeljko's Vol1 layout), otherwise byte-for-byte his version:

- Remove the end-of-chapter research-questions callouts from all chapters.
- ml_ops correction-cascade figure: keep Zeljko's Model A-D chain TikZ drawing,
  and rewrite the caption, alt-text, and lead-in to describe the chain (they
  carried a stale 'timeline' description that no longer matched the figure),
  plus an operations-impact line.
- Standardize the matplotlib figure font on a bundled TeX Gyre Heros (a free,
  redistributable Helvetica-metric clone) registered at runtime in
  book/tools/figures/style.py, so figures render with a real bold identically
  on macOS, Linux, and CI instead of falling back to DejaVu Sans or an
  unreachable macOS .ttc bold face.
2026-07-12 15:29:07 +02:00
Vijay Janapa Reddi 74f9ae3f14 Audit napkin math assumptions 2026-06-26 19:20:13 -04:00
Vijay Janapa Reddi e3e16d3514 Handle version names in spurious zero audit 2026-06-21 14:27:52 -04:00
Vijay Janapa Reddi 04a316b967 chore(audit): refresh citation and abbreviation state 2026-06-19 08:12:24 -04:00
Vijay Janapa Reddi 6f3c6ccc11 Accept reviewed duplicate citation density hits 2026-06-18 07:12:08 -04:00
Vijay Janapa Reddi 23c4b3cb8d Clarify duplicate citation density audit 2026-06-18 07:01:00 -04:00
Vijay Janapa Reddi 99a93f5573 Clarify longtable render-review guidance 2026-06-17 23:08:05 -04:00
Vijay Janapa Reddi 32c3632f76 Avoid duplicate-citation warnings for uppercase xrefs 2026-06-17 22:56:51 -04:00
Vijay Janapa Reddi 4ca8f77b1a Expand first-use abbreviations across audit scope 2026-06-17 22:53:59 -04:00
Vijay Janapa Reddi 022e7af2ec Resolve H3 sentence-case audit findings 2026-06-17 22:32:43 -04:00
Vijay Janapa Reddi be58ac3eac Avoid false math percent warnings across spans 2026-06-17 22:27:29 -04:00
Vijay Janapa Reddi 07726de9cb layout: add Purpose-overflow check (catch Purpose spilling past opener page)
New book/tools/audit/check_purpose_overflow.py: for each teaching chapter,
locates in the built PDF the page holding the Purpose hook and the page
holding the paragraph's last words; flags any chapter whose Purpose ends on
a later page than it starts. Uses plain pdftotext (the -layout mode
interleaves margin-stack/running-header labels into the paragraph and breaks
matching), normalizes curly quotes/em-dashes, falls back to shorter anchors.

Wired into preflight.sh as step 5. Run per volume:
  python3 book/tools/audit/check_purpose_overflow.py <pdf> --vol vol1
2026-06-17 08:56:53 -04:00
Vijay Janapa Reddi d7c8a82a77 Merge branch 'dev' into chore/betterbib-june
# Conflicts:
#	book/quarto/contents/vol1/benchmarking/benchmarking.qmd
#	book/quarto/contents/vol1/conclusion/conclusion.qmd
#	book/quarto/contents/vol1/data_engineering/data_engineering.qmd
#	book/quarto/contents/vol1/introduction/introduction.qmd
#	book/quarto/contents/vol1/model_serving/model_serving.qmd
#	book/quarto/contents/vol1/nn_architectures/nn_architectures.qmd
#	book/quarto/contents/vol2/collective_communication/collective_communication.qmd
#	book/quarto/contents/vol2/network_fabrics/network_fabrics.qmd
#	book/quarto/contents/vol2/sustainable_ai/sustainable_ai.qmd
2026-06-14 19:52:18 -04:00
Vijay Janapa Reddi 45aeb6b026 Audit citations and consolidate bibliography 2026-06-14 19:41:26 -04:00
Vijay Janapa Reddi 7619971e9b Fix LEGO prose percent outputs 2026-06-13 14:31:34 -04:00
Vijay Janapa Reddi 4fc7a32fd3 Fix fp32 precision-key resolution on H100/H200
resolve_precision('fp32') yields key 'fp32', which was absent from the H100/H200 precision_flops map (stored as 'fp32_cuda' = 67 TFLOP/s), so Engine.solve fell through to peak_flops (989, the FP16 dense rate) -- a ~15x FP32 overestimate reachable by no precision string.

- Rename precision_flops key fp32_cuda -> fp32 on H100 and H200 (value 67 TFLOP/s unchanged)
- Propagate the rename to every consumer, value-preserving: 2 LEGO cells
  (compute_infrastructure, appendix_assumptions), 2 mlsysim_constants audit
  manifests, and the migrate-constants map
- Add test_hardware guards: precision-vocabulary check (no canonical precision
  aliased away) + H100/H200 fp32 -> 67 regression
2026-06-13 13:25:28 -04:00
Vijay Janapa Reddi 82333ce12a Improve chapter opening flow 2026-06-13 09:13:13 -04:00
Vijay Janapa Reddi 535a8ef5a0 Edit chapter objectives and takeaways 2026-06-13 08:31:23 -04:00
Vijay Janapa Reddi 65946a02fe Polish Vol II SVG figures 2026-06-12 11:13:55 -04:00
Vijay Janapa Reddi 7c54ec64ea Fix artifact exposition bridges 2026-06-12 10:39:57 -04:00
Vijay Janapa Reddi 449d27691d Fix margin and footnote audit findings 2026-06-12 09:59:53 -04:00
Vijay Janapa Reddi d4b65cc7fb Integrate progressive audit prose fixes 2026-06-12 09:30:26 -04:00
Vijay Janapa Reddi 69794c0aa5 Merge branch 'fix/audit-integration' into dev 2026-06-12 06:34:33 -04:00
Vijay Janapa Reddi 6da8d947d2 Record chapter PDF audit ledger 2026-06-12 06:00:07 -04:00
Vijay Janapa Reddi 48048175a6 Record visual-language audit packet 2026-06-12 05:40:47 -04:00
Vijay Janapa Reddi 7149d19bbf Tighten table exposition 2026-06-12 05:15:18 -04:00
Vijay Janapa Reddi d8ad80adfb Record audit decision packets 2026-06-12 04:54:56 -04:00
Vijay Janapa Reddi e26b6e145b Remove LEGO header import-export bookkeeping 2026-06-12 04:49:48 -04:00
Vijay Janapa Reddi 8bb0840bd5 Tighten paragraph flow and LEGO formatting 2026-06-12 03:36:34 -04:00
Vijay Janapa Reddi 860955c510 Tighten chapter audit layout and prose gates 2026-06-12 02:32:07 -04:00
Vijay Janapa Reddi efab848914 layout: add two-phase auto layout planner 2026-06-11 20:55:44 -04:00
Vijay Janapa Reddi 30ce4e5592 Fix ML systems Jetson power source 2026-06-11 18:26:02 -04:00
Vijay Janapa Reddi 47f0c9744f Fix vol1 indexed prose audit precision 2026-06-11 17:43:09 -04:00
Vijay Janapa Reddi bd40d3950f Merge branch 'dev' into feat/auto-margin-layout 2026-06-11 16:12:53 -04:00
Vijay Janapa Reddi ae6506bfa2 Merge fix/rules-cleanup into dev 2026-06-11 16:10:36 -04:00
Vijay Janapa Reddi c6d214fe80 chore(audit): remove local MIT Press path assumptions 2026-06-11 16:09:10 -04:00
Vijay Janapa Reddi 42af2615cf chore: remove stale cleanup artifacts 2026-06-11 16:06:55 -04:00
Vijay Janapa Reddi 7fb69d277b chore(audit): preserve content-form mismatch audit 2026-06-11 14:52:51 -04:00
Vijay Janapa Reddi 92f9165d03 fix(book): harden LEGO formatting across volumes
Add native Binder checks for LEGO formatting/unit/prose contracts, extend mlsysim formatter helpers, and normalize Vol1/Vol2 LEGO output strings through typed formatters.

Validate precision-sensitive prose rendering across both volumes and promote direct math/string assembly to fmt_math, fmt_display_math, fmt_text, and domain-specific helpers.
2026-06-11 14:36:35 -04:00
Vijay Janapa Reddi 2e3b6e6523 Merge branch 'dev' into fix/audit-vol1 2026-06-10 22:30:43 -04:00
Vijay Janapa Reddi 69d9002ed7 Add registry value-validation guards for model specs (audit task #15)
Hardware specs already get sanity-bounds protection in
test_physics_bounds.py (catching an 80 TB/s typo for 80 GB/s), but
registered model specs had no equivalent guard: a transposed parameter
count (124M typed as 421M) or a decimal slip (124 typed as 12.4) in a
registry YAML would bind silently.

Two layers now protect every TransformerWorkload:
- test_transformer_attention_geometry: universal invariant that
  hidden_dim splits evenly into heads with a 32-256 head dim and is a
  multiple of 64 (catches transposed hidden_dim/heads across all 13
  registered transformers).
- test_transformer_curated_specs: a curated, web-verified spec table
  (seeded with GPT-2 Small, Radford 2019) that fails CI when a registry
  value diverges >1% from its verified figure. Extend the table whenever
  a new model spec is registered.

Wire GPT2_Small into the two chapter-side checks so its specs cannot be
hardcoded into a LEGO cell: CANONICAL in audit_mlsysim_drift.py and
HARDCODED_REGISTRY in book_check_registry_sources.py.

Verified the guard fires: transposing 124M to 421M fails the curated
test, and swapping hidden_dim/heads fails the geometry invariant.
2026-06-10 21:24:09 -04:00
Vijay Janapa Reddi efde57313e feat(audit): add body-prose emphasis audit pipeline (extract → ap2map → rollup)
Three-phase standalone audit tooling under book/tools/audit/:
- emphasis_extract.py: emit body-prose bold/italic spans, skipping code,
  math, callouts, footnotes, headings, tables, captions (READ-ONLY).
- emphasis_ap2map.py: volume-wide bold occurrence map; flags terms bolded
  in >=2 chapters (AP2 duplicate first-definition candidates), canonical
  chapter order from the PDF config.
- emphasis_rollup.py: roll per-chapter agent ledgers under
  .claude/_reviews/emphasis/ into a volume summary + actionable fix-list.

Ad-hoc audit tooling for now; candidate to fold into Binder as a
'check emphasis' group once it becomes a commit gate.
2026-06-10 17:17:55 -04:00
Vijay Janapa Reddi 42dc55e6c6 fix(lint-lego-units): report L016 at the real line, not offset // 80
The L016 runner computed its line number as base_line + match.start() // 80,
a magic 'cols per line' guess that pointed authors at the wrong line. Count
actual newlines like the sibling L014 runner does.
2026-06-10 16:55:38 -04:00
Vijay Janapa Reddi 8454a8551c Merge remote-tracking branch 'origin/dev' into origin-pull-merge 2026-06-10 16:01:10 -04:00
Vijay Janapa ReddiandGitHub e9edeeafa4 Merge #1832: upgrade MiniMax caption example to M3 default
feat(captions): upgrade MiniMax example to M3 default
2026-06-10 15:36:09 -04:00
Vijay Janapa Reddi 2160280ee6 fix(mlsysim): make interconnect direction convention explicit; feed per-direction beta
NVIDIA quotes NVLink (and Google quotes TPU ICI) as bidirectional totals,
while PCIe and fabric entries store per-direction rates — two conventions
under one field name, undeclared. IOInterconnect now carries an explicit
direction field ('per_direction' default; 'bidirectional_total' tagged on
all NVLink/ICI YAML entries) and a bandwidth_per_direction accessor.
Systems.Nodes intra_node_bw now feeds the per-direction rate (H100 450,
A100 300, B200 900 GB/s) into the collective beta terms — previously the
bidirectional total made every intra-node-bound allreduce/TP latency ~2x
optimistic. Stored datasheet figures are unchanged, so spec displays keep
the familiar marketing numbers.

Distributed golden re-pinned to the corrected physics (tp comm 267->535 ms,
scaling efficiency 0.809->0.761 on the Llama3-8B/Research_256 case); new
convention test pins the tagging and accessor; drift auditor gains
per-direction entries.

Audit 2026-06-09, findings_provenance.md M1/M2. Ruling: VJ 2026-06-10.
2026-06-10 08:58:11 -04:00
Vijay Janapa Reddi 3becfa7e9c check(audit): grow mlsysim-drift CANONICAL with classes caught by the 2026-06 audit
Adds the literal classes the overnight audit found contradicting or
shadowing the registry — NVMe Gen4 latency/bandwidth, pluggable-optics
power, GPU MTTF, GDDR6X bandwidth, TPU v5p bandwidth, DS-CNN parameters,
GPT-4 parameter count, LeNet-1 parameters, H100 purchase price — so the
patterns cannot quietly return. Per the 'catch a mistake, add a check'
rule; each entry carries a note naming the incident.
2026-06-10 00:52:48 -04:00
Vijay Janapa Reddi 195f246e67 chore: remove float-exposition audit scratch (keep scanner + standard)
Per-chapter worklists and rollups were one-run output: findings were
already applied or refuted, and regenerate from scan_floats.py. Keep
only the reusable tool and the grading rubric.
2026-06-09 23:42:30 -04:00
Vijay Janapa Reddi 4e4a4f61ca docs: tighten float lead-outs across seven chapters + add audit tooling
Prose: add the missing interpret move to eight figure, table, listing, and
equation references so body prose carries each float's takeaway without leaning
on the caption, per the float-exposition standard. Includes one mismatched-claim
fix: robust_ai cited the adversarial-googlenet figure against its own content.

Tooling: book/tools/audit/float_explanation/ -- the float-exposition scanner,
grading standard, per-chapter worklists, rollups, and the campaign record.
2026-06-09 23:32:55 -04:00