Domestic GPUs Complete Next-Gen LLM Training Pipeline: 2-Node 16-GPU Setup Passes 400-Step Stability Verification

    This article explores a recent milestone where a domestic GPU cluster successfully ran a next-generation large model training pipeline in a 2-node, 16-GPU configuration, completing 400 stable iterations. It covers the hardware topology design, 3D parallel strategy, memory avoidance in data loading, topology-aware AllReduce optimizations, and crash consistency for checkpoint resumption. Furthermore, it discusses a universal methodology for performance bottleneck localization and the future evolution from "runnable" to "usable" domestic compute stacks.

    I. Background: The Inflection Point of Domestic Compute and LLM Adaptation

    As large model parameter scales cross the hundred-billion or even trillion threshold, the computational demands of training tasks have long exceeded the physical limits of a single machine with a single GPU. Meanwhile, driven by the need for technological autonomy, whether the training pipeline can stably run on domestic GPUs has become a core metric for measuring ecosystem maturity. Recently, a landmark progress emerged: a cluster based on domestic GPUs successfully ran the complete training pipeline of a next-generation large model (corresponding to the industry’s cutting-edge hundred-billion-level MoE architecture) under a 2-node, 16-GPU configuration, completing 400 stable iterations. This is not simply “being able to run,” but means that in the complete closed-loop of data loading, forward and backward computation, gradient synchronization, parameter updates, logging, and checkpoint saving, the domestic compute stack has demonstrated convincing engineering maturity.

    From a broader perspective, the significance of this verification lies in touching the “deep water zone” of large model training: multi-node communication stability. Single-node 8-GPU training typically relies on high-bandwidth intra-domain interconnects like NVLink, whereas 2-node 16-GPU setups must depend on RDMA networks such as RoCE or InfiniBand. The performance of domestic GPUs in such scenarios determines whether they can truly enter the core training clusters of top-tier large model vendors.

    II. Overall Design of the 2-Node 16-GPU Training Pipeline Verification

    1. Logic of Hardware Topology and Cluster Configuration

    The hardware environment for this training pipeline verification can be abstracted into the following topology:

    • Compute Nodes: 2 domestic GPU servers, each equipped with 8 full-function GPUs interconnected with the CPU via PCIe Switches.
    • High-Speed Network: RDMA NICs (supporting RoCEv2 protocol) configured between nodes, utilizing a non-blocking leaf-spine network topology to ensure inter-node communication bandwidth is no less than the equivalent level of mainstream InfiniBand.
    • Storage Side: A parallel file system used as the shared storage pool for training data, with metadata servers separated from storage nodes to avoid IO bottlenecks.

    The core challenge of this configuration lies in the data path contention between the PCIe Switch and the RDMA NIC. During the 400-step training process, if the collective communication traffic (such as AllReduce) is too large, it can easily saturate the PCIe bandwidth, leading to NIC queue overflow and retransmission.

    2. Composite Selection of Parallel Strategies

    For a hundred-billion-level parameter model, relying solely on a single parallel strategy cannot meet the dual constraints of memory and compute. This verification adopted the industry-standard “3D Parallel” hybrid strategy:

    • Data Parallelism: Data is partitioned along the batch dimension, with each GPU holding a complete model replica.
    • Tensor Parallelism: Weights are partitioned along the matrix multiplication dimension (e.g., column-wise or row-wise parallelism) to reduce per-GPU memory footprint.
    • Pipeline Parallelism: The model is partitioned by layers into stages, improving device utilization through micro-batch scheduling.

    The key optimization point is that the partition granularity of tensor parallelism needs to match the intra-domain topology of the GPU’s NVLink, while the number of pipeline parallel stages needs to align with the number of nodes to avoid excessive cross-node pipeline bubbles.

    III. Key Technical Practices and Engineering Details

    1. Memory Avoidance Strategy for the Data Loading Pipeline

    In long-sequence training scenarios, data preprocessing (such as Tokenization and Mask generation) can easily become the culprit for GPU idle waiting. To circumvent this issue, the engineering team adopted a three-tier pipeline mechanism: asynchronous data loading + CPU memory staging + GPU memory pre-reservation:

    1. # Pseudo code: Data loading pipeline
    2. train_loader = DataLoader(
    3. dataset,
    4. batch_size=sequence_length * micro_batch_size,
    5. num_workers=8,
    6. prefetch_factor=16, # Increase prefetch amount to cover IO latency
    7. pin_memory=True, # Pin memory to accelerate H2D copy
    8. persistent_workers=True # Avoid repeated worker creation overhead
    9. )

    A larger engineering focus is that when the input sequence length exceeds 4K, the intermediate activations of the Attention layer grow exponentially. Relying solely on asynchronous data cannot fundamentally cure memory bloat, so activation recomputation technology was applied. This means that intermediate results are not fully retained during forward propagation but are recomputed during backward propagation. This reduced activation memory usage by about 60%, freeing up space for larger batch sizes.

    2. Topology-Aware AllReduce Optimization

    The communication pattern in a 2-node, 16-GPU environment differs vastly from a single-node 8-GPU setup. In this verification, the intra-node traffic generated by tensor parallelism prioritized the PCIe Switch intra-domain interconnect, while the gradient synchronization traffic generated by data parallelism traversed the RDMA network. Since gradient AllReduce is required for every step during the 400-step training, any minor communication jitter is amplified a hundredfold.

    Specific optimization methods include:

    • Gradient Compression: A hybrid scheme of TopK gradients and quantized gradients was used to compress gradient tensors from FP32 to FP16 for transmission, followed by de-quantization at the receiving end. The iterative convergence curve was nearly lossless.
    • Communication and Computation Overlap: Utilizing PyTorch’s CUDA Stream mechanism, gradients were split into multiple shards. While the Backward computation processed the current shard, a background Stream synchronized the transmission of the previous shard. Measurements showed that this overlap strategy reduced the communication overhead proportion from a typical 25% down to 11%.
    • Ring AllReduce Tuning: The default ring size was adjusted from 2 to number of nodes × 2 - 1 (i.e., 3), reducing the number of message splits on the cross-node ring and lowering tail latency.

    3. Crash Consistency for Checkpoint Resumption

    While a 400-step span is not long, it is enough to expose the classic pain point of distributed training—a single point of failure causing the entire run to be scrapped. During the verification, the team specifically simulated an exception test by “terminating the training process.” In terms of engineering implementation, checkpoint saving adopted an async disk write + temporary file atomic replacement strategy:

    • At every save interval (set to 50 steps in this verification), the model State_dict, optimizer State_dict, and RNG states were serialized to a temporary file in the shared storage.
    • After writing was completed, an os.replace() atomic operation was executed to prevent the training process from writing a corrupted checkpoint halfway due to a power outage.
    • During recovery, the global step file was read to dynamically rebuild the DDP (Distributed Data Parallel) bucket allocation, preventing parameter misalignment caused by inconsistencies between the new cluster’s Rank order and the old cluster’s.

    Additionally, for the expert parameter routing table specific to the MoE (Mixture of Experts) architecture model, a CRC32 checksum was specifically added to ensure that the expert load balancing state did not experience hidden drift after recovery.

    4. Stability Observation: From “Reading Logs” to “Watching Metrics”

    Running 400 steps does not mean the training process is healthy. To quantify “stability,” a three-tier observation system was established during the verification:

    • System Layer: Monitored the RoCE NIC’s rx_packets, tx_bytes, and retransmission rate. If a retransmission rate exceeding 0.1% was observed, the congestion control algorithm window was adjusted immediately.
    • Framework Layer: Recorded the operator execution time for each micro-batch, focusing on the time variance of memory-intensive operators like LayerNorm and Softmax. If the variance exceeded 5% of the mean, it was determined to be inter-process clock drift or GPU memory ECC errors.
    • Algorithm Layer: Tracked the ratio of gradient norm to loss value (i.e., gradient noise scale) to ensure that the improved stability of the training pipeline did not introduce additional numerical noise.

    IV. Universal Methodology for Performance Evaluation and Bottleneck Localization

    During this 400-step verification, the team discovered through profiling tools that compute resource utilization (including communication wait time) remained in a relatively healthy range, but PCIe bandwidth was the initial bottleneck. Subsequently, by adjusting the intermediate activation caching strategy and keeping some temporary tensors directly in GPU memory to avoid frequent H2D copies, a throughput improvement of about 7% was achieved.

    This case reveals the core contradiction of large model training optimization: the bottleneck is often not in the compute power itself, but in data movement and synchronization protocols. For developers, reusable experiences include:

    1. Prioritize Locating Communication Hotspots: Use timelines exported by nsys or torch.profiler, sort by communication time, and prioritize optimizing the top 3 collective communication primitives with the highest time consumption.
    2. Beware of Cross-NUMA Access on PCIe Switch: Ensure that the memory allocation of each GPU and the cores of its bound CPU are on the same NUMA node, avoiding extra latency from remote memory access.
    3. Verify Power and Thermal Limits: During the 400-step full-load operation across two machines, if the GPU core temperature exceeds the design threshold, frequency reduction will be triggered, and in severe cases, causing synchronization wait timeouts.

    V. Three-Stage Evolution from “Runnable” to “Usable”

    This 2-node, 16-GPU 400-step verification marks that domestic GPUs have completed the preliminary proof of being “usable” at the framework adaptation level. However, to move towards “usable,” continued deep cultivation is needed in the following dimensions:

    • Elastic Fault Tolerance: Refine the fault tolerance granularity of a single training session from “whole machine restart” to “faulty card isolation,” achieving minute-level self-healing through online Rollback Recovery.
    • Operator Fusion: Develop customized fused kernels for the Gather/Scatter operations of MoE models to reduce CPU overhead from kernel launches.
    • Automatic Parallel Strategy Search: Before training, use a simulator to budget the theoretical time under different parallel combinations to calculate the globally optimal partition scheme, rather than relying on manual expert configuration.

    For enterprise developers, more attention should be paid to how to distill such verification experiences into internal standard test suites, covering different scenarios like long sequences, large batches, and sparse activations, forming a reusable “training stability acceptance baseline.”

    VI. Conclusion

    Completing 400 stable training steps at a 2-node, 16-GPU scale, though just a small step in the journey of large model training, provides a solid footnote for the overall feasibility of the domestic compute stack. It demonstrates that with the support of key engineering methods such as data parallel bandwidth optimization, memory compression storage, and communication-computation overlap, non-interconnect barriers have been effectively overcome. As domestic GPUs continue to iterate on driver maturity and collective communication library efficiency, larger-scale and longer-cycle training verifications will no longer be a question of “whether it can run,” but an engineering optimization problem of “how to run it cheaper and faster.” In this long race of computing autonomy, every steady iterative step is an accumulation of ecosystem trust.