665 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
195d9d16d4 arxiv update 2026-06-29 09:14:28 -04:00
Vijay Janapa Reddi
85ada0ffa6 Format appendices with 'Appendix' title prefix 2026-06-27 22:28:11 -04:00
Vijay Janapa Reddi
56331eff44 Restore inline bold heading tags 2026-06-27 22:20:53 -04:00
Vijay Janapa Reddi
3f03557b00 Scrub LLM phrasing and rewrite colon-style lists 2026-06-27 22:19:18 -04:00
Vijay Janapa Reddi
23ccbfc460 Update latex references to explicitly say Appendix instead of Section via Cref 2026-06-27 22:06:23 -04:00
Vijay Janapa Reddi
cd6eba80b4 Fix codespell failure in paper.tex 2026-06-27 21:50:07 -04:00
Vijay Janapa Reddi
1dd867ccbb Update mlsysim examples and add 'zoo' transitions to appendices 2026-06-27 21:32:33 -04:00
Vijay Janapa Reddi
2df92fd9d2 Merge dev into fix/site-qa-polish 2026-06-27 09:03:44 -04:00
Vijay Janapa Reddi
c53f3fe238 Site QA polish: finish MLSys.im brand migration, fix broken links, add memory-tier figure
- Complete the MLSYSIM -> MLSys.im display-name migration across mlsysim/docs,
  instructors, and shared config (code identifiers stay lowercase mlsysim)
- Fix broken TinyTorch module links (_ABOUT.html -> .html)
- Route the navbar Subscribe action to the newsletter page so Safari content
  blockers stop hiding the #subscribe anchor
- Add the Accelerator Memory Tiers figure to compute_infrastructure with a
  registry-driven log-log capacity/bandwidth scatter
- Add four sourced cloud accelerator specs (Groq LPU, Graphcore GC200,
  Untether speedAI240, d-Matrix Corsair) feeding the local-SRAM tier
- Remove the unshipped Coming Soon audio-lectures placeholder and related
  Binder/audio references
2026-06-27 08:14:00 -04:00
Vijay Janapa Reddi
c07b37eca6 fix(site): open subscribe modal from navbar CTA 2026-06-24 11:55:00 -04:00
Vijay Janapa Reddi
b933251ac9 docs: backfill missed contributor credits 2026-06-24 07:52:19 -04:00
Vijay Janapa Reddi
08c07f7bed fix: hide MLSysim homepage page toc 2026-06-23 12:13:31 -04:00
Vijay Janapa Reddi
d549068bde fix: preserve site-only release identity 2026-06-23 00:38:44 -04:00
Vijay Janapa Reddi
c2259df1ce fix: clean website preflight issues 2026-06-22 14:34:24 -04:00
Vijay Janapa Reddi
352e5d9135 Merge branch 'dev' into codex/labs 2026-06-13 23:22:19 -04:00
Vijay Janapa Reddi
53c6b9717c Improve MLSysIM paper figures and registry narrative 2026-06-13 22:05:45 -04:00
Vijay Janapa Reddi
dfa696e5b8 mlsysim/paper: fix p24 column gap, tighten abstract, correct PaLM anchor and CoT cost
- Move Figure 5 (design-space heatmap) to its first reference in 6.2 so the
  section-boundary float barrier no longer flushes p24's left column.
- Tighten the abstract from 231 to ~175 words for cleaner progressive disclosure.
- Correct Validation Anchor 4: PaLM-540B ran on 6,144 TPU v4 chips (two pods),
  57.8% HFU vs 46.2% MFU; drop the fabricated 64,000-chip scaling claim.
- Split the chain-of-thought latency multiplier (6.5x) from the cost/fleet
  multiplier (~8x, tracking total decode tokens).
2026-06-13 17:34:53 -04:00
Vijay Janapa Reddi
4d43578482 Redraw model scaling laws figure natively; close all generated figures
Replace the model_scaling raster in sustainable_ai with a matplotlib figure cell generated from published Kaplan et al. (2020) fit constants, now stored as Literature.KaplanScalingLaws with provenance so the figure traces to source-of-truth instead of a traced image.

Convert the remaining 'fig = plt.gcf()' figure cells across seven vol2 chapters (collective_communication, edge_intelligence, fleet_orchestration, ops_scale, performance_engineering, robust_ai, sustainable_ai) to end with plt.show() then plt.close(), matching the book's standard figure-cell convention so every generated figure is explicitly emitted and closed.
2026-06-13 16:52:20 -04:00
Vijay Janapa Reddi
cab96225f7 Merge branch 'dev' into codex/full-audit-signoff 2026-06-13 14:17:02 -04:00
Vijay Janapa Reddi
ba9f8a1bf9 Add appendix cookbook snippets: scorecard, parallelism optimizer, edge/TinyML
Three runnable Tier 1-3 examples extending the appendix cookbook, each with output verified verbatim against the current package and added to the cookbook reference list:
- Scenario F: Scenario.evaluate() three-level scorecard (Feasibility/Performance/Macro) via the pre-built ChatbotServing scenario.
- Scenario G: ParallelismOptimizer design-space search recovering TP=8/PP=2/DP=16 on a 256-GPU cluster with the ranked candidate list.
- Scenario H: a single Engine.solve call spanning datacenter to microcontroller (LeNet1 on ESP32-S3, MobileNet variants on Jetson Orin Nano and Coral).

