Adapting a Near-3-Trillion Parameter Model for Training on Domestic GPUs: Practices and Insights
This article explores the engineering practices behind adapting a near-3-trillion parameter open-source large model for training on domestic GPUs. It details the transition from inference-only adaptation to reliable training, the implementation of native FSDP2 multimodal training paths, and the significance of achieving 400 continuous training steps across a dual-node 16-GPU setup. It also provides best practices for developers aiming to run large-scale model training on emerging hardware.
Adapting a Near-3-Trillion Parameter Model for Training on Domestic GPUs: Practices and Insights
1. Introduction: The Critical Leap from Inference to Training
In recent years, the role of domestic compute chips in the large model ecosystem has been undergoing a profound shift. Previously, industry attention focused heavily on “Day 0 adaptation”—whether chip vendors could quickly enable inference on the day a new open-source large model was released. However, inference adaptation and training adaptation are fundamentally different technical challenges. Inference only requires ensuring the correctness and performance of forward computation, whereas training demands numerical stability and engineering reliability across the entire pipeline: forward pass, backward pass, gradient communication, and optimizer state updates.
Recently, a domestic GPU vendor, leveraging its flagship training-inference integrated compute cards and proprietary software stack, completed the training adaptation of a flagship open-source large model with nearly 3 trillion parameters. They achieved 400 continuous, stable training steps across a dual-node setup with 16 GPUs. This progress marks a new era for domestic full-function GPUs, transitioning from “usable for inference” to “reliable for training.” This article systematically analyzes the key technical issues and engineering methods behind this practice.
2. Clarifying Concepts: Training Adaptation is Not “Pre-training on This Chip”
Before discussing any training adaptation achievements, it is crucial to clarify a commonly confused concept: completing training adaptation for a model on a specific chip does not mean the model’s base weights were pre-trained on that chip.
A common industry practice is for large model vendors to verify multiple compute routes simultaneously in their technical reports. For instance, some leading model teams have validated both domestic NPU and mainstream GPU paths in their reports, primarily to verify the operator correctness of fine-grained Expert Parallelism (EP) on the inference side. This falls under inference operator verification, not an official declaration of the pre-training compute source.
Therefore, when evaluating a “training adaptation” achievement, its true technical implications are:
- Training Pipeline Completeness: The chip’s software stack can support the complete closed-loop process, from model loading, parameter sharding, forward and backward computation, and gradient synchronization to optimizer state updates.
- Numerical Stability: Over continuous multi-step iterations, the loss and gradient norms remain finite without numerical overflow (NaN/Inf) or abnormal process termination.
- Engineering Scalability: The adaptation solution is not a one-time debugging result but possesses the capability to scale to larger models and more complex architectures.
This definition helps the industry establish objective evaluation standards, preventing the conflation of “successful integration” with “native training.”
3. Core Technical Analysis: Building a Native FSDP2 Multimodal Training Path
The core technical highlight of this adaptation is the construction of a native FSDP2 (Fully Sharded Data Parallel, 2nd generation) multimodal training path, bridging the entire training pipeline from model loading and shard scheduling to gradient synchronization.
3.1 Why FSDP is Necessary
Facing a model scale of nearly 3 trillion parameters, the memory of a single accelerator is far from sufficient to hold the complete model parameters, gradients, and optimizer states. Taking mixed-precision training as an example, assuming the model parameters are P, using an Adam-class optimizer, the memory footprint roughly includes:
- Model parameters (FP16/BF16): 2P bytes
- Gradients (FP16/BF16): 2P bytes
- Optimizer states (FP32 momentum and variance): 8P bytes
- Master copy of parameters (FP32): 4P bytes
This totals about 16P bytes. For a trillion-parameter model, this means tens of terabytes of memory demand, necessitating parameter sharding technologies to distribute states across multiple cards. The core idea of FSDP is to build upon data parallelism by sharding parameters, gradients, and optimizer states across devices, temporarily gathering the required parameter shards through communication only during computation.
3.2 FSDP2 Improvements Over the First Generation
The widely recognized evolution directions for FSDP include:
- Finer-grained Shard Management: Using parameter groups as the basic unit for sharding and aggregation to reduce communication fragmentation.
- Communication and Computation Overlap Optimization: Prefetching parameters for the next layer during forward computation and simultaneously performing gradient reduce-scatter during backward computation to maximize the hiding of communication overhead.
- More Controllable Memory Footprint: Supporting dynamic layer-wise sharding and releasing to reduce peak memory pressure, reserving space for activations and multimodal inputs.
For multimodal models, the memory and computation characteristics of the vision encoder and the language model differ significantly. The sharding strategy requires flexible configuration for different sub-modules, demanding higher scheduling capabilities from the software stack.
3.3 Key Stages of the Training Pipeline
A complete training adaptation typically needs to cover the following stages:
Model load -> Parameter shard(shard) -> Forward(all-gather)-> Backward(reduce-scatter) -> Gradient sync-> Optimizer update -> Next iteration
Each step involves operator-level adaptation: mixed-precision cast operators, underlying implementations of distributed communication primitives, and sharded updates of optimizer states. Any numerical deviation or performance bottleneck in any stage will lead to training failure or a sharp drop in efficiency.
4. Stability Verification: The Significance of Dual-Node 16-GPU, 400 Continuous Steps
In public technical reports, this adaptation experiment utilized a dual-node setup with 16 training-inference integrated compute cards for cross-node joint training testing. All 16 training processes completed 400 continuous optimizer updates, with loss and gradient norms remaining finite throughout, without numerical overflow or abnormal termination.
This verification design includes several notable technical points:
4.1 Cross-Node Joint Training
Dual-node 16-GPU implies that training crosses node boundaries, and gradient synchronization must traverse the inter-node network (such as high-speed RDMA interconnects). The bandwidth and latency of cross-node communication are significantly lower than intra-node interconnects, posing a direct test to the implementation quality of the communication library. The all-gather and reduce-scatter operations in FSDP scenarios require high network topology awareness. Rational communication grouping and hierarchical reduction strategies are critical to performance.
4.2 400 Continuous Optimizer Updates
Why emphasize “continuous” and “optimizer updates”? Because a short, single-step forward and backward pass only verifies operator correctness, while continuous multi-step updates expose deep-seated issues like cumulative numerical errors, memory leaks, and communication deadlocks. In terms of monitoring metrics, engineering typically focuses on:
- Loss curve: Whether it decreases or remains stable as expected, without spikes.
- Gradient norm: Whether it stays within a reasonable range, without exploding or vanishing.
- Memory usage: Whether it remains stable across steps, without continuous growth (indicative of leaks).
- Throughput stability: Whether the time per step is consistent, without abnormal jitter.
4.3 The Difference Between From-Scratch Training and Adaptation Training
It should be noted that 400 steps of stable operation verifies that the “pipeline is usable and numerically credible.” Complete pre-training requires long-term stability over tens of thousands to hundreds of thousands of steps, alongside fault tolerance, checkpoint resumption capabilities, and automatic failure recovery. There remains a considerable engineering distance from adaptation verification to production-grade training.
5. From Individual Cases to Systems: The Evolution of Domestic Compute Training Capabilities
The value of a single adaptation is limited; what truly matters is the reusable engineering system behind it. According to public information, the vendor has implemented multiple achievements in “domestic chips training domestic models,” including:
- Completing the full from-scratch training of a 200-billion-parameter scientific base model;
- Supporting the full-stack native training of a multi-dimensional world model;
- Collaborating with research institutions to complete the full-process training of an embodied AI brain model;
- Advancing the training of a trillion-parameter large model with ecosystem partners.
These cases outline a clear capability evolution path: Operator adaptation -> Multi-GPU synchronization -> Complete training -> Automated toolchain. The ultimate goal is to enable frontier large models on domestic full-function GPUs to transition from “can train” to “out-of-the-box training”—meaning developers can obtain a training experience comparable to mainstream ecosystems without deep involvement in underlying adaptations.
6. Insights and Best Practices for Developers
For teams looking to conduct large model training on domestic compute, this practice offers the following insights:
- Prioritize Numerical Correctness Verification: Run hundreds of training steps on a small-scale cluster first, comparing the loss curve and deviations against reference implementations before scaling up.
- Choose Parallel Strategies Wisely: Combine Data Parallelism (DP), Tensor Parallelism (TP), Pipeline Parallelism (PP), and FSDP based on model size to avoid memory or communication bottlenecks inherent in a single strategy.
- Establish a Comprehensive Monitoring System: Implement end-to-end tracking for loss, gradient norm, memory, and communication time to quickly locate anomalies.
- Prioritize Checkpoint and Resume Capabilities: Hardware failures are inevitable in long-cycle training; saving and restoring sharded checkpoints is an essential capability.
- Leverage Cloud Platforms to Lower Barriers: For teams lacking the conditions to build their own clusters, general-purpose cloud container platforms, object storage, and monitoring infrastructure can be used to quickly set up a training environment, allowing focus to be directed toward the model and data itself.
7. Conclusion
Completing the training adaptation of a near-3-trillion parameter model on domestic full-function GPUs and achieving multi-node, multi-GPU continuous stable operation is a microcosm of the maturing domestic compute ecosystem. It proves that the entire large model training pipeline—from operators and communication to scheduling—is engineering-feasible on domestic hardware and software stacks. Moving forward, as automated toolchains mature and ecosystem collaboration deepens, “domestic chips training domestic models” is expected to transition from benchmark cases to widespread adoption, providing a solid foundation for the self-reliant development of the AI industry.
