harvard-edge/cs249r_book

Machine Learning Systems: Foundations, Scaling, Agentic AI, and Physical AI (Vols I–IV) • Harvard CS249r | https://mlsysbook.ai

What it solves

Most resources teach you how to train a model, but not how to build the systems around it — scaling across clusters, serving under latency constraints, deploying on edge devices, orchestrating agents, or controlling robots. This project closes that gap by framing "AI engineering" as a disciplined practice similar to software or computer engineering: it teaches you to design, build, and evaluate complete intelligent systems that are efficient, reliable, safe, and robust in real-world conditions.

How it works

The repository is a single integrated curriculum, not just a book. It contains a four-volume textbook series, each volume tackling a different systems boundary:

  • Volume I covers foundations: how to make intelligence execute efficiently on a single node — data, training, inference, deployment, and evaluation.
  • Volume II (preview) covers scaling across distributed clusters and datacenters — accelerators, memory, communication, parallelism, serving, and reliability.
  • Volume III (in development) covers agentic systems — reasoning loops, memory, tools, planning, orchestration, and multi-agent setups.
  • Volume IV (in development) covers physical AI — robotics, sensing, real-time control, and safety.

Alongside the textbook, there are companion tools you use to learn by doing. TinyTorch walks you through building a small ML framework from scratch in 20 modules. Labs are interactive notebooks where you tweak parameters and see trade-offs, powered by MLSys·im, a simulator that models infrastructure you can't access physically (like GPU clusters). Hardware Kits put ML on Arduino, Raspberry Pi, and similar devices to confront real memory and latency limits. StaffML offers interview-style questions and drills for job prep. For educators, there is an Instructor Hub with syllabi, lecture slides with multiple themes, and a newsletter for updates. Everything is designed as one learning loop: read, explore, build, model, deploy, practice, teach. The project is open source with an active contributor community; the textbook is on track for a hardcopy edition with MIT Press in 2026.

Who it’s for

The curriculum is aimed at students, self-learners, and educators who want a comprehensive, hands-on path to understanding machine learning systems — not just model training. It also serves working engineers preparing for ML systems interviews, and contributors who want to improve chapters, labs, or tools. Entry points vary: you can start with Volume I and Lab 00 as a student, jump to the Instructor Hub if you teach, or pick a component to contribute to.

Highlights

  • Open-source, four-volume textbook series covering foundations, scaling, agentic systems, and physical AI.
  • Interactive labs and a simulator (MLSys·im) to explore trade-offs without owning a cluster.
  • Build a real ML framework from scratch with TinyTorch across 20 progressive modules.
  • Hardware kits for Arduino, Raspberry Pi, and similar devices to learn real deployment constraints.
  • StaffML interview prep with physics-grounded questions and practice drills.
  • Instructor resources: syllabi, slides, and a newsletter for classroom adoption.
  • Designed as a single integrated curriculum where each component reinforces the others.

Related

  • Project
  • Project
  • Project
  • Project