Engineering Practices and Key Technologies for Training Large Models on Domestic GPUs: A Full-Stack Perspective
This article examines the engineering practices and key technologies involved in training large multimodal models on domestic (China-made) full-function GPUs. It highlights a recent milestone where a two-node, 16-GPU cluster completed 400 consecutive optimizer updates without numerical instability or interruption, demonstrating a shift from inference-only capability to reliable training. The analysis covers the fundamental differences between inference and training, a native distributed training path based on fully sharded data parallelism, stability verification methodologies, and the broader roadmap toward scalable and automated training on domestic accelerators.
From Inference-Only to Stable Training: The Core of the Capability Leap
Inference and training place fundamentally different demands on hardware and software stacks. Inference is forward-only computation and tolerates greater numerical error; even if a few operators produce slightly inaccurate results, the output usually remains acceptable. Training, by contrast, involves a closed-loop of forward, backward, and parameter updates. Any numerical error accumulates layer by layer during gradient backpropagation, potentially leading to loss divergence or gradient explosion.
Thus, training adaptation is far more challenging than inference deployment. Three key dimensions stand out:
- Operator coverage: Training requires complete backward operator implementations, including gradient operators for various normalization schemes, attention variants, and activation functions. Both coverage and numerical precision must meet high standards.
- Memory and communication efficiency: Training must simultaneously hold model parameters, gradients, and optimizer states, often consuming several times more memory than inference. In addition, the bandwidth for gradient synchronization across GPUs directly determines scaling efficiency.
- Long-duration reliability: A full training run typically lasts from days to weeks, requiring hardware, drivers, and communication libraries to sustain zero failures under prolonged high load.
Building a Native Distributed Training Path
In the referenced practice, the engineering team built a native training path for a multimodal model based on fully sharded data parallelism (following an FSDP-like approach). This path covers the complete pipeline from model loading and sharding to gradient synchronization. The core ideas merit deeper examination.
2.1 Principles of Fully Sharded Data Parallelism
Traditional data parallelism keeps a full copy of parameters on each GPU, so memory consumption grows linearly with model size and cannot support very large models. Fully sharded parallelism, on the other hand, partitions parameters, gradients, and optimizer states across devices, with each GPU holding only 1/N of the full state (where N is the number of devices). During computation, the current layer’s parameters are temporarily materialized via an all-gather operation, then released immediately after use. During backpropagation, gradients are reduced locally and scattered back to their respective shards via reduce-scatter.
The memory benefit can be approximated as:
Single-GPU memory ≈ (parameters + gradients + optimizer states) / N + activations + communication buffers
Taking Adam-class optimizers as an example, mixed-precision training typically requires about 16 bytes per parameter (2 bytes for parameters, 2 bytes for gradients, 8 bytes for optimizer states, and 4 bytes for master weights). With a 16-GPU cluster, sharding reduces the state memory to 1/16 of the original, making it feasible to train models with hundreds of billions of parameters within limited memory.
2.2 Four Critical Links in the Training Pipeline
A production-grade training adaptation must carefully address the following steps:
- Model loading and initialization: Support sharded loading to avoid memory spikes caused by loading full weights on a single GPU before distribution. For very large checkpoints, use streaming reads on demand.
- Sharding and scheduling: Choose an appropriate tensor partitioning granularity that balances memory balance and communication overhead. Overly fine partitioning introduces many small messages; overly coarse partitioning defeats the purpose of sharding.
- Communication–computation overlap: Pipeline all-gather/reduce-scatter operations with forward and backward computation so that communication latency is hidden behind compute. This is a decisive factor in cluster scaling efficiency.
- Gradient synchronization and mixed precision: During backpropagation, cross-GPU gradient reduction must be performed correctly, and dynamic loss scaling is required to prevent gradient underflow in low precision.
Stability Verification for Cross-Node Training
The verification results—two nodes, 16 GPUs, 400 consecutive optimizer updates, and bounded loss and gradient norms—reflect a rigorous stability validation methodology that can be replicated on other domestic accelerator platforms.
3.1 Why Optimizer Updates, Not Iterations
In gradient accumulation scenarios, the number of training steps is not equivalent to the number of parameter updates. Using “400 consecutive optimizer updates” as an acceptance criterion means that the full closed loop—gradient accumulation, gradient clipping, parameter updates, and learning-rate scheduling—was executed 400 times. This approach more effectively exposes cumulative numerical issues.
3.2 Monitoring Indicators for Numerical Health
Engineering practice should include the following monitoring mechanisms:
- Loss curve boundedness: The loss must never become NaN or Inf, and its deviation from a reference implementation (e.g., a baseline on a mature GPU platform) should remain within a reasonable range.
- Gradient norms: Monitor the global gradient norm. A sustained rise or sudden spikes often indicate an excessively high learning rate or an abnormal operator.
- Communication consistency: In cross-node training, verify that the reduced gradients at different nodes are consistent, ruling out precision loss in the communication topology.
- Fault injection testing: Simulate single-GPU failures or network jitter to validate checkpoint recovery and elastic training capabilities.
Scaling “Domestic Chips Training Domestic Models”
Training adaptation is not a single breakthrough but the accumulation of systematic capability. Based on publicly reported practices, domestic accelerators have been validated in several high-difficulty scenarios, including full pretraining from scratch of a 200-billion-parameter scientific foundation model, full-stack native training of world models, and end-to-end training of embodied intelligence models. These cover language, multimodal, scientific computing, and embodied intelligence, with progress moving toward trillion-parameter scales.
These efforts have produced three reusable layers of capability:
- Operator adaptation layer: A streamlined process for rapid porting and precision alignment of high-frequency operators, with the ability to quickly respond to novel model architectures (e.g., new attention mechanisms or mixture-of-experts structures).
- Multi-GPU coordination layer: Practical experience in combining data parallelism, tensor parallelism, pipeline parallelism, and fully sharded strategies, selecting the optimal parallel scheme according to model size and cluster topology.
- Automated toolchain layer: Tools for automatic parallel strategy search, performance profiling, memory estimation, and checkpoint resumption—productizing expert experience to lower the adoption barrier.
From “Trainable” to “Out-of-the-Box Training”
The current achievements prove that domestic GPUs are trainable, but a significant gap remains before developers can run training “out of the box.” Future engineering work should focus on:
- Seamless compatibility with mainstream training frameworks: Allow users of popular frameworks to migrate without modifying model code, hiding hardware differences through automatic operator mapping and graph compilation optimization.
- Performance alignment and automated tuning: Provide end-to-end profiling tools that automatically identify communication bottlenecks and memory fragmentation, and recommend parallel strategies.
- Cloud-native delivery: Leverage cloud platforms’ container services, object storage, monitoring, and alerting capabilities to package training environments as standardized services, enabling algorithm teams to focus on models rather than low-level adaptation.
Conclusion
Two nodes, 16 GPUs, and 400 consecutive optimizer updates without failure may seem modest, but it marks a substantive step forward in training-chain completeness, numerical stability, and cross-node coordination for domestic accelerators. For enterprises evaluating domestic training infrastructure, the key metrics are not peak compute alone, but operator coverage, long-duration stable operation records, and toolchain maturity. As the engineering ecosystem continues to mature, domestic GPUs will increasingly move from one-off breakthroughs to routine adoption for cutting-edge large-model training.
