Training LLMs on Domestic GPU Clusters: Multi-Node Multi-Card Engineering Insights

    As large language models continue to scale in parameter size, training on a single accelerator is no longer feasible, making multi-node and multi-GPU distributed training essential. This article examines a real-world practice where a dual-node, 16-GPU cluster built with domestic accelerators successfully ran a large-model training pipeline and completed hundreds of stable steps. It breaks down the engineering requirements into four critical areas: hardware and interconnect fundamentals, software stack and operator adaptation, parallel strategy selection, and communication/stability optimization. The article also explains the verification logic behind running a few hundred steps and offers troubleshooting guidance for common issues. It serves as a practical reference for evaluating and implementing distributed training on heterogeneous compute platforms.

    Background: From Single-Card to Cluster Training

    As large language model parameter counts have grown, a single accelerator card can no longer meet training demands. Multi-node, multi-card cluster training has become a necessity. A notable recent practice involves a dual-node, 16-card cluster built with domestic GPUs that successfully ran a full training loop for a large-parameter model and maintained stability over several hundred training steps. The significance here is not the training scale itself, but the validation of a complete training pipeline — from operator adaptation and distributed communication to training framework integration. It demonstrates that domestic compute capability can now support real, large-model training tasks.

    This article does not focus on any specific product. Instead, it breaks down the practice into general technical questions: What are the key steps required to run large-model training on heterogeneous compute resources? And what are the engineering essentials for each step?

    Four Key Components for a Working Training Pipeline

    1. Hardware and Interconnect Foundation

    A typical dual-node, 16-card configuration means each server is equipped with eight accelerator cards. Training scenarios impose three hard requirements:

    • Intra-node interconnect bandwidth: The eight cards within one node require high-bandwidth interconnect (e.g., NVLink-class high-speed buses or optimized PCIe topologies) to handle intensive communication in tensor parallelism.
    • Cross-node network: Between the two servers, high-speed Ethernet or specialized network solutions such as RoCE or InfiniBand are commonly used, as data and pipeline parallel gradient synchronization depends on them.
    • Memory and HBM capacity: Model parameters, optimizer states, and activations together determine memory usage. Even with mixed precision and sharding strategies, a model with tens of billions of parameters puts substantial pressure on per-card memory.

    2. Software Stack and Operator Adaptation

    The first hurdle for running training on domestic GPUs is the software stack. Typical approaches include:

    • Providing runtimes and operator libraries compatible with mainstream deep learning frameworks, allowing training code to be migrated with minimal changes or even no changes at all.
    • Optimizing key Transformer operators (Attention, LayerNorm, GELU, and FlashAttention-like implementations) with targeted performance work.
    • Supporting operator fusion at the compiler level to reduce memory access overhead.
    1. # Illustration: training scripts usually only need to adjust device and parallel configuration
    2. backend_kwargs = {
    3. "device_type": "gpu", # device abstraction layer hides hardware differences
    4. "tensor_parallel": 4, # intra-node tensor parallelism
    5. "pipeline_parallel": 2, # pipeline parallelism
    6. "data_parallel": 2, # inter-node data parallelism
    7. "zero_stage": 2, # optimizer state sharding
    8. }

    The key is the abstraction layer design: the upper-level training framework is not aware of the specific hardware, while the bottom layer dispatches operators and schedules kernels through device adaptation plugins.

    3. Parallel Strategy Selection

    A dual-node, 16-card setup is a typical “small cluster for a large model” scenario. Parallel strategy selection needs careful trade-offs:

    • Tensor parallelism (TP): Partitions individual layer weights. It involves frequent, bandwidth-intensive communication and is generally restricted to a single node.
    • Pipeline parallelism (PP): Partitions the model by layers. Cross-node communication is lighter, making it suitable for inter-node deployment, but it introduces pipeline bubbles.
    • Data parallelism (DP) with optimizer state sharding: Each data replica holds part of the parameter states, and gradients are synchronized through AllReduce.

    A common combination is: within each server, use TP=4 and PP=2; between servers, use DP=2, together with ZeRO stage-2 sharding. This configuration limits cross-node communication while fully exploiting high-bandwidth intra-node interconnects.

    4. Communication and Stability Optimization

    Whether training can reliably run for 400 steps depends heavily on communication and fault-tolerance design:

    • Gradient compression and bucketing: Merge small gradient tensors into larger buckets to reduce the number of communication operations.
    • Compute-communication overlap: Use asynchronous AllReduce so that backward propagation and gradient synchronization run in parallel, hiding communication latency.
    • Gradient accumulation: In small-batch scenarios, accumulate gradients over several steps before synchronization to reduce communication overhead.
    • Checkpointing and fault recovery: Periodically save training state so that training can resume from the most recent checkpoint after a node failure, avoiding a full restart.

    The Verification Logic Behind “400 Steps”

    Why emphasize running a few hundred training steps instead of directly comparing throughput? This is a standard practice for validating a training pipeline:

    1. Correctness verification: In the first few dozen steps, observe whether the loss curve decreases smoothly and whether gradient norms are normal. This helps rule out numerical errors in operators.
    2. Stability verification: No NaN, no out-of-memory, and no communication timeouts over hundreds of consecutive steps indicate the software and hardware stack can sustain long-running operation.
    3. Performance baseline: Only after stability is confirmed can metrics such as step time and MFU (model FLOPs utilization) be measured as a baseline for future optimization.

    This means domestic compute platforms have made the key leap from being able to run inference to being able to sustain training.

    Common Issues and Troubleshooting

    High-frequency problems encountered in practice include:

    • Communication timeouts: Check cross-node network configuration and communication library environment variables (e.g., timeout thresholds, network interface binding).
    • Unsupported operators: First look for an equivalent operator that is supported, then consider a custom kernel. Pay close attention to numerical precision alignment.
    • Memory fragmentation: Enable memory pooling, and adjust micro-batch size and sequence length allocation.
    • Abnormal loss: Run a reference curve on mature hardware with a small-scale configuration, then compare intermediate activations layer by layer to isolate the source of precision deviation.

    Conclusion and Outlook

    Running a large-model training pipeline on a dual-node, 16-card cluster is a milestone engineering validation. It proves that domestic compute capability has reached a practical level in software stack completeness, operator coverage, and distributed communication. The next challenges lie in scaling efficiency for even larger clusters, longer sustained runtime, and approaching the MFU levels of mature ecosystems. For developers and enterprise users, focusing on the abstraction layer and ecosystem compatibility remains the core lens through which to evaluate the usability of heterogeneous compute platforms. As domestic software and hardware continue to iterate, the engineering threshold for multi-node multi-card training will gradually lower, and the compute options for large-model training will become increasingly diverse.