Principles and Practices of Engineering Artificially Intelligent Systems
Mission
The world is rushing to build AI systems. It is not engineering them.
That gap is what we mean by AI engineering.
AI engineering is the discipline of building efficient, reliable, safe, and robust intelligent systems that operate in the real world, not just models in isolation. Our mission is to establish AI engineering as a foundational discipline alongside software engineering and computer engineering, by teaching how to design, build, and evaluate end-to-end intelligent systems.
Our goal: Help 100,000 learners master ML Systems this year, and reach 1 million by 2030.
Why One Repository
I designed this as a single integrated curriculum, not a collection of independent projects. The textbook teaches the theory. TinyTorch makes you build the internals. The hardware kits force you to confront real constraints. The simulator lets you reason about infrastructure you can't afford to rent. Each piece exists because I found that students who only read don't internalize, and students who only code don't generalize.
The repository is the curriculum.
A growing community of contributors helps improve every part of it: fixing errors, sharpening explanations, testing on new hardware. Their work makes this better for everyone, and I'm grateful for every pull request.
The Curriculum
Every component connects. The textbook gives you the mental models. The labs let you explore trade-offs interactively, powered by MLSys·im, the modeling engine for infrastructure you can't physically access. TinyTorch makes you build the machinery yourself. The hardware kits put you face-to-face with real constraints. The interview playbook tests whether you actually understand it. And the instructor hub, slides, and newsletter give educators everything they need to bring this into a classroom.
For Students
| Component | Role in the Curriculum | Link | |
|---|---|---|---|
| 📖 | Textbook | Two-volume MIT Press textbook. The theory, the mental models, and the quantitative reasoning that everything else builds on. | Current edition · Vol I + II (Summer 2026) |
| 🔬 | Labs | Interactive Marimo notebooks where you explore trade-offs from the textbook: change a parameter, see what breaks, build intuition. Powered by MLSys·im under the hood. | Read more (dev) |
| 🔥 | Tiny🔥Torch | Build your own ML framework from scratch across 20 progressive modules. You don't understand a system until you've built one. | Get started |
| 🛠️ | Hardware Kits | Deploy ML to Arduino, Raspberry Pi, and Jetson. Real memory limits, real power budgets, real latency. | Browse labs |
| 🔮 | MLSys·im | Calculate memory bottlenecks, network saturation, and scheduling limits at infrastructure scales you can't physically access. | Read more (dev) |
| 💼 | Interview Playbook | 40+ systems design questions for AI infrastructure roles. Silicon physics, distributed infra, production serving, and ML operations. | Start drilling (dev) |
For Educators
| Component | What It Provides | Link | |
|---|---|---|---|
| 🎓 | Instructor Hub | The AI Engineering Blueprint: two 12-week syllabi, pedagogy guide, assessment rubrics, and a TA handbook. | View hub |
| 🎬 | Lecture Slides | Beamer slide decks for every chapter, with four theme variants. Drop into your course and teach. | Browse decks (dev) |
| 📬 | Newsletter | Updates on the curriculum, new chapters, and what the community is building. | Subscribe |
What You Will Learn
This textbook teaches you to think at the intersection of machine learning and systems engineering. Each chapter bridges algorithmic concepts with the infrastructure that makes them work in practice.
| You know... | You will learn... |
|---|---|
| How to train a model | How training scales across GPU clusters |
| That quantization shrinks models | How INT8 math maps to silicon |
| What a transformer is | Why KV-cache dominates memory at inference |
| Models run on GPUs | How schedulers balance latency vs throughput |
| Edge devices have limits | How to co-design models and hardware |
Book Structure
The textbook follows the Hennessy & Patterson pedagogical model across two volumes:
| Volume | Theme | Scope |
|---|---|---|
| Volume I | Build, Optimize, Deploy | Single-machine ML systems (1-8 GPUs) |
| Volume II | Scale, Distribute, Govern | Distributed systems at production scale |
Quick Start
Branch Guide
Note
You are on the dev branch. Active development happens here. For the last stable release, see the main branch.
| Branch | What's on it | Status |
|---|---|---|
mainmlsysbook.ai |
Single-volume textbook | Live. This is what readers see today. |
dev ← you are here |
Volume I (two-volume split) Volume II: At Scale Tiny🔥Torch, Hardware Kits, MLSys·im, Labs, Interview Playbook |
Content complete, editorial polish Active development Tiny🔥Torch and Hardware Kits are live; MLSys·im, Labs, Interview Playbook in development |
The two-volume split replaces the single-volume edition at launch.
Support This Work
|
Star the repo Stars signal to universities and foundations that this work matters. They directly fund workshops and hardware kits for underserved classrooms. |
Fund the mission All contributions go to Open Collective, a transparent fund for educational outreach. Every dollar goes to reaching more students. |
Contributing
| I want to... | Go here | |
|---|---|---|
| 📖 | Fix a typo or improve a chapter | book/docs/CONTRIBUTING.md |
| 🔥 | Add a TinyTorch module or fix a bug | tinytorch/CONTRIBUTING.md |
| 🛠️ | Improve hardware labs | kits/README.md |
| 🐛 | Report an issue | GitHub Issues |
| 💬 | Ask a question | GitHub Discussions |
Contributors
Thanks goes to these wonderful people who have contributed to making this resource better for everyone!
Legend: 🪲 Bug Hunter · 🧑💻 Code Contributor · ✍️ Doc Wizard · 🎨 Design Artist · 🧠 Idea Spark · 🔎 Code Reviewer · 🧪 Test Tinkerer · 🛠️ Tool Builder
📖 Textbook Contributors
🔥 TinyTorch Contributors
Vijay Janapa Reddi 🪲 🧑💻 🎨 ✍️ 🧠 🔎 🧪 🛠️ |
kai 🪲 🧑💻 🎨 ✍️ 🧪 |
Dang Truong 🪲 🧑💻 ✍️ 🧪 |
Didier Durand 🪲 🧑💻 ✍️ |
Pratham Chaudhary 🪲 🧑💻 ✍️ |
Karthik Dani 🪲 🧑💻 |
Avik De 🪲 🧪 |
Takosaga 🪲 ✍️ |
rnjema 🧑💻 🛠️ |
joeswagson 🧑💻 🛠️ |
AndreaMattiaGaravagno 🧑💻 ✍️ |
Rolds 🪲 🧑💻 |
Amir Alasady 🪲 |
jettythek 🧑💻 |
wzz 🪲 |
Ng Bo Lin ✍️ |
keo-dara 🪲 |
Wayne Norman 🪲 |
Ilham Rafiqin 🪲 |
Oscar Flores ✍️ |
harishb00a ✍️ |
Pastor Soto ✍️ |
Salman Chishti 🧑💻 |
Aditya Mulik ✍️ |