Principles and Practices of Engineering Artificially Intelligent Systems
The open-source textbook that teaches you to build real-world AI systems — from edge devices to cloud deployment. Originally developed as Harvard University's CS249r course by Prof. Vijay Janapa Reddi, now used by universities and students worldwide.
Our mission: Expand access to AI systems education worldwide — empowering learners, one chapter and one lab at a time.
"This grew out of a concern that while students could train AI models, few understood how to build the systems that actually make them work. As AI becomes more capable and autonomous, the critical bottleneck won't be the algorithms - it will be the engineers who can build efficient, scalable, and sustainable systems that safely harness that intelligence."
— Vijay Janapa Reddi
Go beyond training models — master the full stack of real-world ML systems.
| Topic | What You'll Build |
|---|---|
| System Design | Scalable, maintainable ML architectures |
| Data Engineering | Robust pipelines for collection, labeling, and processing |
| Model Deployment | Production-ready systems from prototypes |
| MLOps & Monitoring | Reliable, continuously operating systems |
| Edge AI | Resource-efficient deployment on mobile, embedded, and IoT |
Star this repository to help us demonstrate the value of open AI education to funders and institutions.
Goal: 10,000 stars = $100,000 in additional education funding
⭐ Star Now — takes 2 seconds!
We've graduated this project from Harvard to enable global access and expand AI systems education worldwide. Please help us support educators globally, especially in the Global South, by providing TinyML kits for students, funding workshops, and sustaining our open-source infrastructure.
From $15/month to sponsor a learner to $250 for workshops — every contribution democratizes AI education.
| Resource | Description |
|---|---|
| 📚 Main Site | Complete learning platform |
| 🔥 TinyTorch | Educational ML framework |
| 💬 Discussions | Ask questions, share insights |
| 👥 Community | Join our global learning community |
# Read online (continuously updated)
open https://mlsysbook.ai
# Or download PDF for offline access
curl -O https://mlsysbook.ai/Machine-Learning-Systems.pdfgit clone https://github.com/harvard-edge/cs249r_book.git
cd cs249r_book
make setup-hooks # Setup automated quality controls
make install # Install dependencies
# Recommended: Use the binder for development
./binder preview intro # Fast chapter development
./binder help # See all commands
# Or use traditional Make commands
make preview # Start development serverWe welcome contributions from the global community! Here's how you can help:
- 📝 Content — Suggest edits, improvements, or new examples
- 🛠️ Tools — Enhance development scripts and automation
- 🎨 Design — Improve figures, diagrams, and visual elements
- 🌍 Localization — Translate content for global accessibility
- 🔧 Infrastructure — Help with build systems and deployment
All contributions benefit from automated quality assurance:
- ✅ Pre-commit validation — Automatic cleanup and checks
- 📋 Content review — Formatting and style validation
- 🧪 Testing — Build and link verification
- 👥 Peer review — Community feedback
The Book Binder is our lightning-fast development CLI for streamlined building and iteration:
# Fast chapter development
./binder build intro html # Build single chapter
./binder build intro,ml_systems html # Build multiple chapters together
./binder preview intro # Build and preview chapter
# Full book building
./binder build * html # Build complete website
./binder build * pdf # Build complete PDF
# Management
./binder clean # Clean artifacts
./binder status # Show current status
./binder help # Show all commands# Building
make build # Build HTML version
make build-pdf # Build PDF version
make preview # Start development server
# Quality Control
make clean # Clean build artifacts
make test # Run validation tests
make lint # Check for issues
# Get help
make help # Show all commandsMLSysBook/
├── binder # ⚡ Fast development CLI (recommended)
├── book/ # Main book content (Quarto)
│ ├── contents/ # Chapter content
│ │ ├── core/ # Core chapters
│ │ ├── labs/ # Hands-on labs
│ │ ├── frontmatter/ # Preface, acknowledgments
│ │ ├── backmatter/ # References and resources
│ │ └── parts/ # Book parts and sections
│ ├── _extensions/ # Quarto extensions
│ ├── data/ # Cross-reference and metadata files
│ ├── _quarto-html.yml # Website build configuration
│ ├── _quarto-pdf.yml # PDF build configuration
│ ├── _quarto.yml # Active config (symlink)
│ ├── index.qmd # Main entry point
│ └── assets/ # Images, styles, media
├── build/ # Build artifacts (git-ignored)
│ ├── html/ # HTML website output
│ ├── pdf/ # PDF book output
│ └── dist/ # Distribution files
├── scripts/ # Root-level development scripts
│ ├── content/ # Content management tools
│ ├── cross_refs/ # Cross-reference management
│ ├── genai/ # AI-assisted content tools
│ ├── maintenance/ # Maintenance scripts
│ ├── testing/ # Test scripts
│ └── utilities/ # General utilities
├── tools/ # Development automation
│ ├── scripts/ # Organized development scripts
│ │ ├── build/ # Build and development tools
│ │ ├── content/ # Content management tools
│ │ ├── maintenance/ # System maintenance scripts
│ │ ├── testing/ # Test and validation scripts
│ │ ├── utilities/ # General utility scripts
│ │ └── docs/ # Script documentation
│ ├── dependencies/ # Package requirements
│ └── setup/ # Setup and configuration
├── config/ # Build configuration
│ ├── dev/ # Development configurations
│ ├── linting/ # Code quality configurations
│ ├── quarto/ # Quarto publishing settings
│ ├── lua/ # Lua filters and scripts
│ └── tex/ # LaTeX templates
├── locals/ # Local development files
├── assets/ # Global assets (covers, icons)
├── docs/ # Documentation
│ ├── BINDER.md # Binder CLI guide
│ ├── DEVELOPMENT.md # Development guide
│ ├── MAINTENANCE_GUIDE.md # Daily workflow guide
│ ├── BUILD.md # Build instructions
│ └── contribute.md # Contribution guidelines
├── CHANGELOG.md # Project changelog
├── CITATION.bib # Citation information
└── Makefile # Traditional development commands
- ⚡ Binder CLI Guide — Fast development with the Book Binder
- 📋 Development Guide — Comprehensive setup and workflow
- 🛠️ Maintenance Guide — Daily tasks and troubleshooting
- 🔨 Build Instructions — Detailed build process
- 🤝 Contribution Guidelines — How to contribute effectively
# Command-line trigger (recommended)
./binder publish "Description" COMMIT_HASH
# Interactive wizard
./binder publish
# Manual steps
./binder build - html && ./binder build - pdf
# Then copy PDF to assets and push to mainPublishing Options:
./binder publish— Unified command with interactive and command-line modes- Web Interface — Manual trigger via GitHub Actions UI
# Welcome and overview
./binder hello
# First time setup
./binder setup
# Quick preview
./binder preview intro@inproceedings{reddi2024mlsysbook,
title = {MLSysBook.AI: Principles and Practices of Machine Learning Systems Engineering},
author = {Reddi, Vijay Janapa},
booktitle = {2024 International Conference on Hardware/Software Codesign and System Synthesis (CODES+ ISSS)},
pages = {41--42},
year = {2024},
organization = {IEEE},
url = {https://mlsysbook.org}
}This work is licensed under Creative Commons Attribution–NonCommercial–ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may share and adapt the material for non-commercial purposes with appropriate credit.
Made with ❤️ for AI learners worldwide
Our goal is to educate 1 million AI systems engineers for the future at the edge of AI.