Why Large Model Training is So Challenging: Parallel Efficiency and System Stability

    This article explores the core challenges of large model training, including the impact of scale on system stability, the non-linear scaling efficiency caused by communication overhead in various parallelism strategies, and the importance of using Model FLOPs Utilization (MFU) as a key metric to evaluate actual computing efficiency.

    1. The Nature of the Problem Changes with Scale

    Early deep learning models typically required only a few GPUs, with training cycles measured in days. If an error occurred midway, rerunning the training was still acceptable in terms of cost. Today’s large model training often requires thousands of accelerators running continuously for weeks or even months. At this scale, minor fluctuations in any component are amplified, and a single failure can waste days of computing power.

    This situation can be compared to a high-speed race car. It must not only run fast but also operate continuously at full load for months without stopping to replace parts. A minor anomaly in any single component could lead to overall system failure. Therefore, the difficulty of large model training lies not just in computing fast enough, but in computing consistently and stably over long periods.

    The main challenges of large model training can be categorized into three types: the decrease in computing efficiency caused by large-scale parallelism, hardware and system failures during long-term operation, and the interplay between algorithmic convergence and engineering implementation. Let’s explore each in detail.

    2. Communication Overhead: Scaling Efficiency is Not Linear

    Many assume that doubling the number of GPUs doubles the speed. In reality, once a model is partitioned across numerous devices, frequent data exchanges are required between them, and communication time increases with scale.

    Common parallelization methods include the following three:

    • Data Parallelism: Each GPU holds a complete model replica and processes different data batches. After backpropagation, gradients must be synchronized.
    • Tensor Parallelism: Matrix operations within a single layer are partitioned across multiple GPUs, requiring collective communication for each layer’s computation.
    • Pipeline Parallelism: The model is partitioned by layers across different devices, which pass intermediate activations to each other. This also creates pipeline bubbles—periods where some devices are idle.

    Each of these methods has its trade-offs. The more devices there are, the higher the proportion of time spent on synchronization. If communication cannot overlap with computation, devices will idle while waiting.

    A common metric for measuring training efficiency is MFU (Model FLOPs Utilization). It is calculated as the actual effective model floating-point operations divided by the theoretical peak hardware performance, reflecting the proportion of hardware compute power genuinely used for model calculations.

    Let’s illustrate this with a hypothetical scenario. Suppose a cluster has 2,000 GPUs. The GPU utilization on the monitoring dashboard might look high, but when converted based on the actual model computation, the MFU is only around 30%. This indicates that most of the time is not spent on effective computation. High GPU utilization might merely indicate that the devices are busy, which includes time spent waiting for data and synchronization. Therefore, looking solely at a single utilization metric can lead to misjudgments; MFU should also be considered.

    A simplified example of calculating MFU is shown below, where hardware peak and throughput values are hypothetical:

    1. def estimate_mfu(tokens_per_second, flops_per_token, num_devices, peak_flops_per_device):
    2. """
    3. tokens_per_second: Number of tokens processed by the entire cluster per second
    4. flops_per_token: Floating-point operations per token during training (common approximation: about 6 times the parameter count)
    5. num_devices: Number of devices participating in training
    6. peak_flops_per_device: Theoretical peak compute power of a single device, should be based on the hardware specs used
    7. """
    8. achieved_flops = tokens_per_second * flops_per_token
    9. peak_total = num_devices * peak_flops_per_device
    10. return achieved_flops / peak_total
    11. mfu = estimate_mfu(
    12. tokens_per_second=...,
    13. flops_per_token=...,
    14. num_devices=...,
    15. peak_flops_per_device=...
    16. )