- Fix rendering: dimensions (e.g. 224×224) use single math span $N\times M$
- Revert multipliers to N$\times$ / N--M$\times$ per LaTeX convention
- Fix malformed $N\times$ M → $N\times M$ across vol1/vol2
- Add revert_times_multipliers.py (one-off) and fix_times_math.py (dimension-only)
- Update book-prose guidelines in .claude/rules (dimension vs multiplier)
Introduces a set of constants to ensure consistency across the book's code and prose.
These constants include:
- Memory capacities, interconnect bandwidths, model sizes
- Useful measures (GiB, GB, second, etc.)
- Formatting tools
- Deployment tiers (cloud, edge, mobile)
Refactors various sections to utilize centralized constants and formatting functions, improving code maintainability and consistency across the book.
Specifically:
- Replaces hardcoded values with constants defined in `mlsys.constants`.
- Uses the `fmt` function for consistent number formatting.
- Removes redundant calculations and string conversions by leveraging existing functions and constants.
- Introduces a `TransformerScaling` namespace to encapsulate transformer scaling logic.
- Adds invariants (guardrails) to ensure calculations match the book's narrative.
- Refactors MNIST example and moves the inference calculation to MNISTInference.
- Integrates responsible AI principles with lifecycle stages.
This reduces code duplication and ensures a unified representation of key parameters and calculations throughout the book.
- Replace recap-style openers (Having established… we now turn to)
- Replace section meta-openers (This section examines/presents…) with concrete openings
- Remove announcement transitions (We will examine, we now turn to)
- Remove Importantly/Most importantly at sentence start
- Remove In summary, bleeding edge, the lesson is clear
- Replace leverage/utilize (verb) with use; keep high-leverage
- Replace building upon with building on; remove as noted there
- Sample fixes: can't→can we not, it's→it is, So,→Thus, (contractions/sentence-openers)
Adds missing citations and clarifies the text in the appendix on machine learning,
specifically around the energy hierarchy and scaling laws. It also updates the
fault tolerance section to include a reference to the backpropagation paper.
- book-prose: allow compound × for simple products; require × alone only when
followed by word/unit; Unicode × only in fig-alt
- Revert split × back to compound (e.g. $3 \times 10^{-4}$)
- data_engineering: 8× A100 → 8$\times$ A100 (LaTeX in table)
- appendix_dam: Python outputs use LaTeX ×
- hw_acceleration: table dimensions use compound math ($4\times4\times4$)
- benchmarking: fix Python equation string
Ensures cover images in Vol. 2 chapters fill the available width, improving visual presentation across different screen sizes.
Removes duplicate cover image from the introduction chapter.
Corrects a typographical error in Appendix Machine regarding energy ratios.
Refactors the build process to leverage shared output file resolution logic, ensuring consistency across build and debug commands.
Improves validation by streamlining bibliography handling and adding stricter citation matching.
Updates diagram dependencies and adjusts content for clarity and accuracy.
Figures should have caption only in fig-cap attribute, not duplicated
as trailing text. Removed redundant captions from:
- introduction.qmd: fig-loss-vs-n-d, fig-data-scaling-regimes, fig-scaling-regimes
- sustainable_ai.qmd: fig-datacenter-energy-usage
- Vol2 PDF: remove half-title, disable lof/lot/lol, toc/number-depth 2, align titlepage
- Vol2 about.qmd: add Beyond This Book and Using This Book supplementary blocks
Replace four distinct colors (Brown, Blue, Green, Red) with ETHZ Blue
intensity gradient (25%→50%→75%→100%) in fig-fleet-stack and
fig-vol2-roadmap, matching vol1 mlsysstack crimson gradient pattern.
- Vol 2: reference/citation at document end, sky-blue logo, cover image position
- Vol 1: match cover image position (bg-image-left 0.175, bg-image-bottom 8)
- Add recolor_cover_logo.py for hue-shift variants of cover logo
- Wrap Python figures in div with fig-env, fig-pos, fig-cap, fig-alt
- Remove #| label from blocks when div has #fig-xxx
- Add responsive figure CSS (max-width, height: auto) for HTML
- Add figure headers to Python blocks (Context, Goal, Show, How, Imports, Exports)
- Add Lua filter to convert <br> in table cells to \makecell for PDF
- Use pipe table with • and <br> in hw_acceleration hardware evolution table
- Add makecell package; set arraystretch to 1.6; top-align makecell cells
- Register filter in PDF config
Add Context/Goal/Show/How/Imports/Exports headers to all Python figure
blocks (#| label: fig-*) in Vol 1 and Vol 2, matching the setup-block
pattern. Headers placed after Quarto options and before imports.
- extension.ts: wrap activate() body in try/catch so activation failures
surface in the Output channel instead of crashing silently
- workspace.ts: return undefined when no book/binder marker is found
instead of returning the first workspace folder unconditionally
After the class-based namespace isolation pass, missing EXPORTS bridge
variables were discovered by running all chapters through the HTML build pipeline.
Vol1 fixes:
- nn_computation: add hog_grid_str/hog_bins_str exports; convert generator
expressions to for-loops (Python 3 class scope skips class namespace);
add mnist_large/small_l1/l2 exports for footnote inline Python
- ml_systems: add cloud_compute/memory/ai_frac, mobile_tops/bw/ratio/
bottleneck/compute/memory_frac, cloud_thresh_bw_str, edge_thresh_bw_str
exports; complete ResnetMobile EXPORTS section
- data_selection: fix FpScalingCalc invariant (min_samples_threshold 50→150
so 100 expected rare samples < 150 threshold holds true)
- model_compression: FusionCalc bandwidth_reduction invariant 50→40%
- nn_architectures: add 'param' unit to lighthouse-table-specs imports
Vol2 fixes:
- data_storage: add missing 'watt' import to chapter setup cell
- fault_tolerance: export per_node_gbs raw float for prose arithmetic
- appendix_fleet: export rho_7b raw float for fmt() call in prose
- appendix_c3: add .magnitude to calc_effective_flops() result (returns
Quantity since formulas.py upgrade, not raw float)
- appendix_reliability: wrap worked-example-young-daly in class with EXPORTS
All 43 chapters with Python cells verified passing after fixes.