Principles and Practices of Engineering Artificially Intelligent Systems
π Read Online β’ πΎ Download PDF β’ π Explore Ecosystem
π Hardcopy edition coming 2026 via MIT Press!
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
# Quick setup (recommended)
./binder setup # Setup environment and dependencies
./binder hello # Welcome and overview
# Fast development workflow
./binder preview intro # Fast chapter development
./binder build html # Build complete book
./binder help # See all commandsWe 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:
# Chapter development (fast iteration)
./binder preview intro # Build and preview single chapter
./binder preview intro,ml_systems # Build and preview multiple chapters
# Complete book building
./binder build html # Build complete website
./binder build pdf # Build complete PDF
./binder build epub # Build complete EPUB
# Management
./binder clean # Clean artifacts
./binder status # Show current status
./binder help # Show all commands# Book Binder CLI (Recommended)
./binder setup # First-time setup
./binder build html # Build complete HTML book
./binder build pdf # Build complete PDF book
./binder preview intro # Preview chapter development
./binder publish # Publish to production
# Traditional setup (if needed)
python3 -m venv .venv
source .venv/bin/activate
pip install -r tools/dependencies/requirements.txt
pre-commit installMLSysBook/
βββ binder # β‘ Fast development CLI (recommended)
βββ quarto/ # 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
β βββ config/ # Build configurations
β β βββ _quarto-html.yml # Website build configuration
β β βββ _quarto-pdf.yml # PDF build configuration
β βββ data/ # Cross-reference and metadata files
β βββ assets/ # Images, styles, media
β βββ filters/ # Lua filters
β βββ scripts/ # Build scripts
β βββ _quarto.yml # Active config (symlink)
βββ tools/ # Development automation
β βββ scripts/ # Organized development scripts
β β βββ content/ # Content management tools
β β βββ cross_refs/ # Cross-reference management
β β βββ genai/ # AI-assisted content tools
β β βββ maintenance/ # System maintenance scripts
β β βββ testing/ # Test and validation scripts
β β βββ utilities/ # General utility scripts
β βββ dependencies/ # Package requirements
β βββ setup/ # Setup and configuration
βββ config/ # Project configuration
β βββ dev/ # Development configurations
β βββ linting/ # Code quality configurations
β βββ quarto/ # Quarto publishing settings
βββ docs/ # Documentation
β βββ BINDER.md # Binder CLI guide
β βββ BUILD.md # Build instructions
β βββ DEVELOPMENT.md # Development guide
β βββ contribute.md # Contribution guidelines
βββ CHANGELOG.md # Project changelog
βββ CITATION.bib # Citation information
βββ pyproject.toml # Python project configuration
βββ README.md # This file
- β‘ 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
# Interactive publishing (recommended)
./binder publish
# Command-line publishing
./binder publish "Description" COMMIT_HASH
# Manual workflow (if needed)
./binder build html && ./binder build pdf
# Then use GitHub Actions to deployPublishing Options:
./binder publishβ Unified command with interactive and command-line modes- GitHub Actions β Automated deployment via workflows
# 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.