Engineering Practices and Technical Analysis of Adapting Domestic GPUs for Trillion-Parameter Large Model Training
The rapid growth in large language and multimodal model parameters presents unprecedented challenges to computing infrastructure. Recently, a domestic GPU successfully adapted to train an open-source model with nearly three trillion parameters, marking a significant breakthrough in complex model training. This article explores the engineering practices and technical details behind this achievement, clarifying the difference between training and inference adaptation, analyzing the implementation of native FSDP2 multimodal training paths, and reviewing cross-node joint training validations. It also outlines the future evolution toward "out-of-the-box" training ecosystems supported by cloud-native infrastructure.
Engineering Practices and Technical Analysis of Adapting Domestic GPUs for Trillion-Parameter Large Model Training
With the exponential growth of parameters in large language models (LLMs) and multimodal models—often reaching hundreds of billions or even trillions—underlying computing infrastructure faces unprecedented challenges. How domestic GPUs can effectively support stable, end-to-end training of complex frontier models has become an industry focus. Recently, a domestic full-function GPU successfully completed training adaptation for an open-source flagship model with nearly three trillion parameters using its underlying software stack. This event marks a breakthrough for domestic computing power in complex model training and provides a valuable engineering reference for the industry.
1. Clarifying Concepts: The Difference Between Training Adaptation and Inference Validation
Before diving into technical details, it is necessary to clarify several core industry concepts. The industry often mentions “Day 0 adaptation for the latest open-source models,” which typically refers to completing inference-side integration in the shortest time possible, ensuring the model runs forward propagation and outputs reasonable results on the chip. However, successful inference adaptation does not mean the model was pre-trained on this chip.
For instance, a well-known large model’s technical report once showcased parallel validation of NPUs and GPUs from different vendors and presented a fine-grained Expert Parallelism (EP) scheme. Industry consensus suggests this parallel validation primarily stayed at the inference operator validation level, without explicitly declaring that the base model’s pre-training compute came from these sources.
True “training adaptation” has a much higher technical barrier than inference. It requires the compute chip and software stack to open up the complete backward link, from model loading, sharding scheduling, forward computation, and backward propagation to gradient synchronization and optimizer updates. This is not only a test of single-card compute capability but also a comprehensive test of multi-card collaboration, communication bandwidth, memory management, and numerical stability. The recent domestic GPU completion of training adaptation for a trillion-parameter model successfully crossed this high-difficulty engineering threshold.
2. Core Elements of Building a Native FSDP2 Multimodal Training Path
To support efficient training of trillion-parameter models, building a native Fully Sharded Data Parallel (FSDP2) multimodal training path is a key technical component. Compared to traditional Distributed Data Parallel (DDP), FSDP2 deeply optimizes memory utilization and communication efficiency.
1. Model Loading and Sharding Scheduling
At the trillion-parameter scale, a single GPU’s memory (e.g., the common 80GB) cannot hold the full model weights, gradients, and optimizer states. FSDP2 shards parameters, gradients, and optimizer states across all compute nodes, so each GPU only retains a portion. When computation is needed, it aggregates required parameters in real-time via efficient collective communication (e.g., All-Gather). Because multimodal models contain encoders for different modalities like vision and language, their parameter distributions and activation characteristics differ. This requires the underlying software stack to have fine-grained sharding scheduling capabilities to ensure balanced memory usage and prevent Out-of-Memory (OOM) errors that can crash training.
2. Cross-Node Gradient Synchronization and Communication Optimization
The bottleneck of multi-node, multi-card training is often communication. Under the FSDP2 mechanism, gradients calculated during backward propagation require Reduce-Scatter operations to ensure each GPU only keeps the gradients for the parameters it is responsible for. To hide communication latency, engineering practices typically use compute-communication overlap. The underlying software stack must optimize RDMA network configurations and underlying operators of communication libraries like NCCL for cross-node joint training scenarios, ensuring low latency and high bandwidth for gradient synchronization.
3. Numerical Stability Assurance
Training trillion-parameter models is highly susceptible to gradient explosion or vanishing. Mixed precision training (e.g., BF16 or FP8) improves compute speed and reduces memory footprint but introduces risks of numerical precision loss. In engineering practice, strict gradient clipping mechanisms and loss scaling strategies must be introduced. Below is a pseudo-code example of gradient clipping and stability checking common in large model training:
# Pseudo-code: Gradient clipping and stability checkdef clip_grad_norm(parameters, max_norm):total_norm = 0.0for p in parameters:if p.grad is not None:param_norm = p.grad.data.norm(2)total_norm += param_norm.item() ** 2total_norm = total_norm ** 0.5# Prevent numerical overflowif total_norm == float('inf') or total_norm == float('nan'):raise ValueError("Gradient overflow detected, skipping step.")clip_coef = max_norm / (total_norm + 1e-6)if clip_coef < 1:for p in parameters:p.grad.data.mul_(clip_coef)return total_norm
3. Cross-Node Joint Training Engineering Practice: A Dual-Node 16-Card Example
During the technical validation phase, the domestic GPU team used a dual-node setup with 16 compute cards to complete cross-node joint training tests. Although a 16-card dual-node scale is insufficient for pre-training a trillion-parameter model from scratch, it is enough to validate the engineering maturity of the underlying software and hardware in multi-node collaboration, communication handshakes, and state synchronization.
Test results showed that all 16 training processes successfully completed 400 continuous optimizer updates. During this process, the loss value decreased smoothly, and the gradient norm remained within a finite range throughout, with no numerical overflow or abnormal interruptions. The significance of these results includes:
- Link Integrity Verification: It proved that the communication link from the framework layer to the driver layer and underlying hardware is fully connected. Cross-node collective communication operations like All-Reduce and Reduce-Scatter are stable and reliable.
- Initial Fault Tolerance and Recovery Capability: 400 continuous steps of updates mean the system maintained state consistency over a long period. In real large-scale training, hardware failures and gradient anomalies are the norm. Maintaining stability during continuous iterations is the foundation for moving toward thousand-card and ten-thousand-card scale training.
4. Ecosystem Evolution from “Able to Train” to “Out-of-the-Box Training”
Large-scale training combat requires not just running through once, but long-term reusability and engineering system support. Currently, domestic computing power has achieved multiple results in training large models using domestic chips, including completing full training of a 100-billion-parameter scientific foundation model from scratch and supporting full-stack native training for 5D world models and embodied brain models. These practices show that domestic GPUs already possess the capability to support everything from “rapid inference deployment” to “end-to-end stable training.”
To achieve true “out-of-the-box training” for frontier large models on domestic full-function GPUs in the future, continuous refinement is needed in the following areas:
- Automation of Operator Adaptation: Establish a more complete operator library, improve the compilation efficiency of custom operators, and reduce the cost of manual operator development and tuning.
- Deep Integration with Cloud-Native Infrastructure: Cloud service platforms like Baidu AI Cloud can provide a solid cloud foundation for large-scale cluster training of domestic GPUs by offering high-performance container platforms, object storage, and RDMA network environments. Cloud-based elastic compute scheduling and monitoring alert mechanisms can significantly improve the resource utilization and fault tolerance of training clusters.
- End-to-End Toolchain Improvement: Provide a fully automated toolchain from data preprocessing, distributed training configuration, and checkpoint resume to performance profile analysis, lowering the barrier to entry for developers.
In summary, the successful adaptation of domestic GPUs for trillion-parameter large model training is a significant milestone in the development of AI computing infrastructure. By building native distributed training paths, ensuring numerical stability in cross-node multi-card training, and relying on increasingly mature engineering systems and cloud-native foundations, domestic computing power is steadily advancing toward a new stage of “out-of-the-box training,” providing more autonomous and reliable computing power guarantees for the implementation of Artificial General Intelligence (AGI).
