explaingit

chiphuyen/machine-learning-systems-design

10,368HTMLAudience · developerComplexity · 1/5Setup · easy

TLDR

A free booklet on designing machine learning systems end-to-end, from project setup through data pipelines, model training, and production deployment, plus 27 open ML interview questions with community answers.

Mindmap

mindmap
  root((ML Systems Design))
    Four stages
      Project setup
      Data pipeline
      Model training
      Serving in production
    Study resources
      External links
      Case studies
      Interview questions
    Contributing
      Fix errors
      Add resources
      Submit answers
    Related material
      2022 OReilly book
      Community answers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study the four stages of ML system design (setup, data pipeline, model training, serving) before a technical interview.

USE CASE 2

Use the 27 open-ended ML systems design questions and community answers to practice interview preparation.

USE CASE 3

Contribute edits, new resources, or answers to the open-source booklet via pull request.

Tech stack

HTMLmagicbookPDF

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

This repository contains a short booklet written in 2019 on how to design machine learning systems, covering the process from initial project setup through data handling, model training, and eventually deploying and maintaining a working system. The author, Chip Huyen, describes it as an early attempt to document this topic, and notes that her later O'Reilly book from 2022, titled Designing Machine Learning Systems, is a more thorough and current treatment of the same subject. The booklet follows four stages: setting up the project, building the data pipeline, selecting and training a model, and serving the model in production. Each section links to external resources for deeper reading and includes case studies from machine learning engineers at large tech companies. At the end there are 27 open-ended interview questions on machine learning systems design, with community-contributed answers available in this same repository. This is not a traditional software tool: it is a document built with a package called magicbook that converts text files into HTML and PDF output. The repository includes the source content files and build instructions for anyone who wants to contribute edits or additions to the text. Contributing can mean fixing errors, adding resources, or editing the questions and answers. The README is explicit that this is not the repository for the 2022 O'Reilly book, which has its own separate GitHub repository. Anyone looking for the more current and comprehensive material should consult that book's repository instead. This one remains publicly available as the original draft, along with the community answers it has accumulated.

Copy-paste prompts

Prompt 1
I'm preparing for an ML systems design interview using Chip Huyen's booklet. Give me a mock interview question about designing a real-time recommendation system and walk me through an ideal answer covering the four stages: setup, data pipeline, training, and serving.
Prompt 2
Based on the ML systems design framework from this booklet, help me sketch out the data pipeline for a production fraud detection model, including data sources, labeling strategy, and feature engineering.
Prompt 3
I want to answer one of the 27 ML systems design interview questions: 'How would you design a system to detect spam in real time?' Write a structured answer covering each stage.
Open on GitHub → Explain another repo

← chiphuyen on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.