Skip to main content

For Students

Build intuition for ML systems without GPU hardware.

For a student taking a first ML systems course or preparing for industry interviews, MLSys·im offers a way to experiment with real hardware specifications and see why systems behave the way they do. Hardware registry specs come from datasheets where available; outputs are derived from documented equations.


Learning Objectives

Students who work through the MLSys·im tutorials learn to:

  • Identify bottlenecks: Determine whether a workload is memory-bound or compute-bound on any hardware, and understand why
  • Reason quantitatively: Use real datasheet numbers (not made-up examples) to calculate latency, throughput, and cost
  • Build systems intuition: See how batch size, precision, parallelism strategy, and datacenter location each affect performance
  • Think across the stack: Connect workload characteristics to hardware specs to infrastructure constraints

Prerequisites

  • Python: Comfortable with functions, loops, and f-strings
  • Math: Basic algebra (closed-form equations using square roots, logarithms, and exponentials; no calculus required)
  • ML: Familiarity with terms like “model parameters,” “inference,” and “training” (the Glossary defines everything else)

No GPU, no cloud account, and no special hardware are required. Installation is one command:

pip install mlsysim

See the Getting Started guide for development installs. Local install is the supported path; Colab works by running pip install mlsysim in the first cell, but one-click Colab/Binder launch buttons are not available yet.


Quick Start

import mlsysim
from mlsysim import Engine

# Load a model and hardware from the vetted registry
model = mlsysim.Models.Vision.ResNet50
gpu   = mlsysim.Hardware.Cloud.A100

# Solve: is this workload memory-bound or compute-bound?
profile = Engine.solve(model=model, hardware=gpu, batch_size=1, precision="fp16", efficiency=1.0)

print(f"Bottleneck: {profile.bottleneck}")
print(f"Latency:    {profile.latency.to('ms'):~.2f}")
Bottleneck: Memory
Latency:    0.06 ms

Learning Path

Start at the top and work through in order. Each tutorial builds on the one before it. The Textbook · Study Sheet · Slides column links directly to the web chapter, two-page study sheet, and lecture deck covering the same physics.

Step Tutorial What It Teaches Time Textbook · Study Sheet · Slides
1 Hello, Roofline The roofline model, memory-bound vs. compute-bound, batch size sweeps 15 min Vol I · Ch 11: Hardware Acceleration (Study sheet · Slides)
2 Geography is a Systems Variable Energy, carbon footprint, water usage, regional grid effects 20 min Vol II · Ch 15: Sustainable AI (Study sheet · Slides)
3 Two Phases of Inference TTFT vs. ITL, KV-cache pressure, the two phases of LLM inference 25 min Vol I · Ch 13: Model Serving (Study sheet · Slides), Vol II · Ch 10: Serving at Scale (Study sheet · Slides)
4 Distributed Training Data/tensor/pipeline parallelism, communication overhead, scaling efficiency 30 min Vol II · Ch 6: Distributed Training (Study sheet · Slides), Vol II · Ch 5: Collective Communication (Study sheet · Slides)
TipPredict Before Computing

Each tutorial is an executable walkthrough that pairs analytical equations with live solver code. Before inspecting the solver output in each section, estimate the expected bottleneck or scaling trend from the formula. This practice builds the mental models that effective systems reasoning depends on. The companion slide decks reinforce the same habit with 8–11 active learning moments per deck.


How MLSys·im Maps to the Textbook, Labs, and Slides

MLSys·im is the companion framework for the Machine Learning Systems textbook. Each solver maps to specific chapters, study sheets, and lecture decks (see the Cross-Volume Textbook Map for all chapters and cross-volume physics threads).

MLSys·im Solver What It Models Textbook · Study Sheet · Slides
SingleNodeModel Roofline analysis, compute vs. memory bottleneck Vol I · Ch 11: Hardware Acceleration (Study sheet · Slides)
TrainingMemoryModel Weights, gradients, Adam state, ZeRO sharding, activations Vol I · Ch 8: Model Training (Study sheet · Slides)
CompressionModel Group quantization scale overhead, pruning, accuracy delta Vol I · Ch 10: Model Compression (Study sheet · Slides)
ServingModel TTFT, ITL, KV-cache memory Vol I · Ch 13: Model Serving (Study sheet · Slides)
ResponsibleEngineeringModel DP-SGD Gaussian noise multiplier and clipping step overhead Vol I · Ch 15: Responsible Engineering (Study sheet · Slides)
EconomicsModel CapEx, OpEx, TCO, cloud break-even Vol II · Ch 2: Compute Infrastructure (Study sheet · Slides)
DistributedModel 4D parallelism, all-reduce, 1F1B pipeline bubbles Vol II · Ch 6: Distributed Training (Study sheet · Slides)
MoERoutingModel Expert routing imbalance and all-to-all traffic Vol II · Ch 6: Distributed Training (Study sheet · Slides)
ReliabilityModel Fleet MTBF, Young-Daly checkpoint interval & waste Vol II · Ch 7: Fault Tolerance (Study sheet · Slides)
EfficiencyModel Roofline & FlashAttention SRAM IO-complexity ceiling Vol II · Ch 9: Fleet Efficiency (Study sheet · Slides)
ServingCapacityModel Replica count from QPS and P99 latency target Vol II · Ch 10: Serving at Scale (Study sheet · Slides)
SustainabilityModel Energy, carbon footprint, site water usage (PUE, WUE) Vol II · Ch 15: Sustainable AI (Study sheet · Slides)
NoteAgentic & Physical AI Solvers (Volumes III & IV Preview)

MLSys·im also models multi-step agent horizons (HorizonCompoundingModel, AcceptedTaskCostModel, PagedAllocationModel in Vol III · Ch 1 and Vol III · Ch 5) and cyber-physical control deadlines (StoppingBudgetModel, PhaseLagBudgetModel, ObservationAgeModel in Vol IV · Ch 1 and Vol IV · Ch 8).

MLSys·im is self-contained and does not require the textbook. The Math Foundations page documents the core equations, and each slide deck stands on its own with full speaker notes.


Textbook, Labs & Slides at a Glance

The companion curriculum spans single-machine fundamentals and fleet-scale infrastructure, with two-page study sheets and Beamer lecture decks (speaker notes, active learning exercises, and SVG diagrams) for every chapter.

Volume I: Introduction to Machine Learning Systems

Covers the single-machine ML stack: data engineering, neural computation, architectures, frameworks, training, compression, hardware acceleration, serving, and operations.

Read Vol I | Study Sheets | Browse Slides | PDF Zip

Volume II: Scaling Machine Learning Systems

Covers distributed infrastructure: compute clusters, network fabrics, distributed training, fault tolerance, fleet orchestration, inference at scale, and governance.

Read Vol II | Study Sheets | Browse Slides | PDF Zip

Volume III: Agentic Machine Learning Systems

Covers multi-step agent loops, test-time compute, context/KV-cache management, tool sandboxes, durable execution, RLVR, and agent economics.

Preview Vol III

Volume IV: Physical AI: Machine Learning Systems That Sense and Act

Covers the causal boundary, actuators, real-time buses, sensor perception, kinematic safety envelopes, workload placement, and closed-loop verification.

Preview Vol IV


Next Steps

Back to top