Six passes of UX work consolidated into one client commit. Each section below is reviewable as an independent unit. PASS A — bug fixes from initial UX review * Gate napkin grader so it can never fire on non-numeric questions (defensive isNumericQuestion heuristic in lib/corpus.ts; the actual fix is a corpus answer_type field, marked TODO) * Vault topic detail rebuilt as a right-anchored slide-over drawer with role=dialog, aria-modal, Escape, focus management, backdrop click-out * Mock Interview now preserves the user's typed answer after reveal so they can compare against the model answer * Explicit ::selection CSS rule for visible mouse text selection on the dark terminal palette * New URL classifier (lib/refs.ts) labels deep-dive references honestly per source (book / arxiv / pytorch / etc.) instead of hard-coding "Read on MLSysBook.ai" everywhere * "May be unavailable" indicator for book-source links until the mlsysbook.ai chapter routes are redeployed PASS B/C — UX features and infra * FirstRunExplainer panel for Practice and Mock Interview modes, empty-state pattern, persisted in localStorage * Cmd+K command palette with three sections (Pages / Topics / Questions), keyboard nav, focus trap, debounced corpus search * Global ? KeyboardShortcutsOverlay listing every shortcut in the app * Nav reorganization: Plans promoted to primary, Tools renamed to Lab, About / Contribute / Dashboard moved to a new "More" user menu, ⌘K hint button added in the top-right * Mock Interview Strict / Standard / Open realism toggle that gates the Hardware Reference, Napkin Calc, and Ask Interviewer panels (persisted in localStorage) * Per-question clarifications log surfaced in the gauntlet results phase as "you asked N clarifications on this problem" PASS D — Ask Interviewer client * Three behavior modes: journal (no endpoint), hosted (LLM via worker), copy-as-prompt fallback (always available) * Reads NEXT_PUBLIC_INTERVIEWER_ENDPOINT at module load * Inline attribution returned by the worker (vendor + model + privacy note) so attribution updates automatically when the deployed provider changes * Four user-facing security/privacy notices wired into the panel PASS E — Gemini-reviewed robustness * AskInterviewer: AbortController on questionContext change to prevent stale fetches injecting into next question, setBusy(false) on reset to prevent input lockout, stable message ids for aria-live correctness, insecure-context clipboard guard, conditional auto-scroll * CommandPalette: searchQuestions debounced (120 ms) to keep main thread responsive on a 9k-question corpus, focus trap (Tab/Shift+Tab cycling), Escape stopPropagation to avoid bubbling to the global ? listener * KeyboardShortcutsOverlay: focus trap, SELECT added to typing guard * Nav: navigator.userAgent (not deprecated navigator.platform) for Mac detection PASS F — Polish * MetaTooltip component (CSS-only, role=tooltip, focus-within, native title fallback) wrapping LevelBadge so every L1-L6+ badge in the app reveals Bloom name + role + verb + sample question on hover/focus * meta-descriptions.ts: single source of truth for level / track / competency tooltip text * Practice: track and competency filter buttons get title= tooltips with the same descriptions * Inline "(how does this affect drilling?)" disclosure next to the Rate yourself buttons explaining the SR scheduling intervals * Progress page empty state now shows three on-ramps (Drill 5 easy / Daily challenge / Mock interview) instead of forcing brand-new users into the highest-friction action Other: * tsconfig.json excludes worker/ so the client doesn't try to typecheck the worker's Cloudflare-typed files * .gitignore adds the link checker JSON report and the wrangler cache Typecheck: clean across all of src/ (only the pre-existing stale .next/ framework reference remains, unchanged from before).
Machine Learning Systems
Principles and Practices of Engineering Artificially Intelligent Systems
📘 Textbook (current edition) • 📙 Vol I + Vol II (Summer 2026) • 🔥 TinyTorch • 🔮 MLSys·im (dev) • 💼 StaffML (dev) • 🌐 Ecosystem
📚 Hardcopy edition coming 2026 with MIT Press.
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 reason through trade-offs interactively, powered by MLSys·im — a modeling engine for infrastructure you can't physically access, and a standalone tool in its own right. TinyTorch makes you build the machinery yourself. The hardware kits put you face-to-face with real deployment constraints. StaffML 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) |
| 💼 | StaffML | Physics-grounded interview questions for ML systems roles. Vault, practice drills, mock interviews, and progress tracking. | Coming soon (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). Foundations, optimization, and deployment on one node. |
| 📘 | Volume II | Scale, Distribute, Govern | Distributed systems at production scale. Multi-machine infrastructure, fault tolerance, and governance. |
Quick Start
① |
Read the textbook. Start with the current edition. It's the foundation for everything else. |
② |
Pick a hands-on path. Build a framework (TinyTorch), explore trade-offs (Labs), or deploy to real hardware (Kits). |
③ |
Test yourself. Drill StaffML: physics-grounded systems design questions across cloud, edge, mobile, and TinyML. |
④ |
Teach it. Adopt the curriculum with the AI Engineering Blueprint and lecture slides. |
Branch Guide
Note
You are on the
devbranch. Active development happens here. For the last stable release, see themainbranch.
| Branch | What's on it | Status | |
|---|---|---|---|
| 🟢 | mainmlsysbook.ai |
Single-volume textbook (current edition) | Live — this is what readers see today. |
| 🟡 | dev← you are here |
Volume I — two-volume split (content complete, editorial polish) Volume II — At Scale (active development) Curriculum — TinyTorch, Kits, MLSys·im, Labs, StaffML |
TinyTorch and Hardware Kits are live. MLSys·im, Labs, and StaffML are 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. 100 → 1,000 → 10,000 → 100,000 → 1M learners by 2030 |
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 | Textbook contributing guide |
| 🔥 | Add a TinyTorch module or fix a bug | TinyTorch contributing guide |
| 🛠️ | Improve hardware labs | Hardware kits guide |
| 🐛 | 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 🪲 🧑💻 ✍️ |
rnjema 🧑💻 ✍️ 🛠️ |
Pratham Chaudhary 🪲 🧑💻 ✍️ |
Karthik Dani 🪲 🧑💻 |
Avik De 🪲 🧪 |
Takosaga 🪲 ✍️ |
joeswagson 🧑💻 🛠️ |
AndreaMattiaGaravagno 🧑💻 ✍️ |
Rolds 🪲 🧑💻 |
asgalon 🧑💻 ✍️ |
Amir Alasady 🪲 |
jettythek 🧑💻 |
wzz 🪲 |
Ng Bo Lin ✍️ |
keo-dara 🪲 |
Wayne Norman 🪲 |
Ilham Rafiqin 🪲 |
Oscar Flores ✍️ |
harishb00a ✍️ |
Pastor Soto ✍️ |
Salman Chishti 🧑💻 |
Aditya Mulik ✍️ |
Ademola Arigbabuwo ✍️ |
Yaroslav Halchenko 🧑💻 |
Harish ✍️ |
💼 Interview Hub Contributors
Coming soon!
🛠️ Hardware Kits Contributors
Vijay Janapa Reddi 🪲 🧑💻 🎨 ✍️ 🧪 🛠️ |
Marcelo Rovai ✍️ 🧑💻 🎨 |
Salman Chishti 🧑💻 |
Pratham Chaudhary 🧑💻 |
🧪 Labs Contributors
Vijay Janapa Reddi 🧑💻 🎨 ✍️ |
Salman Chishti 🧑💻 |
Pratham Chaudhary 🧑💻 |
✉️ Subscribe • 💬 Join discussions • 🌐 Visit mlsysbook.ai
Made with ❤️ for AI engineers
in the making, around the world 🌎