What Makes Large Model Training Hard: Compute Efficiency and System Stability

    Training LLMs at scale is an engineering challenge that goes far beyond model architecture. This article examines the three intertwined difficulties of large-scale training: compute utilization, parallelization strategy, and system stability. It covers why effective throughput diverges from peak FLOPS, how to measure real efficiency with MFU, the trade-offs among data, tensor, and pipeline parallelism, and how checkpointing and failure recovery keep multi-week training jobs alive on clusters of thousands of GPUs.

    Introduction: Scale Changes the Nature of the Problem

    Early model training typically ran on a handful to a few dozen GPUs. A job would run for a few days, and if something failed, you simply restarted it — the cost of trial and error was manageable. Once model parameters and training data grew together, training became an engineering project involving thousands of accelerators working in concert, running continuously for weeks or even months. At that point, the difficulty no longer comes mainly from model architecture design, but from the coupling among compute utilization, system stability, and the optimization process.

    You can think of this as an endurance race. The car has to sustain high speed while running at full load for a long time, with parts being replaced mid-race. Any jitter in a single subsystem can degrade overall performance or even end the race. The rest of this article analyzes the problem along four dimensions: efficiency, parallelism, fault tolerance, and stability.

    1. Compute Utilization: Why Efficiency Drops as Scale Grows

    1.1 Peak FLOPS Are Not Effective FLOPS

    A cluster’s theoretical peak compute is the sum of the peak compute of every accelerator, but what training actually consumes is effective computation. The gap between the two comes mainly from:

    • Communication waits: time spent synchronizing gradients and activations between devices;
    • Data loading: input data cannot be fed fast enough to keep up with computation;
    • Pipeline bubbles: some devices sit idle while waiting for results from upstream or downstream stages;
    • Kernel launch and small-operator overhead: scheduling losses from large numbers of fine-grained computations.

    These losses are often negligible at small scale, but they are amplified significantly as scale grows.

    1.2 Communication Overhead Grows with Scale

    In data-parallel training, all devices must synchronize gradients at the end of each step, typically via an all-reduce collective operation. In model-parallel scenarios, forward and backward passes also require intermediate results to be passed within or between layers. As the device count increases, communication volume does not necessarily shrink, and the completion time of a synchronized operation is dictated by the slowest node. As a result, with more nodes, the fraction of time spent on computation falls while the fraction spent on communication and waiting rises.

    A simplified model of per-step latency:

    1. Step time ≈ compute time + communication time - overlapped compute/communication time

    The key to improving efficiency is overlapping communication with computation as much as possible, and eliminating unnecessary synchronization waits.

    1.3 Measuring Real Efficiency with MFU

    MFU (Model FLOPs Utilization) is a common metric for training efficiency, defined as the ratio of the model computation throughput actually achieved to the cluster’s theoretical peak throughput:

    1. MFU = achieved model compute throughput / cluster theoretical peak throughput

    For dense Transformer models, a common approximation is that training compute per token is about 6× the parameter count (forward and backward combined). Based on this, the estimation logic is:

    1. def estimate_mfu(tokens_per_second, num_params, num_gpus, peak_flops_per_gpu):
    2. flops_per_token = 6 * num_params
    3. achieved_flops = tokens_per_second * flops_per_token
    4. peak_flops = num_gpus * peak_flops_per_gpu
    5. return achieved_flops / peak_flops

    Suppose a 2,000-GPU cluster achieves only 30% MFU — that means roughly 70% of the hardware investment is not converted into effective computation. GPU utilization monitoring curves may show high occupancy, but occupancy is not the same as effective computation. The two metrics must be considered together; only MFU reflects whether training is truly efficient.

    1.4 Common Ways to Improve Efficiency

    • Overlap computation with communication: launch gradient synchronization during the backward pass to hide part of the communication latency;
    • Choose a sensible combination of parallelism strategies: confine the most communication-intensive tensor parallelism within high-bandwidth domains;
    • Optimize attention operators: attention implementations built around tiled computation and reduced HBM read/writes have become standard practice for long-sequence training, significantly lowering memory usage and improving throughput;
    • Reduce small operators and unnecessary synchronization points, and fuse fragmented computations;
    • Use topology-aware process placement so that processes in the same communication group sit within the same high-speed interconnect domain.

    2. Parallelism Strategies: Three Basic Approaches and Their Costs

    When a model does not fit on a single device, the computation must be partitioned across multiple devices. There are three common partitioning strategies, each with its own use cases and costs.

    2.1 Data Parallelism

    Each device holds a complete replica of the model, processes a different data batch, and synchronizes gradients at the end of each step. It is simple to implement and scales well, but every device must store the full parameters, gradients, and optimizer states, so memory consumption is high. When the model exceeds single-device memory, data parallelism alone is no longer sufficient.

    2.2 Tensor Parallelism

    Matrix operations within a single layer are split across multiple devices, each computing only a portion. This breaks through the per-layer memory limit, but every intra-layer computation requires communication. Because of the high communication frequency, it is typically used only within a node’s high-bandwidth interconnect domain.

    2.3 Pipeline Parallelism

    The model is divided into stages by layer, with different stages placed on different devices, and data flows through the stages like an assembly line. It has low bandwidth requirements and is suitable for cross-node deployment, but it suffers from pipeline bubbles. A common mitigation is to split the batch into multiple micro-batches so each stage can start working as early as possible, and to use an appropriate schedule to reduce idle time.

    Comparison of the three strategies:

    Strategy Problem it solves Main cost Typical deployment scope
    Data parallelism Increases throughput, scales data volume Memory redundancy, gradient synchronization Across nodes
    Tensor parallelism Per-layer parameters and activations too large Frequent intra-layer communication Within a node
    Pipeline parallelism Many layers, insufficient memory Pipeline bubbles, complex scheduling Across nodes

    2.4 Hybrid Parallelism and Configuration Choices

    Real-world large-scale training usually combines all three strategies. The total device count equals the product of the three parallelism degrees, and configuration choices must account for memory, bandwidth, and batch size simultaneously:

    1. parallel_config = {
    2. "tensor_parallel": 8, # confined to a single node's high-bandwidth domain
    3. "pipeline_parallel": 8, # split layers across nodes
    4. "data_parallel": 32, # number of data replicas
    5. "micro_batch_size": 1, # samples per forward pass
    6. "global_batch_size": 1024,
    7. }
    8. world_size = tensor_parallel * pipeline_parallel * data_parallel # 8 * 8 * 32 = 2048
    9. grad_accum_steps = global_batch_size // (micro_batch_size * data_parallel) # 1024 / 32 = 32

    There is no universally optimal configuration. The tensor parallelism degree usually should not exceed the number of accelerators in a single node; the pipeline parallelism degree must divide the number of layers evenly; and the data parallelism degree is determined by the remaining devices. Once a configuration is chosen, measure MFU and per-step latency at small scale before scaling up to the full cluster.

    3. System Stability: Hardware Failures Are the Norm

    3.1 Failure Rates Compound with Scale

    Assuming component failures are independent, a cluster’s mean time between failures is approximately the single-device MTBF divided by the number of devices. A single device’s MTBF may look long, but with thousands of devices, cluster-level failures become frequent. Beyond accelerators, memory, NICs, power supplies, storage, and network switches can all fail. A training job lasting several weeks will almost certainly encounter multiple interruptions.

    3.2 Checkpointing

    Checkpointing is the foundation of fault tolerance. During training, model parameters, optimizer states, learning rate scheduler states, and the data loading position are periodically saved to reliable storage, so training can resume from the most recent checkpoint after a failure.

    The checkpoint interval involves a trade-off between two factors: too long an interval means more computation lost per failure; too short an interval means saving overhead consumes training time and storage bandwidth. A classic estimation formula comes from fault-tolerance research in high-performance computing:

    1. Optimal checkpoint interval ≈ sqrt(2 × time per save × mean time between failures)

    For example, if one save takes 2 minutes and the cluster fails on average every 6 hours, the formula gives an interval of about 80 minutes. The actual interval should also be adjusted based on storage performance and business tolerance.

    Checkpoint saving is best done asynchronously, so that computation and writing proceed in parallel and training does not stop for every save. A reference flow:

    1. def train(model, optimizer, data_loader, ckpt_manager, total_steps, ckpt_interval):
    2. start_step = ckpt_manager.load_latest(model, optimizer) # returns 0 if no checkpoint exists
    3. for step in range(start_step, total_steps):
    4. batch = next(data_loader)
    5. loss = forward_backward_step(model, batch)
    6. optimizer.step()
    7. if step % ckpt_interval == 0:
    8. ckpt_manager.save_async(
    9. step=step,
    10. model=model,
    11. optimizer=optimizer,
    12. data_state=data_loader.state(), # record the data loading position
    13. )

    3.3 Reproducibility After Recovery

    Many training incidents are caused not by the failure itself, but by the recovery process. Common problems include:

    • The data loading position is not restored, causing some samples to be trained repeatedly or skipped.