Skip to main content

Tutorials

Learn ML systems reasoning through the 22 Systems Walls.

These tutorials teach quantitative reasoning about ML infrastructure using MLSys·im, the first-principles analytical modeling framework behind the Machine Learning Systems textbook. They are organized by the six domains of the 22 Systems Walls taxonomy.

Each tutorial answers one question. Start at the beginning for a guided path, jump to any domain of interest, or open the Textbook & Chapter Map to browse tutorials by textbook chapter, study sheet, and lecture deck.

TipHow to Use These Tutorials
  • Every tutorial runs on a laptop in under 30 seconds. No GPU required.
  • Code cells are executable. Clone the repo and run them, or follow along on the website.
  • Every walkthrough pairs first-principles formulas with live solver output. Compare analytical bounds directly against evaluated system profiles.
  • Tutorials within a cluster build on each other, but clusters are largely independent.
  • Time estimates cover reading the walkthrough and running the code cells.

Start Here

Before starting any domain, complete this introduction to the roofline model.


Cluster 1: Node (Walls 1–7)

One accelerator, one model. Where is the ceiling?

These tutorials explore the walls that constrain a single accelerator: compute throughput (Wall 1), memory bandwidth (Wall 2), software efficiency (Wall 3), two-phase serving (Wall 4), KV-cache batching (Wall 5), weight streaming (Wall 6), and tail-latency queueing (Wall 7). Understanding which wall binds, and why, is the most fundamental skill in ML systems reasoning.


Cluster 2: Data (Walls 8–10)

The GPU is fast. Is the pipeline faster?

Even the fastest accelerator sits idle if the data pipeline cannot keep up. These walls cover ingestion (Wall 8), transformation (Wall 9), and network locality & topology (Wall 10).


Cluster 3: Algorithm (Walls 11–13)

Can I make the model smaller or the training cheaper?

These walls govern scaling laws (Wall 11), inference-time reasoning (Wall 12), and compression and quantization fidelity (Wall 13).


Cluster 4: Fleet (Walls 14–16)

Scaling past one machine. Where does efficiency go?

Distributed training introduces three fleet-level walls: collective communication (Wall 14), hardware fragility and reliability (Wall 15), and multi-tenant queueing (Wall 16).


Cluster 5: Ops (Walls 17–20)

What does it cost, in dollars, carbon, and water?

Operational walls cover capital TCO (Wall 17), sustainability (Wall 18), checkpoint I/O (Wall 19), and privacy & safety (Wall 20). These are the walls that determine whether a technically feasible system is actually deployable.


Cluster 6: Analysis (Walls 21–22)

Cross-cutting diagnostics. Which knob matters most?

These walls provide the tools for sensitivity analysis (Wall 21) and synthesis (Wall 22): the ability to ask “what if?” and “what must be true?”


Cluster 7: Capstone

Compose everything. All 22 walls, one analysis.


Extending MLSys·im


Learning Paths

Choose a path by role:

Path A: First-Time Learner (~ 2 hours)

“I’m new to ML systems and want to build intuition from scratch.”

0 → 1 → 2 → 3 → 4 → 5 → 7 → 13

Why this order: Start with single-node physics (roofline, memory wall, two phases), understand the KV-cache memory constraint that dominates LLM serving, see the data pipeline bottleneck, understand quantization regimes, learn that geography matters, then compose it all in the Full-Stack Audit capstone (13). Distributed parallelism and Tutorial 6 (reliability) can be explored next.

Path B: ML Engineer (~ 2.5 hours)

“I deploy models in production and need to make hardware decisions.”

0 → 1 → 2 → 3 → 8 → 9 → 12 → 13

Path C: Researcher (~ 2.5 hours)

“I evaluate hardware architectures and need quantitative tools.”

0 → 1 → 5 → 9 → 10 → Distributed → 6 → 11 → 12 → 13

Path D: Conference Tutorial (90 min)

“I’m attending a live tutorial at ISCA / MLSys / ASPLOS.”

Time Tutorial Core Message Format
0–15 min 0. Hello, Roofline The equation, the tool, the regime Live coding, audience predicts
15–35 min 1. The Memory Wall Why 3.2× FLOPS ≠ 3.2× speedup Live coding, audience verifies
35–45 min Break + Q&A
45–60 min 9. Sensitivity Bandwidth dominates compute in decode Live coding + derivation
60–75 min 6. Scaling to 1000 GPUs Communication and Young-Daly reliability compound Pre-computed results, discussion
75–85 min 13. Full-Stack Audit Composing all six domains Summary table walkthrough
85–90 min Where to learn more Follow-up walkthroughs and resources

Why 5 tutorials, not 8: Each tutorial needs enough time for the predict-compute-reflect cycle to land. Tutorials 2, 5, and 7 provide self-paced follow-up walkthroughs after the session.

Path D+: Half-Day Workshop (3 hours)

“I’m attending a half-day conference tutorial.”

The full numbered tutorial sequence with live code walkthroughs, combining the conference path with Tutorials 2, 3 (KV-Cache), 5, 7, 10 (Wafer-Scale), and 12 (DSE), with 15-minute breaks between clusters.


All tutorials are Quarto-compatible. Run them locally after pip install mlsysim, or browse the rendered versions on this website.

Back to top