GStars
    harvard-edge

    harvard-edge/cs249r_book

    Introduction to Machine Learning Systems

    ai
    deep-learning
    machine-learning
    artificial-intelligence
    cloud-ml
    computer-systems
    courseware
    edge-machine-learning
    embedded-ml
    machine-learning-systems
    mobile-ml
    textbook
    tinyml
    JavaScript
    NOASSERTION
    21.1K stars
    2.5K forks
    21.1K watching
    Updated 2/27/2026
    View on GitHub
    Backblaze Advertisement

    Loading star history...

    Health Score

    75

    Weekly Growth

    +617

    +3.0% this week

    Contributors

    1

    Total contributors

    Open Issues

    37

    Generated Insights

    About cs249r_book

    Machine Learning Systems

    Principles and Practices of Engineering Artificially Intelligent Systems

    Build Last Commit

    Website Ecosystem Citation

    Funding License Powered by Netlify

    πŸ“– Read Online β€’ πŸ’Ύ Download PDF β€’ πŸ’Ύ Download ePub β€’ 🌐 Explore Ecosystem

    πŸ“š Hardcopy edition coming 2026 via MIT Press!


    About This Book

    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.

    Why This Book Exists

    "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


    πŸ“š What You'll Learn

    Go beyond training models β€” master the full stack of real-world ML systems.

    TopicWhat You'll Build
    System DesignScalable, maintainable ML architectures
    Data EngineeringRobust pipelines for collection, labeling, and processing
    Model DeploymentProduction-ready systems from prototypes
    MLOps & MonitoringReliable, continuously operating systems
    Edge AIResource-efficient deployment on mobile, embedded, and IoT

    ⭐ Support This Work

    Show Your Support

    Star this repository to help us demonstrate the value of open AI education to funders and institutions.

    Stars

    Goal: 10,000 stars = $100,000 in additional education funding

    ⭐ Star Now β€” takes 2 seconds!

    Fund the Mission (New!)

    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.

    Open Collective

    From $15/month to sponsor a learner to $250 for workshops β€” every contribution democratizes AI education.


    🌐 Community & Resources

    ResourceDescription
    πŸ“š Main SiteComplete learning platform
    πŸ”₯ TinyTorchEducational ML framework
    πŸ’¬ DiscussionsAsk questions, share insights
    πŸ‘₯ CommunityJoin our global learning community

    🎯 For Different Audiences

    πŸŽ“ Students

    πŸ‘©β€πŸ« Educators

    πŸ› οΈ Contributors


    πŸš€ Quick Start

    For Readers

    # Read online (continuously updated)
    open https://mlsysbook.ai
    
    # Or download PDF for offline access
    curl -O https://mlsysbook.ai/Machine-Learning-Systems.pdf
    

    For Contributors

    git clone https://github.com/harvard-edge/cs249r_book.git
    cd cs249r_book
    
    # Quick setup (recommended)
    ./binder setup      # Setup environment and dependencies
    ./binder doctor     # Check system health
    
    # Fast development workflow
    ./binder preview intro    # Fast chapter development
    ./binder build intro      # Build specific chapter
    ./binder build            # Build complete book (HTML)
    ./binder help            # See all commands
    

    🀝 Contributing

    We welcome contributions from the global community! Here's how you can help:

    Ways to Contribute

    • πŸ“ 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

    Quality Standards

    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

    Start Contributing β†’


    πŸ› οΈ Development

    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                        # Build complete website (HTML)
    ./binder pdf                          # Build complete PDF
    ./binder epub                         # Build complete EPUB
    
    # Management
    ./binder clean                        # Clean artifacts
    ./binder status                       # Show current status
    ./binder doctor                       # Run health check
    ./binder help                         # Show all commands
    

    Development Commands

    # Book Binder CLI (Recommended)
    ./binder setup            # First-time setup
    ./binder build            # Build complete HTML book
    ./binder pdf              # Build complete PDF book  
    ./binder epub             # Build complete EPUB book
    ./binder preview intro    # Preview chapter development
    
    # Traditional setup (if needed)
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r tools/dependencies/requirements.txt
    pre-commit install
    

    Project Structure

    MLSysBook/
    β”œβ”€β”€ 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
    

    Documentation

    Publishing

    Publishing is handled through GitHub Actions workflows for consistent, automated deployment:

    # Build locally to test before publishing
    ./binder build        # Build HTML
    ./binder pdf          # Build PDF  
    ./binder epub         # Build EPUB
    
    # Publishing happens via GitHub Actions
    # See docs/PUBLISH_LIVE_WORKFLOW.md for details
    

    Publishing Workflow:

    • Automated Deployment β€” GitHub Actions workflows handle all publishing
    • Quality Checks β€” Automated validation before deployment
    • Multiple Formats β€” HTML, PDF, and EPUB published simultaneously
    • Preview Deployments β€” Pull requests get automatic preview deployments

    See Publishing Documentation for detailed instructions.

    Getting Started

    # First time setup
    ./binder setup
    
    # Check system health
    ./binder doctor
    
    # Quick preview
    ./binder preview intro
    

    πŸ“‹ Citation & License

    Citation

    @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}
    }
    

    License

    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.


    πŸ™ Contributors

    Thanks goes to these wonderful people who have contributed to making this resource better for everyone:

    Vijay Janapa Reddi
    Vijay Janapa Reddi

    Zeljko Hrcek
    Zeljko Hrcek

    Marcelo Rovai
    Marcelo Rovai

    Jason Jabbour
    Jason Jabbour

    Ikechukwu Uchendu
    Ikechukwu Uchendu

    Kai Kleinbard
    Kai Kleinbard

    Naeem Khoshnevis
    Naeem Khoshnevis

    Sara Khosravi
    Sara Khosravi

    Douwe den Blanken
    Douwe den Blanken

    Jeffrey Ma
    Jeffrey Ma

    shanzehbatool
    shanzehbatool

    Elias
    Elias

    Jared Ping
    Jared Ping

    Itai Shapira
    Itai Shapira

    Maximilian Lam
    Maximilian Lam

    Jayson Lin
    Jayson Lin

    Andrea
    Andrea

    Sophia Cho
    Sophia Cho

    Alex Rodriguez
    Alex Rodriguez

    Korneel Van den Berghe
    Korneel Van den Berghe

    Zishen Wan
    Zishen Wan

    Colby Banbury
    Colby Banbury

    Mark Mazumder
    Mark Mazumder

    Divya Amirtharaj
    Divya Amirtharaj

    Srivatsan Krishnan
    Srivatsan Krishnan

    Abdulrahman Mahmoud
    Abdulrahman Mahmoud

    Aghyad Deeb
    Aghyad Deeb

    marin-llobet
    marin-llobet

    Haoran Qiu
    Haoran Qiu

    oishib
    oishib

    Jared Ni
    Jared Ni

    ELSuitorHarvard
    ELSuitorHarvard

    Emil Njor
    Emil Njor

    Michael Schnebly
    Michael Schnebly

    Aditi Raju
    Aditi Raju

    Jae-Won Chung
    Jae-Won Chung

    Yu-Shun Hsiao
    Yu-Shun Hsiao

    Henry Bae
    Henry Bae

    Shvetank Prakash
    Shvetank Prakash

    Emeka Ezike
    Emeka Ezike

    Andrew Bass
    Andrew Bass

    Jennifer Zhou
    Jennifer Zhou

    Arya Tschand
    Arya Tschand

    Pong Trairatvorakul
    Pong Trairatvorakul

    Matthew Stewart
    Matthew Stewart

    Marco Zennaro
    Marco Zennaro

    Eura Nofshin
    Eura Nofshin

    Bruno Scaglione
    Bruno Scaglione

    Tauno Erik
    Tauno Erik

    Alex Oesterling
    Alex Oesterling

    gnodipac886
    gnodipac886

    Fin Amin
    Fin Amin

    Allen-Kuang
    Allen-Kuang

    TheHiddenLayer
    TheHiddenLayer

    Gauri Jain
    Gauri Jain

    Fatima Shah
    Fatima Shah

    Sercan AygΓΌn
    Sercan AygΓΌn

    The Random DIY
    The Random DIY

    Baldassarre Cesarano
    Baldassarre Cesarano

    Yang Zhou
    Yang Zhou

    yanjingl
    yanjingl

    Abenezer Angamo
    Abenezer Angamo

    Jason Yik
    Jason Yik

    ΰ€…ΰ€°ΰ€¨ΰ€΅ ΰ€Άΰ₯ΰ€•ΰ₯ΰ€²ΰ€Ύ | Arnav Shukla
    ΰ€…ΰ€°ΰ€¨ΰ€΅ ΰ€Άΰ₯ΰ€•ΰ₯ΰ€²ΰ€Ύ | Arnav Shukla

    Aritra Ghosh
    Aritra Ghosh

    happyappledog
    happyappledog

    abigailswallow
    abigailswallow

    Bilge Acun
    Bilge Acun

    Andy Cheng
    Andy Cheng

    Cursor Agent
    Cursor Agent

    Emmanuel Rassou
    Emmanuel Rassou

    Jessica Quaye
    Jessica Quaye

    Vijay Edupuganti
    Vijay Edupuganti

    Shreya Johri
    Shreya Johri

    Sonia Murthy
    Sonia Murthy

    Costin-Andrei Oncescu
    Costin-Andrei Oncescu

    formlsysbookissue
    formlsysbookissue

    Annie Laurie Cook
    Annie Laurie Cook

    Jothi Ramaswamy
    Jothi Ramaswamy

    Batur Arslan
    Batur Arslan

    Curren Iyer
    Curren Iyer

    Fatima Shah
    Fatima Shah

    Edward Jin
    Edward Jin

    a-saraf
    a-saraf

    songhan
    songhan

    jvijay
    jvijay

    Zishen
    Zishen


    Made with ❀️ for AI learners worldwide

    Our goal is to educate 1 million AI systems engineers for the future at the edge of AI.

    Discover Repositories

    Search across tracked repositories by name or description