Running Large Model Training on Domestic GPU Clusters: Practices and Lessons
This article examines how a small-scale cluster of two nodes with 16 GPU accelerator cards was used to validate an end-to-end large language model training pipeline on domestic GPU hardware. It covers why staged validation is the essential first step, key technical challenges including parallelism strategies under memory constraints, cross-node communication, operator adaptation, and attention optimizations, methods for verifying training stability, and the roadmap from small-scale validation to thousand-card scaling. Readers will gain a practical engineering methodology for validating large model training feasibility with limited resources on non-mainstream hardware platforms.
In recent years, training and inference for large models have placed unprecedented demands on computing power. With the supply of general-purpose GPUs constrained, building autonomous, controllable training infrastructure based on domestic GPUs has become an important industry focus. Recently, a team completed validation of a large model training pipeline on a domestic GPU platform: using a small cluster of two nodes with 16 accelerator cards in total, they ran through a training process of several hundred steps. While modest in scale, this effort validated the end-to-end feasibility of the full pipeline—from model partitioning and operator adaptation to distributed communication and training convergence. This article takes a technical perspective on the key steps, common challenges, and engineering methodology behind running large model training on domestic hardware.
Why “Getting the Pipeline Running” Is the Critical First Step
Large model training is a massive and complex systems engineering effort, and launching directly at the thousand-card scale carries extremely high risk. The industry’s standard practice is staged validation:
Operator-level validation. Confirm that the operators involved in the model (such as matrix multiplications in attention mechanisms, LayerNorm, and activation functions) have correct and efficient open-source or in-house implementations on the target hardware, and use numerical precision comparison to ensure consistency with reference implementations.
Single-node, single-card and single-node, multi-card validation. Verify at small scale that the training loop runs stably, gradients are computed correctly, and mixed-precision training shows no numerical overflow or NaN values.
Small-scale multi-node validation. As in the two-node, 16-card effort discussed here, the focus is on validating cross-node communication, coordination of data parallelism and model parallelism, and cluster scheduling stability.
Scalability validation. After confirming normal convergence trends at small scale, gradually expand. This progressive validation approach effectively controls trial-and-error costs and is a pragmatic path for small teams with limited resources to validate the feasibility of large model training.
Technical Challenges in a Two-Node, 16-Card Setup
Running a modern large model training pipeline on two nodes with 16 cards requires solving several core technical problems.
1. Choosing Parallelism Strategies Under Memory Constraints
Per-card memory is typically far smaller than the total memory required by model parameters, optimizer states, and activations. For a model at the multi-billion parameter level, even with mixed-precision training, the memory footprint of parameters plus optimizer states often exceeds a single card’s capacity. Multiple parallelism strategies must therefore be combined:
- Data parallelism: each card holds a full model replica and processes a different data shard; gradients are synchronized via AllReduce;
- Tensor parallelism: matrix operations of individual operators are split across multiple cards—effective for reducing per-layer compute and memory pressure, but it introduces high-frequency communication;
- Pipeline parallelism: the model is split by layers across devices, improving device utilization through micro-batch pipelining;
- Optimizer state and parameter sharding: optimizer states, gradients, and even parameters themselves are sharded across devices and aggregated or reconstructed on demand, dramatically reducing per-card memory usage.
In practice, a combination of “data parallelism + parameter sharding + pipeline parallelism” is commonly used to balance communication efficiency and memory feasibility at the two-node, 16-card scale. Strategy selection is essentially about finding the right balance among compute, communication, and memory.
2. Cross-Node Communication and Interconnect Bandwidth
In a two-node setup, cross-node communication is a frequent performance bottleneck. Key considerations:
- Intra-node interconnect: leverage high-bandwidth card-to-card interconnects within a node; inter-node communication relies on high-speed Ethernet or dedicated interconnect networks;
- Communication-computation overlap: techniques such as gradient bucketing and asynchronous AllReduce hide communication behind backward computation;
- Communication volume compression: quantizing or sparsifying gradients (under strategies that tolerate acceptable precision loss) further reduces bandwidth pressure.
Illustrative gradient synchronization logic:
for bucket in grad_buckets:bucket.reduce_scatter() # Reduce and shard to lower peak memory usagebucket.all_gather() # Reconstruct full parametersoptimizer.step()
3. Operator Adaptation and Numerical Consistency
Domestic GPU platforms must adapt the operator libraries of mainstream deep learning frameworks to their own hardware. The core validation method is numerical alignment testing: for each key operator, compare the output error between the hardware implementation and the reference implementation using identical random inputs, ensuring the error stays within acceptable floating-point tolerance. In addition, the Loss Scaling strategy in mixed-precision training must be tuned for hardware characteristics to avoid gradient underflow early in training.
4. Long Sequences and Attention Optimization
Modern large models commonly use long contexts, and the memory footprint of attention computation grows quadratically with sequence length. Widely adopted optimization techniques include:
- Chunked attention computation (FlashAttention-style methods), reducing memory usage from quadratic to linear;
- Paged KV cache management (primarily serving the inference phase);
- Sequence parallelism: splitting the sequence dimension across multiple cards for extremely long sequences.
These general techniques apply equally to domestic hardware, provided that operator fusion and memory scheduling are well supported at the lower layers of the stack.
Methods for Verifying Training Stability
Running a limited number of training steps—such as “400 steps”—is not meant to prove final convergence, but to verify the health of the training process. Commonly observed metrics include:
- Loss curve: within the first few hundred steps, loss should follow the expected downward trend without violent oscillations or abnormal jumps;
- Gradient norms: monitor whether gradient norms across layers stay within a reasonable range; sudden changes often signal numerical problems or data anomalies;
- Communication time ratio: use profiling tools to confirm whether communication time as a share of total step time is acceptable (ideally below 30%);
- MFU (Model FLOPs Utilization): measures the proportion of hardware compute that is effectively used—a key indicator of software-hardware co-optimization quality;
- Fault recovery capability: validate fault-tolerance mechanisms such as checkpoint saving and restoration, and job rescheduling after single-card failures.
Roadmap from Validation to Scale
After passing small-scale validation, scaling to the thousand-card level requires addressing:
- Cluster scheduling and fault tolerance: hardware failures are the norm in large-scale training, demanding automated fault detection, job migration, and fast recovery;
- Communication topology optimization: with multi-node, multi-tier network topologies, parallelism strategies and communication paths must be carefully mapped;
- Data pipelines: high-throughput preprocessing and distribution of training data to prevent data supply from becoming a bottleneck;
- Observability: a unified platform for logs, metrics, and tracing to quickly locate slow nodes and anomalies.
For teams using cloud resources, general-purpose cloud capabilities such as container services, object storage, logging, and monitoring/alerting can be used to build the training infrastructure, allowing the team to focus on the model and parallelism strategy itself.
Conclusion
Running several hundred steps of large model training on two nodes with 16 cards may look like a small goal, but it is a necessary milestone on the path toward large-scale model training on domestic hardware. What it validates is not just raw compute capability, but the maturity of the entire software stack working together—operator libraries, communication libraries, distributed frameworks, and scheduling systems. As the domestic hardware ecosystem continues to mature, progressively expanding scale through staged validation will make autonomous, controllable large model training infrastructure increasingly feasible from an engineering standpoint.