paper.tex compiles (pdflatex); the only build errors in a fresh worktree are the untracked figure PDFs, which are present in the main checkout.
2026-06-13 14:09:34 -04:00
Vijay Janapa Reddi
634c81098b Merge branch 'dev' into codex/full-audit-signoff 2026-06-13 14:02:13 -04:00
Vijay Janapa Reddi
3636c2b377 Refresh mlsysim paper to match current implementation for arXiv
Audited paper.tex against the live package; the framework description (YAML+pydantic registries, 8 zoos, flop base dimension, instance/tech-class) was already accurate. Updated every drifted number/claim:

- Counts: 116 -> 126 provenance records; 34 -> 37 hardware devices (added V100 PCIe, Jetson Orin Nano, Apple M2 rows to the catalog table); 749 -> 862 test suite; figure caption four -> five invariant checks (matching the five enumerated in the Validation section).
- Executed-listing outputs regenerated from the current solvers: Solver Composition (54.9% / 68.1 day / 15,905,569 USD) and Carbon Accounting (57 days / 110.3 tonnes).
- Validation: Anchor 3 39.6 -> 39.1% MFU. Anchor 7 rewritten -- the ParallelismOptimizer now recovers Meta's TP=8, PP=16 backbone because the optimizer-state-aware memory prescreen (fixed in the mlsysim audit) drives PP=16 (was PP=4); prescreen prose now reads weights+gradients+optimizer state.
- validate_anchors.py: synced PAPER_CLAIMS/REPORTED to the corrected values; Anchor 5 now uses Chinchilla's actual C=5.88e23 (-> 70.0B). Harness reports all seven anchors match.

paper.tex compiles cleanly (pdflatex, no errors).
2026-06-13 13:54:04 -04:00
Vijay Janapa Reddi
83f816f38e Harden percent formatter prose contract 2026-06-13 13:50:38 -04:00
Vijay Janapa Reddi
77db481744 Harden mlsysim composition-layer feasibility checks
- ParallelismOptimizer: include Adam optimizer state in the per-GPU memory
  prescreen (was weights + gradients only), so the search no longer admits
  parallelism splits that OOM the instant optimizer state is allocated;
  activations stay out (the search does not model the microbatch that sizes them)
- SystemEvaluator: the distributed feasibility lens reports SKIPPED with a
  reason instead of a no-op PASS, so the scorecard never claims 'will run'
  without having checked
- TopologyModel: reconcile the bisection-bandwidth comment with the tested
  fat-tree-normalized beta convention (comment-only; value unchanged)
