Domestic GPUs Complete the Full LLM Training Pipeline: A Dual-Node, 16-GPU Practice Run
A step-by-step look at how a dual-node, 16-GPU cluster built on domestic GPUs successfully ran a large language model training pipeline for 400 stable steps, covering distributed architecture design, compute adaptation, cross-node communication and memory optimization, execution workflow, and cloud-native infrastructure.
As large language models (LLMs) grow exponentially in parameter size, a single compute node can no longer meet the massive data throughput and computational demands, making distributed training a necessity. In recent years, domestic AI chips have iterated rapidly in both software and hardware ecosystems, gradually building the foundational capability to support LLM training. Recently, the industry successfully completed the full training pipeline on a dual-node, 16-GPU architecture based on domestic GPUs, with 400 stable training steps as validation. This milestone demonstrates the viability of domestic compute in complex distributed scenarios and offers valuable experience for enterprises seeking autonomous, controllable compute infrastructure. This article provides an in-depth analysis of the technical details and key optimizations behind this multi-node, multi-GPU training pipeline.
1. Distributed Training Architecture and Compute Adaptation
In a dual-node, 16-GPU training architecture, the physical topology typically consists of two 8-GPU servers. Within each node, GPUs communicate over high-speed interconnects (such as PCIe or dedicated interconnect protocols); between nodes, low-latency data exchange relies on high-speed lossless Ethernet such as RoCE (RDMA over Converged Ethernet) or InfiniBand. The core goal of this design is to maximize overall cluster compute utilization while minimizing performance loss from cross-node communication.
Compute adaptation is the first challenge in getting the training pipeline to work. Mainstream deep learning frameworks (such as PyTorch) and the LLM training frameworks derived from them are usually tightly coupled with specific compute ecosystems. Running them on domestic GPUs requires full integration of underlying drivers, runtime libraries, and operator libraries. For example, by providing a middleware layer compatible with standard compute APIs, the framework can correctly map core operators—matrix multiplication, attention mechanisms, and so on—to the compute units of domestic hardware. In addition, to address the precision issues common in LLM training, the underlying support for BF16/FP16 mixed-precision computation must be completed to ensure numerical stability.
2. Cross-Node Communication Optimization and GPU Memory Management
In multi-node, multi-GPU training, communication overhead is often the main bottleneck limiting training throughput. LLM training typically adopts a 3D parallelism strategy combining data parallelism (DP), tensor parallelism (TP), and pipeline parallelism (PP). On a small 16-GPU cluster, the approach is usually dominated by data parallelism combined with ZeRO (Zero Redundancy Optimizer) optimization.
To improve cross-node communication efficiency, the domestic compute platform must provide an efficient collective communication library implementation. During gradient synchronization, the Ring-AllReduce algorithm is widely used, and it requires network bandwidth between nodes to be evenly distributed. Improper network configuration can easily cause congestion. In practice, techniques such as tuning communication buffer sizes and enabling compute-communication overlap are used to hide inter-node synchronization latency. For example, during backpropagation, as soon as the gradient computation for a given layer is complete, gradient synchronization for that layer is triggered immediately rather than waiting for the entire backward pass to finish, achieving a pipelined flow over time.
GPU memory management is equally critical. When training a model with tens of billions of parameters, weights, gradients, optimizer states, and activations together consume enormous GPU memory—often more than a single GPU can hold. In this case, the ZeRO-3 strategy is applied, partitioning model parameters, gradients, and optimizer states across all 16 GPUs. Combined with activation checkpointing and recomputation, which trade time for space, peak memory usage can be further reduced, ensuring the training process never hits an OOM (Out of Memory) error.
3. Pipeline Validation: Dual-Node, 16-GPU Execution Workflow
“Running the training pipeline and completing 400 steps” means the system can stably execute the complete loop of data loading, forward propagation, loss computation, backpropagation, gradient synchronization, and parameter updates. As a key stability test baseline, 400 steps are enough to expose most crashes caused by accumulated numerical precision errors in low-level operators, GPU memory fragmentation, or occasional network timeouts.
In terms of execution, a distributed launch script (such as torchrun or a deepspeed launcher) is typically used to start the 16 training processes. Below is a simplified multi-node launch configuration example:
# Node 0 (Master) launch command exampletorchrun \--nnodes=2 \--nproc_per_node=8 \--node_rank=0 \--master_addr="192.168.1.10" \--master_port=29500 \train.py --model_config config.json --zero_stage 3 --bf16
During training, a rigorous monitoring system is essential. Beyond watching whether the global loss curve decreases normally, you need to check whether Tokens/s (tokens processed per second) meets the expected throughput and whether GPU utilization is balanced across nodes. If one node’s utilization stays persistently low, it usually indicates a cross-node communication blockage or a hardware fault on that node.
4. Infrastructure Support in Cloud-Native Environments
In modern enterprise deployments, training on such heterogeneous compute clusters typically relies on cloud-native infrastructure. Containerization allows training images containing domestic GPU drivers, frameworks, and dependencies to be packaged quickly, enabling consistent environment delivery. Container platforms and cloud-native compute scheduling capabilities—such as those offered by Baidu AI Cloud—can efficiently manage multi-node GPU resources, supporting elastic scaling and task queuing.
On the data side, LLM training requires petabyte-scale corpora. High-performance object storage enables low-cost, durable persistence of training data with high-concurrency reads. Combined with distributed caching systems, hot data can be pre-fetched to compute nodes locally, preventing network I/O from becoming a training bottleneck. In addition, robust logging services and monitoring/alerting systems are indispensable. By collecting standard output from training containers and hardware metrics from GPU nodes (such as temperature, power consumption, and memory usage), operations teams can immediately detect and handle anomalies such as node disconnections or gradient explosions, ensuring the stability of long-running training on the dual-node, 16-GPU cluster.
5. Conclusion and Outlook
Successfully running 400 training steps on a dual-node, 16-GPU cluster based on domestic GPUs marks an important milestone in building the domestic compute ecosystem. This practice shows that domestic hardware has preliminarily reached practical readiness in terms of compatibility with mainstream LLM training frameworks, handling of complex distributed communication, and fine-grained GPU memory management.
Looking ahead, further optimization should focus on several dimensions: first, enriching and optimizing the underlying operator library, especially advanced operators such as Flash-Attention for long-context attention mechanisms; second, deepening the co-design of collective communication libraries and underlying network hardware to improve cross-node bandwidth utilization; and third, building more complete automated fault-tolerance mechanisms to support checkpoint resumption and self-healing in larger-scale thousand-GPU and ten-thousand-GPU clusters. As hardware-software co-optimization continues to deepen, domestic compute is set to play an increasingly central role in the LLM era.
