Running an LLM Training Pipeline on a Domestic GPU Cluster: A 16-GPU, 400-Step Validation

    This article analyzes the engineering requirements of LLM training and a recent validation in which a domestic GPU platform with two nodes and 16 accelerators completed 400 iterations of an LLM training pipeline. It explains why end-to-end pipeline validation is a key milestone, reviews the hardware interconnect and hybrid parallelism design, mixed-precision and memory optimization, platform adaptation work, and monitoring and checkpoint recovery practices. It also outlines what must be addressed when moving from a small validation cluster to production-scale training, including communication efficiency, fault tolerance, and MFU retention.

    1. Background: Strict Requirements for the LLM Training Pipeline

    LLM training is essentially a full stress test of compute, memory capacity, interconnect bandwidth, and software ecosystem. As model parameter counts rise from billions to hundreds of billions, the training pipeline must not only support massive forward and backward computation but also solve engineering problems such as gradient synchronization, memory overflow, and data movement. For a long time, the training ecosystem has been built mainly around a few mainstream accelerator families, and whether domestic GPUs can truly run an end-to-end LLM training pipeline has remained a key industry concern.

    A recent milestone shows that a domestic GPU platform, configured as a two-node cluster with 16 accelerators in total, completed a 400-step iteration validation of an LLM training pipeline. The number may seem modest, but its significance lies in completing the pipeline: the full loop from data loading, tokenization preprocessing, distributed initialization, forward computation, backpropagation, gradient synchronization, and parameter updates to checkpoint resume has been verified as feasible. For engineering teams, getting the pipeline to run end to end is the first threshold toward scale-out training.

    2. Why “Running the Training Pipeline End to End” Is a Key Milestone

    Many readers may ask: what can only 400 steps prove? It helps to understand the layers of LLM training engineering:

    1. Functional correctness: Whether the computation graph can be built correctly, whether operators are complete, and whether gradients are numerically correct. This requires the accelerator vendor to provide complete operator adaptation for deep learning frameworks.
    2. Distributed correctness: Whether communication primitives between multiple GPUs, such as AllReduce, AllGather, and ReduceScatter, work correctly, and whether the cross-node network can support high-bandwidth, low-latency gradient exchange.
    3. Long-term stability: Training often lasts for weeks. Any memory leak, communication deadlock, or numerical anomaly, such as loss spikes or NaN, can interrupt the job. Running hundreds of steps is an initial validation of stability.
    4. Performance feasibility: Throughput and MFU (Model FLOPs Utilization) reach acceptable levels, and scaling linearity after expansion can be predicted.

    Therefore, “two nodes, 16 GPUs, 400 steps” is more like a full-pipeline system integration validation: it proves that the hardware, driver, communication library, framework, parallelism strategy, and scheduling system can work together.

    3. Key Technical Components of the Two-Node, 16-GPU Cluster

    3.1 Hardware and Interconnect Topology

    In a two-node, 16-GPU configuration, each node usually carries 8 accelerators. The topology design for inter-GPU communication directly affects training efficiency:

    • Intra-node interconnect: The 8 GPUs within the same node are connected through a high-bandwidth interconnect bus in a full or partial topology, carrying high-frequency communication generated by tensor parallelism and pipeline parallelism.
    • Cross-node interconnect: The two nodes are connected through a high-speed network, such as multi-channel RDMA NICs, mainly carrying data-parallel gradient synchronization and cross-node activation transfer.

    From an engineering perspective, topology-aware parallel mapping is needed to place the most communication-intensive parallel dimension on the highest-bandwidth link. An illustrative topology check is shown below:

    1. # Check intra-node inter-GPU interconnect topology
    2. topo_check --show
    3. # Confirm cross-node RDMA link connectivity
    4. rdma_test -pairs 8 --bw

    3.2 Hybrid Parallelism Strategy

    For models above the 10-billion-parameter scale, a single parallelism strategy cannot satisfy both memory and efficiency requirements, so hybrid parallelism is typically used:

    • Data parallelism (DP): Multiple data replicas are processed in parallel, and gradients are synchronized through AllReduce. It has the best scalability and is usually the outer strategy.
    • Tensor parallelism (TP): A single operator, such as attention heads or MLP layers, is split across multiple GPUs. Communication is frequent, so it is suitable for intra-node placement.
    • Pipeline parallelism (PP): The model is split by layers across different GPUs to reduce per-GPU memory pressure. When deployed across nodes, it can amortize cross-node communication costs.
    • Sequence parallelism and optimizer state sharding: Activations and optimizer states are further partitioned to handle memory peaks in long-sequence training.

    In a two-node, 16-GPU setup, a typical configuration is: 8 GPUs within a node for tensor parallelism and sequence parallelism, while pipeline or data parallelism spans the two nodes. The exact combination must be tuned against the model structure and measured communication overhead.

    3.3 Mixed Precision and Memory Optimization

    Training usually uses BF16/FP16 mixed precision, combined with the following techniques to control memory:

    1. # Pseudocode: core mixed-precision training flow
    2. scaler = LossScaler(enable=use_fp16)
    3. with autocast(dtype=compute_dtype):
    4. loss = model(data)
    5. scaled_loss = scaler.scale(loss)
    6. scaled_loss.backward()
    7. scaler.unscale_(optimizer)
    8. grad_clip(optimizer) # Gradient clipping for training stability
    9. optimizer.step()

    In addition, activation checkpointing, CPU offload, and sharded optimizer states can reduce memory usage by an order of magnitude. The cost is different degrees of recomputation or data transfer overhead, so these techniques should be enabled based on available memory headroom.

    4. Core Engineering Points for Domestic Platform Adaptation

    To make the training pipeline truly run on domestic accelerators, several layers of adaptation are usually required:

    1. Operator-layer adaptation: Operators in mainstream deep learning frameworks need to be implemented or optimized one by one on domestic hardware, especially matrix multiplication, efficient attention implementations such as FlashAttention, and various reduction and fusion operators. Operator coverage and execution accuracy directly determine whether training can start.
    2. Communication library adaptation: Collective communication libraries need deep optimization for the interconnect characteristics of domestic GPUs, including alternative implementations of NCCL-like interfaces, stable cross-node RDMA connections, and topology-aware routing.
    3. Framework and scheduling adaptation: The parallelism strategies, fault tolerance mechanisms, and checkpoint save/restore capabilities of distributed training frameworks must be fully validated on domestic platforms. The job scheduler must be aware of multi-node topology and allocate resources correctly.
    4. Precision alignment validation: The outputs of key layers should be numerically compared with a reference implementation to confirm that errors are within an acceptable range, avoiding the hidden risk of “it runs but the results are wrong.”
    5. Long-duration stability testing: Run continuously for hundreds to thousands of steps, monitor loss curve smoothness, gradient norm, load balance across GPUs, temperature, and power, and investigate occasional hangs or performance jitter.

    5. Monitoring and Stability Assurance Practices

    During the 400-step validation, the monitoring system played an important role. A complete training monitoring setup usually covers:

    • Training metrics: Loss curve, learning rate, gradient norm, and variance in per-step time.
    • System metrics: Utilization of each GPU, memory usage, interconnect bandwidth utilization, and cross-node network retransmission rate.
    • Alerting: Timely alerts when loss shows abnormal spikes or when the utilization of a GPU deviates significantly from the average, combined with automatically saved checkpoints for fast recovery.

    Checkpoint resume capability is especially critical. The training job persists model weights, optimizer states, and data reader position every N steps, so that after a failure it can resume from the latest checkpoint instead of retraining from scratch.

    6. Significance and Outlook

    Running 400 steps on two nodes with 16 GPUs validates the feasibility of the pipeline from 0 to 1. True scale-out training still needs to solve the 1-to-N problem: communication efficiency when scaling to hundreds or thousands of GPUs, failure rate and fault-tolerance overhead, and the ability to maintain MFU. This progress indicates that domestic compute is filling key gaps in the LLM training ecosystem, from single-point compute to system-level training capability, and further to deep compatibility with the open-source framework ecosystem.

    For teams planning to adopt domestic compute, a recommended implementation path is: first run the model pipeline on a small cluster and perform precision alignment, then gradually expand the parallelism scale and continuously tune communication and parallelism strategies, and finally complete sufficient long-duration stability stress testing before large-scale training. Self-reliant compute is a system engineering effort, and each step forward in pipeline-level validation increases the certainty of scale-out training.