Design a Machine Learning Platform
Understanding the Problem
🧪 What is a machine learning platform? An ML platform is the shared infrastructure a company's data scientists and ML engineers use to take a model from idea to production: getting labeled data, running training experiments on GPUs, tracking what was tried, packaging the winner and serving it behind an API. Uber's Michelangelo, Meta's FBLearner and the managed clouds (SageMaker, Vertex AI) are well-known examples. The point of building one is that every team stops reinventing the same pipeline, and every model in production can be traced back to the exact data and code that made it.
You will also hear "design a data labeling system at scale" or "design auto-labeling." Labeling is the first stage of the same platform: it produces the versioned datasets that training consumes, and its best tool (pre-labeling with a model) uses the platform's own serving layer. We'll treat it as one of the core requirements here rather than a separate system.
Functional Requirements
An ML platform can grow to include notebooks, feature stores, vector search, pipelines and dashboards. Agree with your interviewer up front which stages of the model lifecycle you're designing. We'll cover the path from data to a live endpoint.
Core Requirements
- Users should be able to create labeling projects and get back versioned, labeled datasets, with humans and models doing the labeling.
- Users should be able to run training experiments on shared GPUs and track and compare every run's parameters, metrics and artifacts.
- Users should be able to register a trained model and deploy it to an online endpoint, with staged rollout and rollback.
- Applications should be able to get predictions from deployed models, and owners should be able to monitor them in production.
Below the line (out of scope)
- The feature store. It's a system of its own; see Feature Store.
- Hosted notebooks and the IDE experience.
- LLM-specific fine-tuning workflows (LLM fine-tuning) and large offline scoring jobs (batch inference). We'll show where they plug in.
Non-Functional Requirements
Ask your interviewer how big the company is. For our design: 1,000 data scientists in a few hundred teams, a shared fleet of 4,000 GPUs, about 10,000 training runs a day (mostly small, a few multi-node), 500 models in production serving 1M predictions per second in total, and 10M human labels a month.
Core Requirements
- Every production model should be reproducible: traceable to its code commit, dataset version, config and container image.
- The GPU fleet should be shared fairly between teams and kept busy (target above 70% allocation), and a typical job should start within minutes.
- Online serving should handle 1M QPS in aggregate with p99 under 50 ms for typical models, 99.95% availability, and rollback in under a minute.
- Labeling should hit a measured quality bar (for example 95% accuracy on audited items) at a controlled cost per label.
- Teams should be isolated: one team's runaway job or bad deploy can't starve or break another team.
Below the line (out of scope)
- Multi-region active-active training. Serving runs in multiple regions; training runs where the GPUs are.
- Regulatory model governance beyond an audit log and approvals.
Two numbers shape this design. First, GPU cost. At roughly $2 per GPU-hour, 4,000 GPUs cost about $8,000 an hour, or around $70M a year. If utilization sits at 40% (common when each team owns its own machines), the fleet does 1,600 GPUs' worth of work. Doing that same work at 70% needs only about 2,300 GPUs, which saves on the order of $30M a year. The scheduler is where the money is.
Second, the shape of serving traffic. 1M QPS across 500 models is not 2,000 QPS each. Traffic is heavily skewed: a handful of ranking and fraud models take most of it, while hundreds of models serve a few requests per second. If every model gets its own always-on replicas with a GPU, most of those GPUs sit idle.
Lead with this framing: an ML platform is mostly a scheduling, metadata and deployment system. The ML happens inside user code. Your job is to give that code data, compute, a record of what it did and a safe path to production.