Ultra-Large-Scale Model Training Adaptation: Engineering Practices and Full-Chain Validation
This article examines the engineering challenges of adapting ultra-large-scale model training to non-mainstream GPU architectures. It distinguishes inference validation, training adaptation, and full-chain stable training; describes how FSDP2 enables parameter-level sharding, model loading, shard scheduling, gradient synchronization, and communication optimization; and outlines stability validation metrics such as finite loss and gradient norms over hundreds of optimizer steps. It also discusses practical large-scale training requirements, including fault tolerance, checkpoint recovery, monitoring, and operator/compiler ecosystems, based on recent work adapting a domestic full-function GPU to a model with nearly 3 trillion parameters.
As large language models and multimodal models move toward trillion-parameter scale, diversifying and localizing underlying compute infrastructure has become an inevitable industry trend. However, achieving stable training of ultra-large-scale models on non-mainstream GPU architectures or dedicated accelerators is not a simple API conversion. It involves systematic challenges across low-level operator reconstruction, distributed communication optimization, and full-chain engineering. This article draws on recent industry practice in adapting a domestic full-function GPU to training a model with nearly 3 trillion parameters, and analyzes the construction and validation criteria of the ultra-large-scale model training pipeline.
1. Clarifying Concepts: Engineering Boundaries Between Training Adaptation and From-Scratch Pre-training
When discussing compute adaptation, the industry often refers to “Day 0 adaptation,” but this usually means only that a model can run forward inference or fine-tuning on the hardware. Several levels of technical maturity need to be clearly distinguished:
- Inference operator validation: This verifies the model’s inference process on a chip. For example, a technical report for a mainstream model presents parallel NPU and GPU routes and validates a fine-grained expert parallelism (EP) scheme. This is essentially operator and communication validation at the inference level; it does not declare the compute source for pre-training the base model.
- Successful training adaptation: This means the model can perform backpropagation and weight updates on the target hardware. The chip must support not only forward computation but also various backward derivative operators, optimizer state updates, and cross-GPU gradient synchronization communication.
- Full-chain stable training: This is the highest standard. It means the model can undergo long-duration, large-scale pre-training from scratch on the hardware cluster, ensuring not only computational correctness but also resilience to long-tail issues such as hardware failures and network jitter.
Recent large-model training adaptation completed on domestic chips has crossed the gap from “inference validation” to “full-chain stable training,” building a native multimodal training path and connecting the complete pipeline from model loading and shard scheduling to gradient synchronization.
2. Building a Multimodal Training Pipeline Based on FSDP2
In ultra-large-scale model training, the memory wall and the communication wall are two core obstacles. Fully Sharded Data Parallel (FSDP) is a mainstream industry solution. Compared with the first generation of FSDP, FSDP2 reworks the architecture with a finer-grained sharding strategy and stronger compatibility with heterogeneous compute and complex topologies.
2.1 Model Loading and Shard Scheduling
When building a native FSDP2 training path, the first challenge is loading ultra-large-scale model parameters and allocating memory. For a model with nearly 3 trillion parameters, even in BF16 precision, the model weights alone require several terabytes of memory, far exceeding single-card capacity.
FSDP2 performs parameter-level full sharding of model parameters, gradients, and optimizer states, spreading memory pressure across every card in the cluster. In engineering implementation, the low-level software stack must provide an efficient memory pool management mechanism to avoid memory fragmentation during model loading. At the same time, the shard scheduler must allocate shards according to the cluster’s network topology (such as NVLink, PCIe Switch, and cross-node RoCE networks) to minimize cross-node communication latency.
2.2 Gradient Synchronization and Communication Optimization
During backpropagation, FSDP2 uses a pipelined mechanism of on-demand AllGather and gradient ReduceScatter. Before a layer performs backward computation, the system uses AllGather to collect the full weights of that layer from other cards. After computation, it uses ReduceScatter to aggregate and shard the gradients.
The key adaptation focus of the domestic software stack at this stage is deep optimization of the communication library. For example, communication operators can be fused to combine multiple small-tensor communications into one large-tensor transfer, fully utilizing network bandwidth. Computation-communication overlap can also be used: while the current layer performs gradient computation, the weight AllGather request for the next layer is initiated asynchronously, hiding communication latency.
3. Stability Validation Metrics for Multi-Node, Multi-GPU Joint Training
After the pipeline is connected, how can the training system be proven stable and reliable? The industry typically uses controlled variables to run continuous training tests in a small-scale multi-node, multi-GPU environment. In recent practice, cross-node joint training was completed using two nodes with a total of 16 high-performance AI compute cards. The core validation metrics were as follows:
3.1 Loss and Gradient Norms Remain Finite Throughout
In a test containing 400 consecutive optimizer updates, the loss curve must decline steadily without divergence, and the gradient norms must remain within a reasonable range. In deep learning training, especially mixed-precision training (BF16/FP32), gradient explosion or underflow can easily occur. If low-level operator precision is insufficient or data truncation occurs during communication, loss can quickly become NaN within dozens of steps. Finite values throughout the run prove the correctness of the underlying computation logic and communication packet assembly.
3.2 No Numerical Overflow or Abnormal Interruptions
Multi-GPU distributed training places extremely high demands on system stability. Memory out-of-bounds, CUDA kernel errors, or network timeouts on any node can crash the entire training job. Completing 400 consecutive steps without abnormal interruption verifies that there is no resource contention or deadlock among the hardware driver layer, the runtime layer, and the upper-layer distributed training framework.
4. Large-Scale Training in Practice and Evolution of the Engineering Ecosystem
From stability validation on two nodes with 16 cards to actually supporting pre-training of trillion-parameter large models, a mature engineering system is still required. Domestic GPUs have already delivered multiple results in this area: they have completed full from-scratch training of a hundred-billion-parameter scientific foundation model and supported full-stack native training of multi-dimensional world models and embodied intelligence brain models. This marks a shift of domestic compute from “can run” to “can handle real workloads.”
To achieve this leap, the following engineering capabilities must be built:
- Automated fault tolerance and recovery: In large-scale clusters, hardware failures are normal. The system needs periodic checkpointing and, when a node failure is detected, automatic shard reorganization and resumption from checkpoints to minimize impact on training progress.
- Full-chain monitoring and tuning tools: Developers need intuitive tools to observe the time share of computation and communication, memory utilization, and network bandwidth throughput. Flame graphs or timeline analysis can quickly identify whether a system bottleneck lies in compute operators or communication bandwidth.
- Operator libraries and compiler ecosystem: Facing increasingly complex large-model structures (such as various attention mechanism variants and MoE routing mechanisms), a complete operator library is needed, along with support for rapid development and compilation optimization of custom operators through high-level intermediate representations such as Triton.
5. Conclusion
Training adaptation for ultra-large-scale models is a systems engineering task. It tests not only chip microarchitecture design but also the engineering depth of the software stack. From connecting the FSDP2 training path to achieving continuous stable updates across multiple nodes and GPUs, domestic GPUs are gradually building their own large-model training ecosystem. In the future, as operator adaptation, multi-GPU collaboration, and automated toolchains continue to mature, training frontier large models on domestic full-function GPUs will move from exploratory “can train” to standardized “out-of-the-box training,” laying a solid foundation for autonomous and controllable AI infrastructure.