2026-06-13 13:26:28 -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
5b698b5de0 Merge branch 'dev' into codex/labs
# Conflicts:
#	mlsysim/mlsysim/engine/solvers/compression.py
#	mlsysim/tests/test_hardware.py
2026-06-13 10:04:50 -04:00
Vijay Janapa Reddi
8789d68780 Add typed FPS formatter 2026-06-11 23:49:47 -04:00
Vijay Janapa Reddi
9969659b0e Remove stale MLSysIM reference aliases 2026-06-11 20:09:00 -04:00
Vijay Janapa Reddi
fe9f19de92 Update MLSysIM H100 cost golden 2026-06-11 20:02:53 -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
ecdef3c4ae Merge dev into fix/audit-vol2 for retire 2026-06-11 12:58:05 -04:00
Vijay Janapa Reddi
2aafd6009b Add Literature.EdgeInferenceBenchmarks and source the edge scatter (R3)
Adds an EdgeInferenceBenchmarks Python series (8 MLPerf-Tiny / vendor latency-
energy points across MCU/ASIC, edge-accelerator, and edge-GPU tiers) with
provenance, mirroring the ComputeTrend series pattern. @fig-edge-inference-landscape
now builds its device list from the registry instead of inline tuples.
2026-06-11 12:33:04 -04:00
Vijay Janapa Reddi
e2dd7dbd6b Add Literature.ResponsibleAIOverhead registry and pin overhead table (R8)
Adds a Literature.ResponsibleAIOverhead collection (DP, fairness, SHAP, adversarial, federated overheads across accuracy/training/inference/memory) with RESPONSIBLE_AI_OVERHEAD provenance. The @tbl-responsible-ai-overhead cells now source their ranges from the registry instead of hardcoded values.
2026-06-11 12:29:24 -04:00
Vijay Janapa Reddi
a1f6123132 Add Literature.Crypto security-overhead registry and pin security_privacy (R5)
Adds a Literature.Crypto collection (TEE/SGX/TrustZone, FHE, HSM/GPU figures) with
provenance (FHE_OVERHEAD, TEE_HARDWARE_SPECS, HSM_GPU_CRYPTO). Sources the SGX EPC
overflow penalty and FHE overhead multiplier cell scalars from the registry, and
pins the TrustZone/SGX world-switch overhead passage (cycles, derived microseconds,
power) and the HSM-vs-GPU throughput tax (10x, unit-cost range). AES-NI overhead
stays a documented scenario constant; footnote ranges stay narrative.
2026-06-11 12:19:39 -04:00
Vijay Janapa Reddi
1bb43bf086 Add PFS + HBM storage prices to registry and pin data_storage economics (R4)
Adds Infrastructure.Pricing.Storage.ParallelFileSystemPerTbMonth ($30/TB-mo) and
HbmEquivalentPerGb ($15/GB) as illustrative tier rates. Pins the three data_storage
cost passages: HBM-as-storage ($1.5M for 100 TB), storage-induced idle-accelerator
cost ($48K/day, $9.6K/day lost, $288K/run) sourcing the existing Fleet.GpuHourRef
($2/GPU-hr), and PFS tiering savings ($144K/yr).
2026-06-11 12:09:53 -04:00
Vijay Janapa Reddi
f006eca6ed Fix A100 embodied-carbon source bug and align registry to Luccioni 150 kg (R6)
The 64-A100 training-emissions cells (TrainingEmissions, TrainingEmbodiedRecap)
read Hardware.Cloud.H100.embodied_carbon_kg (164) for an A100 run. Point them at
Hardware.Cloud.A100, and update the registry A100 value 130 -> 150 kg to match the
Luccioni et al. 2023 figure the chapter already cites. Registry, cells, and prose
now agree: 150 kg/A100, ~9.6 t unamortized, ~92 kg amortized for the 14-day run.
2026-06-11 11:54:16 -04:00
Vijay Janapa Reddi
1006540d84 Add A100 MIG profiles to registry and pin fleet_orchestration table (R2)
Adds a MigProfile schema + Hardware.Cloud.A100.mig_profiles (1g.10gb..7g.80gb,
GPU memory + SM count) sourced to the NVIDIA MIG User Guide. The A100-80GB MIG
profile table in fleet_orchestration (w1A-004) now pulls its GPU-memory and
SM-count cells from the registry instead of hardcoded values.
2026-06-11 11:40:16 -04:00
Vijay Janapa Reddi
6b1144c88a Add HBM soft-error FIT/Mbit to registry and pin fault_tolerance budget (R1)
Adds Systems.Reliability.Hbm.soft_error_fit_per_mbit = 250 FIT/Mbit, sourced
to a new HBM_SOFT_ERROR_FIT_PER_MBIT provenance entry citing the published
200-5000 FIT/Mbit DRAM soft-error range (Tezzaron; soft-error literature). A
field validator guards that band so a units/transcription slip cannot land.

Pins fault_tolerance w1A-003: the unprotected-HBM soft-error budget (250 FIT/Mbit
x 1,024 x A100 HBM -> aggregate FIT -> ~20 s mean time to first corruption) now
flows from a HbmSerBudget LEGO cell instead of hardcoded prose literals.
2026-06-11 11:33:36 -04:00
Vijay Janapa Reddi
6ed5bfde7d Reuse mlsysim 4K/RGB registry constants in locality worked example
Add VIDEO_4K_WIDTH/HEIGHT to mlsysim core/units.py and import them
(with VIDEO_BYTES_PER_PIXEL_RGB) into the DataLocalityInvariant LEGO
cell, matching the sibling BandwidthBottleneck cell that already pulls
1080p dimensions from the registry. Genuinely scenario-specific inputs
(broadband uplink, cloud latency, fps) stay local and documented.
Document the 4K parameters in the appendix scale-references table.
Rendered values unchanged (24.9 MB frame, 1990.7 ms vs 110 ms).
2026-06-11 09:28:29 -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
1bc3778863 training: source GPT-2 heads + GPT-2 Small specs from registry
- swap hardcoded GPT-2 XL heads=25 to Models.Language.GPT2.heads
- add GPT2_Small (124M, 12 layers, 768 hidden, 12 heads) to the model
  registry with Radford 2019 provenance; attention-intensity cell now sources
  hidden_dim/heads from it (values identical, mlsysim suite 814 passed)
