For Instructors
Reproducible, hardware-independent problem sets paired with textbook chapters, study sheets, and lecture decks.
MLSys·im provides a framework for assigning analytically grounded problem sets where every answer is deterministic and reproducible, regardless of the hardware students have access to. Combined with the companion lecture slides, it covers the tools needed for an ML systems course.
Why MLSys·im for Teaching
| Challenge | How MLSys·im Helps |
|---|---|
| Students lack GPU access | All analysis runs on a laptop, with no cloud credits needed |
| Homework answers vary by hardware | Vetted registry specs produce identical results everywhere |
| Hard to grade open-ended systems questions | Analytical solvers give deterministic, verifiable outputs |
| Specifications become stale | Registry updated from official datasheets; one update propagates everywhere |
| Students memorize without understanding | Analytical walkthroughs and parameter sweeps build quantitative intuition |
| No time to build slides from scratch | Beamer lecture decks for Volumes I and II (plus Volumes III and IV in preview), with speaker notes, in-class exercises, and SVG diagrams |
The Teaching Ecosystem
MLSys·im is one component of a larger open teaching toolkit:
| Resource | What It Provides | Link |
|---|---|---|
| Textbook | Four-volume open textbook: Volumes I and II online, Volumes III and IV in preparation | mlsysbook.ai |
| Study Sheets | A printable two-page review sheet for every chapter | Volume I · Volume II |
| Lecture Slides | 44 Beamer lecture decks for Volumes I and II (84 across Volumes I–IV), with speaker notes on every slide | Slides Portal |
| MLSys·im | 276 analytical resolvers across 6 wall domains, 12 curated registries, and deterministic assignments | Getting Started |
| Textbook Map | Chapter-by-chapter solver, tutorial, lab, and cross-volume physics thread index | Cross-Volume Map |
| Instructors Hub | Course adoption resources, syllabi, and assessment guides | Instructors Portal |
| TinyML Courseware | A four-course sequence of slide decks for embedded ML | TinyML Slides |
| Teaching Guide | Semester plan, in-class activity types, and how to customize the decks | Teaching Guide |
Course Integration Patterns
Pattern 1: Textbook Companion (Full Semester)
Map MLSys·im tutorials and assignments directly to textbook chapters, study sheets, and lecture decks. The table below shows a 16-week Volume I arrangement:
| Week | Textbook Chapter · Study Sheet · Slides | MLSys·im Assignment |
|---|---|---|
| 2 | Vol I · Ch 1: Introduction (Study sheet · Slides) | Read Hello, Roofline warmup: identify bottleneck equation |
| 5 | Vol I · Ch 5: Neural Computation (Study sheet · Slides) | Hello, Roofline: roofline analysis, batch size sweep |
| 8 | Vol I · Ch 8: Model Training (Study sheet · Slides) | Memory, Capacity & MoE: TrainingMemoryModel, ZeRO stages |
| 10 | Vol I · Ch 10: Model Compression (Study sheet · Slides) | Quantization: group-quantized weights & Tensor Core speedups |
| 11 | Vol I · Ch 11: Hardware Acceleration (Study sheet · Slides) | Hardware comparison assignment (see below) |
| 13 | Vol I · Ch 13: Model Serving (Study sheet · Slides) | Two Phases of Inference & KV-Cache Tax |
For a Volume II course on distributed systems:
| Week | Textbook Chapter · Study Sheet · Slides | MLSys·im Assignment |
|---|---|---|
| 3 | Vol II · Ch 2: Compute Infrastructure (Study sheet · Slides) | The $9M Question: TCO analysis with EconomicsModel |
| 6 | Vol II · Ch 6: Distributed Training (Study sheet · Slides) | Scaling to 1000 GPUs: 4D parallelism strategies |
| 7 | Vol II · Ch 7: Fault Tolerance (Study sheet · Slides) | ReliabilityModel: Young-Daly checkpoint interval & waste |
| 10 | Vol II · Ch 9: Fleet Efficiency (Study sheet · Slides) | Full-Stack Audit: multi-solver composition |
| 15 | Vol II · Ch 15: Sustainable AI (Study sheet · Slides) | Geography is a Systems Variable: carbon & water footprint |
The Teaching Guide describes how the lecture decks fit a 16-week semester, and the Cross-Volume Textbook Map lists companion solvers for every chapter.
Pattern 2: Standalone Labs
Use individual tutorials as self-contained lab assignments in any systems course. Each tutorial is an executable walkthrough with live code and analytical verification:
| Tutorial | Duration | Key Concepts | Example mlsysim Output |
Companion Chapter · Study Sheet · Slides |
|---|---|---|---|---|
| Hello, Roofline | 15 min | Roofline model, memory vs. compute bound | A100 to H100 ResNet-50 speedup: 1.73× (batch 1) vs. 3.17× (batch 256) | Vol I · Ch 11 (Study sheet · Slides) |
| Geography is a Systems Variable | 20 min | Energy, carbon footprint, regional grids | Iowa (680 gCO₂/kWh) vs. Quebec (20 gCO₂/kWh): 34× carbon gap | Vol II · Ch 15 (Study sheet · Slides) |
| Two Phases of Inference | 25 min | TTFT vs. ITL, KV-cache pressure | Llama-3.1-70B KV-cache at 4K context: 1.34 GB per request | Vol I · Ch 13 (Study sheet · Slides) |
| Scaling to 1000 GPUs | 30 min | Data/tensor/pipeline parallelism | 4D parallelism scaling efficiency across cluster tiers | Vol II · Ch 6 (Study sheet · Slides) |
Pattern 3: Capstone Projects
Advanced students compose multiple solvers to answer research-style questions. See Writing a Custom Solver for the custom solver API.
Assignment Ideas
Homework: Hardware Comparison (30 min)
Using
Engine.solve(), compare ResNet-50 inference latency onHardware.Cloud.A100,Hardware.Cloud.H100, andHardware.Edge.JetsonAGXOrinat batch sizes 1, 32, and 256. For each configuration, state whether the workload is memory-bound or compute-bound and explain why the bottleneck shifts with batch size.
Pairs with: Vol I · Ch 11: Hardware Acceleration (Study sheet · Slides) and Vol I · Ch 12: Benchmarking (Study sheet · Slides).
Homework: Training Memory Budget (30 min)
Using
TrainingMemoryModel, calculate the memory required to train GPT-2 (1.5B parameters) in FP16 with Adam optimizer under ZeRO Stage 0, Stage 1, and Stage 3. Explain why each stage reduces memory and what communication trade-off it introduces.
Pairs with: Vol I · Ch 8: Model Training (Study sheet · Slides) and Vol II · Ch 6: Distributed Training (Study sheet · Slides).
Lab: Carbon-Aware Training (45 min)
Using
SustainabilityModel, calculate the carbon and site water footprint of training on a 256-GPU cluster in Quebec (20 gCO₂/kWh) vs. US Average (429 gCO₂/kWh) vs. Poland (820 gCO₂/kWh, 41× Quebec). Produce a table and a 2-paragraph analysis of why datacenter geography matters more than single-generation hardware upgrades for operational carbon.
Pairs with: Vol II · Ch 15: Sustainable AI (Study sheet · Slides).
Lab: LLM Serving Capacity Planning (45 min)
Using
ServingModelandCompressionModel, show whyLlama-3.1-70Bin FP16 exceeds a single H100’s 80 GB HBM (feasible=False), then determine the maximum sequence length at which INT4 group-quantizedLlama-3.1-70Bserves a single request on 1×H100 (or pairServingCapacityModelacross replicas to size a multi-GPU deployment for target QPS and P99 latency). Calculate TTFT and ITL at sequence lengths of 1K, 4K, and 16K tokens, and identify the context length where KV-cache traffic overtakes weight reads.
Pairs with: Vol I · Ch 13: Model Serving (Study sheet · Slides) and Vol II · Ch 10: Serving at Scale (Study sheet · Slides).
Exam Question: Back-of-Envelope
A GPU has 989 TFLOP/s peak dense compute (FP16) and 3.35 TB/s memory bandwidth. Compute (a) the ridge point in FLOP/Byte (295 FLOP/Byte), (b) whether a model layer with arithmetic intensity of 50 FLOP/Byte is compute-bound or memory-bound, and (c) which regime a layer with arithmetic intensity of 400 FLOP/Byte occupies and what that implies about the benefit of moving to a GPU with 2× the bandwidth. Show all intermediate steps.
Pairs with: Vol I · Ch 11: Hardware Acceleration (Study sheet · Slides).
Capstone: Multi-Solver Design Study (1 week)
Design a training cluster for a 70.6B-parameter model. Use the DistributedModel to select a parallelism strategy, the EconomicsModel for TCO over 6 months, the SustainabilityModel to compare three datacenter locations, and the ReliabilityModel to determine checkpoint frequency. Present the analysis as a 3-page technical memo with quantitative justification for each decision.
Pairs with: the full Volume II slide set, covering infrastructure, training, fault tolerance, and sustainability.
Grading Notes
Because MLSys·im produces deterministic output from vetted specifications:
- Answer keys are stable: the same
mlsysimversion produces identical numbers for every student, every semester - Partial credit is straightforward: grade the reasoning (which solver, which inputs, which bottleneck explanation), not only the number
- Analytical predictions are easy to assess: students can compute analytical bounds from the closed-form equations before running
mlsysimto verify their work
Pin the exact version in the assignment instructions (pip install mlsysim==<course-version>) so answer keys remain valid even after new releases update specifications.
Reproducibility Guarantee
All specifications in the MLSys Zoo are:
- Sourced from official manufacturer datasheets and published benchmarks
- Typed with
pint.Quantityfor dimensional correctness, so unit errors are caught at runtime - Frozen per release, so an exact pin such as
mlsysim==0\.3\.2always produces the same answers
An answer key therefore works for every student, every semester.
Jupyter & Quarto Compatibility
All tutorials run in:
- Jupyter Notebooks: standard
.ipynbworkflow - Quarto documents: render to HTML, PDF, or slides with
quarto render - Google Colab:
pip install mlsysimin the first cell, then run the tutorial
No GPU runtime required. CPU-only environments are sufficient because MLSys·im computes from equations, not from profiling.
Getting Started
- Point students to the Getting Started guide for installation
- Assign the Hello, Roofline tutorial as a warmup
- Browse the Solver Guide to select solvers for the course topics
- Pair each assignment with the relevant lecture slides for classroom context
- Use the MLSys Zoo for available hardware, model, and infrastructure specifications