Why Large Model Training Is So Hard

    This article explains why training large models is difficult, moving beyond model architecture to the systems engineering required at scale. It covers the four main bottlenecks: memory and compute limits, distributed parallelism trade-offs, numerical stability and convergence, and data engineering plus fault tolerance. It also includes a practical optimization checklist for improving throughput, stability, and recoverability.

    Introduction: From “It Runs” to “It Converges”

    When early pre-trained models with hundreds of millions of parameters appeared, the industry mainly cared about one question: “Does it perform better?” But once parameter counts crossed into the hundreds of billions, training itself shifted from an algorithm experiment into a systems engineering problem that demands careful design.

    Scaling up is not a linear amplification. Memory usage, communication overhead, failure probability, and hyperparameter sensitivity all degrade at the same time. If any single link is handled poorly, an expensive training run can fail after only a few hours.

    The “difficulty” of large models has therefore moved away from “Is the model architecture novel?” toward “Can we complete training on limited hardware in a stable, efficient, and reproducible way?” The sections below break this down across four layers.

    1. Memory and Compute: The First Wall from Scale

    During training, memory is consumed mainly by four components: model parameters, gradients, optimizer states, and activations. Take a common adaptive optimizer as an example: it stores first- and second-order moments for each parameter, and mixed-precision training keeps an additional high-precision copy of the master weights. As a result, “parameter count × a constant” is already a huge cost. Activations grow with batch size and sequence length, and this growth is especially pronounced in long-context scenarios.

    A simple way to estimate this (illustrative only, not measured data):

    1. def rough_memory_gb(params_b, bytes_per_param=16, activation_gb=0):
    2. # 16 bytes/param: rough scale of weights + gradients + optimizer states + high-precision copy
    3. return params_b * 1e9 * bytes_per_param / (1024 ** 3) + activation_gb
    4. print(rough_memory_gb(175, 16, 200)) # params (in billions) -> rough memory estimate

    The conclusion is straightforward: a single device never has enough capacity, so you must shard. How you choose to shard is the core tension discussed next.

    2. Distributed Parallelism: No Free Lunch in Sharding Strategy

    The mainstream approach combines three types of parallelism, each with its own cost:

    • Data parallelism: Each device holds a full model replica and shards the data. It is simple to implement, but optimizer states are redundant, and the communication volume for gradient synchronization grows with scale.
    • Tensor parallelism: A single layer’s matrix computation is split horizontally across devices. It has good computational locality, but every layer requires collective communication, making it extremely sensitive to inter-device bandwidth. It is typically used only within a single machine.
    • Pipeline parallelism: Layers are split vertically into stages. Communication volume is small, but it introduces pipeline bubbles, which must be reduced through micro-batch scheduling and recomputation.

    The real engineering challenge is the “ratio”: if you choose the wrong parallel degrees, either communication saturates the bandwidth or bubbles take up too large a share, and overall compute utilization may end up being only a small fraction. There are also memory optimization techniques such as activation recomputation (trading compute for memory), optimizer state sharding, mixed precision, and communication compression. These interact with one another and require joint tuning rather than being enabled individually.

    3. Numerical Stability and Convergence: The Hardest Part to Reproduce

    The larger the scale, the more “sensitive” training becomes. Common problems include: loss spiking and then diverging, gradient norms fluctuating wildly, attention logits overflowing numerically, and normalization layers producing unstable statistics under small batches. Common industry countermeasures include: gradient clipping, learning rate warmup and cosine decay, initialization scale control, choosing a stable position for normalization layers, and rolling back from a checkpoint while skipping anomalous data batches.

    Illustrative protection logic:

    1. for step, batch in enumerate(loader):
    2. with autocast(dtype="bfloat16"):
    3. loss = model(batch).loss
    4. if not torch.isfinite(loss): # non-finite value: skip and roll back
    5. optimizer.zero_grad(set_to_none=True)
    6. continue
    7. loss.backward()
    8. grad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)
    9. optimizer.step()
    10. optimizer.zero_grad(set_to_none=True)

    The difficulty is that these problems often surface only after tens of hours of training and are hard to reproduce offline, making troubleshooting costly.

    4. Data Engineering and Fault Tolerance: The Underrated Workload

    On the data side, work includes cleaning, deduplication, quality grading, mixing ratios, and ordering, which directly determine the upper limit of final performance. On the engineering side, the core is fault tolerance: training with hundreds of billions of parameters can take weeks, and hardware failures are almost inevitable. A reliable approach is to periodically and asynchronously save checkpoints, record data read positions for precise resumption, perform health checks and isolation on slow nodes, and unify logs, metrics, and alerts into a logging service and monitoring/alerting system to detect anomalies early.

    5. A Practical Optimization Checklist

    1. Measure single-device baseline throughput first, then decide the parallelism ratio, avoiding blindly stacking devices.
    2. Enable activation recomputation and optimizer state sharding first, then consider more aggressive compression.
    3. Set up small-scale “proxy experiments” to validate hyperparameters and stability strategies with short training runs.
    4. Checkpoint saving and data position recording must exist as a pair; otherwise resumption will introduce data bias.
    5. Connect unified monitoring and alerting throughout the entire training process, reducing fault detection time from hours to minutes.

    In related practices at Baidu AI Cloud, this kind of work is typically carried by a container platform to host training tasks, object storage to save checkpoints and datasets, and a logging service plus monitoring and alerting for observability—a common infrastructure combination in the industry.

    Conclusion

    The difficulty of large model training is essentially that “scale” compresses the fault-tolerance margin of engineering details to nearly zero. Understanding the four main threads—memory composition, parallelism trade-offs, numerical stability, and fault-tolerant recovery—is more valuable than memorizing any single technique.