2026-06-10 20:23:33 -04:00
Vijay Janapa Reddi
b3f29b3571 registry+ml_workflow: add ImageNet full_examples (14.2M), pin transfer-learning prose
- Add full_examples field to DatasetProfile + Datasets.ImageNet (14,197,122,
  web-verified vs Deng 2009) distinct from training_examples (ILSVRC-1k, 1.28M)
- Pin both 'ImageNet 14 million images' refs to ImageNetCorpus cell (now 14.2M from registry) (w1A-vol1-ml_workflow-005)
2026-06-10 17:48:04 -04:00
Vijay Janapa Reddi
112dcd9be0 registry+ml_workflow: add Literature.Surveys (CrowdFlower 2016), wire DataScientistTime
- Add Literature.Surveys group with the six CrowdFlower 2016 time-allocation
  buckets (60/19/9/3/4/5), verified against the primary report (page 6 chart),
  with provenance URL + new CROWDFLOWER_2016 key.
- DataScientistTime cell LOAD now reads buckets from Literature.Surveys instead of
  hardcoding them; identical values, GUARD sum=100 holds. (w1A-vol1-ml_workflow-006)
2026-06-10 17:34:11 -04:00
Vijay Janapa Reddi
9eba03714d registry+ml_workflow: add Jetson Orin Nano, pin Jetson family footnote
- Add Hardware.Edge.JetsonOrinNano (8GB module, 40 TOPS sparse INT8, 8GB LPDDR5
  68 GB/s, 7-15W) web-verified vs NVIDIA Jetson Orin datasheet (original 2023 era)
- Add tdp_min/tdp_max (10-25W) to JetsonOrinNX so the family TDP ranges are registry-backed
- Pin Jetson edge-tradeoff footnote: family TDP spectrum + Nano memory via JetsonSpecs cell (w1A-vol1-ml_workflow-001)
2026-06-10 17:29:08 -04:00
Vijay Janapa Reddi
9419506517 registry+responsible_engr: add Literature.Fairness (Gender Shades), wire into cell
- Add Literature.Fairness group (Buolamwini & Gebru 2018) with the four
  intersectional error rates (0.8/7.1/12.0/34.7 percent), web-verified, with
  provenance URL (PMLR v81). New GENDER_SHADES provenance key.
- GenderShadesDisparity cell now reads err rates from Literature.Fairness instead
  of hardcoding them; identical derived values (disparity 43.375, acc 99.2/65.3).
  (w1A-vol1-responsible_engr-007)
2026-06-10 17:12:08 -04:00
Vijay Janapa Reddi
569ca6c35f registry+model_serving: add V100 PCIe, pin resolution-bottleneck caption
- Add Hardware.Cloud.V100_PCIe (14 TFLOP/s FP32, 112 tensor, 250W, 900 GB/s,
  32GB HBM2) verified vs NVIDIA Volta V100 datasheet; SXM2 stays Hardware.Cloud.V100
- Derive ridge point from V100_PCIe (FP32/bandwidth) instead of hardcoded 16
- Pin caption FP32 (PCIe 14 / SXM2 15.7) + bandwidth (900) via {python} (w1A-vol1-model_serving-005/w1B-vol1-model_serving-003)
2026-06-10 17:00:54 -04:00
Vijay Janapa Reddi
b942939520 registry: upgrade Apple M2 ANE provenance to Apple-official (verified 15.8 TOPS)
Verified against Apple newsroom (June 6, 2022): 16-core Neural Engine = 15.8
trillion ops/sec, 100 GB/s unified memory. Provenance kind estimate -> datasheet
with official Apple URL. Value unchanged.
2026-06-10 16:58:50 -04:00
Vijay Janapa Reddi
f96ac3c31c registry: document ResNet-50 inference_flops convention (4.1 GMAC vs He et al. 3.8)
The 4.1 GFLOP value (modern MAC count, torchvision/fvcore ~4.09 GMAC) is the
book-wide figure (nn_architectures GFLOP guards, frameworks, roofline tutorial).
Provenance previously cited He et al. (2016) whose Table 1 reports 3.8e9 under
their counting; add a notes field documenting the convention so value and citation
no longer appear to contradict. Value unchanged.
2026-06-10 16:46:26 -04:00
Vijay Janapa Reddi
6af4dae95e registry+benchmarking: add Apple M2 Neural Engine, pin TOPS footnote
- Add Hardware.Mobile.AppleM2 (15.8 TOPS, 16-core Neural Engine, provenance=estimate)
- Pin TOPS footnote: Apple M2 ANE (15.8) + Edge TPU=Coral (4) to registry via TopsFootnoteAnchor (w1B-vol1-benchmarking-006)
2026-06-10 16:36:13 -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