DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Machine Learning Systems (CS249r Book)

calendar_todayAdded Feb 23, 2026
categoryDocs, Tutorials & Resources
codeOpen Source
PythonPyTorchDeep LearningMachine LearningWeb ApplicationDocs, Tutorials & ResourcesOtherEducation & Research ResourcesModel Training & Inference

An interactive open-access textbook on Machine Learning Systems engineering from Harvard University, integrating the TinyTorch framework with hands-on edge deployment labs, covering the full spectrum from ML fundamentals to system optimization.

Project Overview#

CS249r Book (MLSysBook.ai) is a Machine Learning Systems engineering textbook project led by Prof. Vijay Janapa Reddi at Harvard University, designed to bridge the gap between "ML Algorithms ↔ Systems Engineering". Current version is v0.5.1 (Early Access Preview), with a hardcover edition planned for MIT Press publication in 2026.

Core Positioning#

  • Description: Introduction to Machine Learning Systems — Principles and Practices of Engineering Artificially Intelligent Systems
  • Institution: Harvard University (harvard-edge)
  • Author/Maintainer: Prof. Vijay Janapa Reddi
  • Primary Languages: JavaScript (81.2%), Python (13.9%), TeX (2.4%), HTML, Lua, Shell

Learning Stack#

LayerComponentPurposeStatus
READTextbookTheory, concepts, and best practices (ML ↔ Systems Engineering bridge)✅ Available
BUILDTinyTorch FrameworkBuild ML framework from scratch (NumPy only)✅ Available
DEPLOYHardware KitsDeploy on real constrained devices (Arduino, Raspberry Pi, etc.)✅ Available
EXPLORESoftware Co-LabsControlled experiments on latency, memory, energy, cost🔄 2026
PROVEAI OlympicsCross-track competition and benchmarking🔄 2026

Textbook Structure (Six Parts)#

PartThemeChapters
I. FoundationsCore ConceptsIntroduction, ML Systems, DL Primer, Architectures
II. DesignBuilding BlocksWorkflow, Data Engineering, Frameworks, Training
III. PerformanceAccelerationEfficient AI, Optimizations, HW Acceleration, Benchmarking
IV. DeploymentDeploymentMLOps, On-device Learning, Privacy, Robustness
V. TrustTrustworthy & SustainableResponsible AI, Sustainable AI, AI for Good
VI. FrontiersCutting-edgeEmerging trends and future directions

TinyTorch 20-Module Curriculum#

PartModule #Build Content
I. Foundations01-08Tensors, activations, layers, losses, dataloader, autograd, optimizers, training
II. Vision09Conv2d, CNNs for image classification
III. Language10-13Tokenization, embeddings, attention, transformers
IV. Optimization14-20Profiling, quantization, compression, acceleration, benchmarking, capstone

Workflow: src/*.pymodules/*.ipynbtinytorch/*.py, driven by tito CLI (23 subcommands)


Hardware Kits Supported Platforms#

  • Arduino Nicla Vision (STM32H7, ultra-low-power vision)
  • Seeed XIAO ESP32S3 (WiFi vision)
  • Grove Vision AI V2 (no-code rapid prototyping)
  • Raspberry Pi (complex edge AI pipelines)

Hardware Labs Skill Matrix#

LabBuild ContentSkills
SetupHardware & environment configToolchain, flashing, debugging
Image ClassificationCNN image recognitionModel deployment, inference
Object DetectionReal-time object detectionYOLO, bounding boxes
Keyword SpottingAudio wake word detectionDSP, MFCC features
Motion ClassificationIMU gesture recognitionSensor fusion, time series

ML ↔ Systems Engineering Bridge#

ML ConceptSystems ConceptLearning Points
Model ParametersMemory ConstraintsHow to fit large models on resource-constrained devices
Inference LatencyHardware AccelerationHow GPU/TPU/NPU execute neural networks
Training ConvergenceCompute EfficiencyHow mixed precision and optimization reduce costs
Model AccuracyQuantization & PruningHow to compress models while maintaining performance
Data RequirementsPipeline InfrastructureHow to build efficient data loading and preprocessing
Model DeploymentMLOps PracticesHow to monitor, version, and update production models
Privacy ConstraintsOn-device LearningHow to train and adapt models without uploading data

Historical Milestones Reproduction (TinyTorch)#

YearMilestoneAchievement
1958PerceptronGradient descent binary classification
1969XOR CrisisMulti-layer networks solve non-linear problems
1986BackpropagationMulti-layer network training
1998CNN RevolutionConvolutional image classification
2017TransformerSelf-attention language generation
2018+MLPerfProduction-grade optimization benchmarks

Installation & Quick Start#

For Readers#

# Read online
open https://mlsysbook.ai

# Download formats
curl -O https://mlsysbook.ai/pdf      # PDF
curl -O https://mlsysbook.ai/epub     # EPUB

For Contributors (Book Build)#

cd book
./binder setup
./binder doctor
./binder build              # Build HTML book
./binder preview intro      # Hot-reload preview chapter
./binder pdf                # Build PDF
./binder epub               # Build EPUB

For Developers (TinyTorch)#

cd tinytorch
pip install -r requirements.txt
tito --help

Repository Structure#

cs249r_book/
├── book/           # Textbook source (Quarto Markdown)
├── tinytorch/      # TinyTorch framework & curriculum (600+ test cases)
├── kits/           # Hardware experiment Labs
├── labs/           # General lab resources
├── _brand/         # Brand & design assets
├── binder/         # Root binder scripts
├── pyproject.toml  # Python project config
├── CITATION.bib    # Academic citation
└── LICENSE.md      # License declaration

Use Cases#

  • University Course Textbook: ML Systems, Edge AI, Embedded Intelligence courses
  • Self-learner Advancement Path: From DL theory to framework implementation and production deployment
  • Engineering Training Material: Systematically fill ML Sys knowledge gaps for teams
  • Research Reference: MLSys research introduction and literature leads

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch