Interactive Labs

Lab 01: The AI Triad
Step 1 · Read the Scenario
“Our model accuracy dropped 8%. The infra team wants 4× more GPUs. The data team says training data is 18 months old. Who is right?”
— Dr. Priya Mehta, MedVision Health
→
Step 2 · Commit Your Prediction
The team buys 4× more GPUs.
What happens to accuracy?
Improves ~4× (proportional)
Improves modestly (~1.3×)
No change — bottleneck elsewhere
Simulator locked until you predict
→
Step 3 · See What Actually Happens
✔ Correct
The bottleneck is stale data, not compute. 4× GPUs at $120K each = $0 accuracy gain.
D-A-M Diagnostic — ResNet-50
Data
Algorithm
Machine
Binding
Adequate
Surplus
LAB 01 · The AI Triad | PARTS 4 + Synthesis | STATUS ready Click anywhere to launch →
Back to top

Lab 01 is one instance of a pattern that every lab repeats.

How Labs Work

Each lab asks you to test a quantitative result that is often surprising. The design rests on one observation. A student who predicts wrong and then discovers why has learned more than a student who reads a correct answer. The prediction lock makes that possible. You cannot passively watch the simulator; you have to commit first.

The Predict-Discover-Explain Cycle

Every part within every lab follows the same rhythm:

  1. Stakeholder Scenario: A fictional but realistic message from a CTO, VP of Engineering, or ML lead frames a real-world problem, of the kind engineers decide in practice.

  2. Prediction Lock: Before seeing any data, you must commit a structured prediction (multiple choice or numeric estimate). The simulator is locked until you predict. This forces you to surface your assumptions.

  3. Interactive Instruments: Sliders, toggles, and charts powered by the mlsysim physics engine let you explore the design space. Every number traces to a specific textbook claim, with no unexplained constants.

  4. Prediction Reveal: The lab shows you what you predicted versus what actually happened, with specific numbers: “You predicted 2\(\times\). Actual: 50\(\times\). You were off by 25\(\times\).” This gap is the learning moment.

  5. Math Peek: A collapsible accordion reveals the governing equation. You can always see the physics behind the simulator.

Structure of Each Lab

Briefing          ~2 min    Learning objectives, prerequisites, core question
Part A            ~12 min   Calibration --- correct a wrong prior with data
Part B            ~12 min   Deepening --- quantify the mechanism behind Part A
Part C            ~12 min   Cross-context --- same system, different hardware
Part D            ~12 min   Design challenge --- make a decision with trade-offs
Synthesis         ~5 min    Key takeaways, connections, self-assessment

At least one part includes a failure state: push a slider too far and the system crashes (OOM, SLA violation, thermal throttle). These failures are reversible and instructive: the point is to find the boundary, not to punish.

The Design Ledger

Your predictions and design decisions persist across labs in the Design Ledger, a browser-based save system. Lab 08’s training memory budget builds on Lab 05’s activation analysis, which builds on Lab 01’s magnitude calibration. The capstone labs (Lab 16 in Volume I and Lab 17 in Volume II) synthesize your full Design Ledger into a portfolio.

Lab Inventory

Volume I: Foundations

I. Foundations

II. Build

III. Optimize

IV. Deploy

Capstone

Volume II: Scaling

I. Foundations

II. Build

III. Optimize

IV. Deploy

Capstone

Volume IV: Physical AI

Run Offline

Optional: Run Offline

The labs already run in your browser, so nothing needs to be installed. Users who want offline access or want to modify the simulations can install the package:

python3 -m pip install -r labs/requirements.txt
python3 -m pip install -e mlsysim
cd labs
marimo run vol1/lab_01_ml_intro.py

Part of the MLSysBook Ecosystem