MLCrack

    ML SYSTEM DESIGN (DEEP DIVES) · INTERVIEW QUESTION

    Design the training infrastructure for a 70B-parameter foundation model on 1000+ H100 GPUs.

    ⚫ expert · Training Infrastructure

    Hint: 3D parallelism (TP+PP+FSDP), data prep, stability tricks, checkpointing, failure recovery, MFU as the metric.

    Answer

    1. Problem Formulation

    "Train a foundation model on a 1000+ GPU cluster." This is a systems engineering problem as much as an ML one.

    Clarifying questions:

    • Model size? Assume a 70B-parameter dense Transformer (mainstream as of 2025). Methods extend to MoE and >100B with adjustments.
    • Compute? ~1024 H100 GPUs in a single cluster, 8 GPUs per node, 400G InfiniBand or NVLink-Switch fabric.
    • Tokens? Assume 15T tokens. For 70B dense parameters, 6NT ≈ 6.3e24 FLOPs; 1024 GPUs sustaining 300–400 TFLOP/s each imply about 178–237 days before additional downtime, not 30–60 days. A shorter schedule needs fewer tokens or more sustained aggregate compute. This is deliberate overtraining (~214 tokens/parameter), not the classic ~20-token/parameter compute-optimal Chinchilla allocation; it may amortize inference cost.
    • Budget? Cluster costs ~25/GPU−hourall−in;a1−monthrunon1024GPUs≈25/GPU-hour all-in; a 1-month run on 1024 GPUs ≈ 18M. So every hour of failed training matters.
    • Goal? Pretraining for a general-purpose base model, with eval on standard benchmarks (MMLU, GSM8K, HumanEval).

    Why ML systems design and not just "run PyTorch"? A 70B model has ~140GB of weights in FP16 — won't fit in any single GPU. FP32 Adam moments add ~560GB, and separate FP32 master weights add ~280GB where used. Gradients and activations add further memory that depends on precision, sequence length, microbatch and checkpointing; activations do not universally dwarf the state. We must parallelize, and the parallelism strategy is the central design decision.

    This is the opening of a longer walkthrough. Read the full answer in the topic explorer, free.

    Likely follow-up: How would you adapt this design for a Mixture-of-Experts model with expert parallelism?