Train a Trillion-Parameter Model With Weights Streamed From External Memory
Last updated: November 29, 2026
Quick Overview
Design a training system where model weights live in an external parameter store and are streamed layer by layer to a cluster of accelerators that hold activations on chip, with gradients reduced back to the store, so model size and cluster size scale independently.
Cerebras
November 29, 20260
0
0 solved
Design a training system where model weights live in an external parameter store and are streamed layer by layer to a cluster of accelerators that hold activations on chip, with gradients reduced back to the store, so model size and cluster size scale independently.
Weight streaming is the idea behind pairing wafer-scale systems with an external weight store and a broadcast and reduce fabric. ML systems candidates are expected to reason about bandwidth, overlap of compute and communication, where the optimizer runs, and how this compares to GPU-style model parallelism.
What the Interviewer Expects
- Explains the data flow: broadcast weights per layer forward, reduce gradients per layer backward
- Places the optimizer step and optimizer state in the external store
- Computes the bandwidth needed to keep compute busy and shows overlap via prefetch
- Contrasts with tensor and pipeline parallelism (no model partitioning across devices)
- Covers checkpointing and failure of a single accelerator
- Discusses activation memory limits and recomputation
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- What limits scaling as you add more accelerators?
- How would you support mixture-of-experts layers in this design?
- Where would you apply gradient compression and what does it risk?
- How do you choose batch size per system?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Train dense transformers up to about 1T parameters on N accelerator systems. Each system has tens of GB of fast on-chip memory, not enough for all weights but enough for one layer's weights plus a mic...
High-Level Design
Three parts. (1) A parameter store cluster holding weights and optimizer state (for Adam in mixed precision, about 16 bytes per parameter, so roughly 16 TB for 1T parameters) on DRAM and flash. (2) An...