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 repeats 34 times. The rest of this page is about the pattern.

How Labs Work

Each lab is a structured confrontation with a quantitative reality that surprises. The pedagogical design rests on a simple observation: a student who predicts wrong and then discovers why has learned more than a student who reads a correct answer. The prediction lock is what 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. These are not toy examples. They are the decisions engineers make every day.

  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 magic 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 each volume) 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

Already running in your browser — nothing to install. Power users who want offline access or want to hack the simulations can optionally grab 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