Engineering Practices and Key Pathways for Training Large Models on Domestic GPUs
This article explains the difference between inference and training adaptation for large models on domestically developed GPUs. It examines the engineering requirements for building a native FSDP2 training pipeline, validating multi-node and multi-GPU stability, and evolving from basic training support to a standardized “train out of the box” experience. It also provides practical guidance for developers adopting these platforms.
1. Training Adaptation and Inference Adaptation: Two Frequently Confused Concepts
As large language models continue to grow in parameter count, adapting frontier models to domestically developed computing platforms has become increasingly common. However, one misconception remains widespread: a model being successfully “adapted” to a particular chip does not mean that it was pretrained on that chip.
Inference adaptation, often referred to as “Day 0 adaptation,” aims to make a newly released open-source model run on new hardware on the day of release, or as soon as possible. This work typically covers operator compatibility, numerical alignment, and inference framework integration. It is relatively lightweight because the inference pipeline is forward-only and stateless. The primary requirement is to ensure that the forward-pass results are correct.
Training adaptation is considerably more complex. It requires a complete end-to-end pipeline covering model loading, parameter sharding, gradient computation, cross-node communication, and optimizer-state updates. A numerical error, communication timeout, or out-of-memory condition at any stage can interrupt training.
Therefore, “training adaptation completed for a model on a specific chip” and “the model was pretrained on that chip” are two different claims. In some public technical reports, multiple hardware platforms are listed as having been validated. In many cases, this refers only to validation at the inference-operator level and does not indicate where the base model was pretrained. Understanding this distinction is essential for objectively evaluating progress in large-model training on domestic computing platforms.
2. Key Technical Requirements for Building a Native FSDP2 Training Pipeline
For a flagship open-source model with nearly three trillion parameters, the central challenge is to build a native Fully Sharded Data Parallel 2 (FSDP2) training path on domestic GPUs.
FSDP2 is one of the mainstream paradigms for distributed large-model training. Its core principle is to shard model parameters, gradients, and optimizer states across devices, gathering them only when required for computation. This substantially reduces the memory footprint on each individual accelerator.
A complete training pipeline must address the following areas.
1. Model Loading and Sharding Coordination
A model of this scale cannot be loaded in its entirety into the memory of a single accelerator. Sharding must therefore be performed during initialization according to the device topology.
The adaptation process must ensure that the sharding strategy is fully compatible with the operator implementations in the underlying computing libraries. This is especially important for mixture-of-experts (MoE) architectures. The placement of expert weights must be designed together with the expert parallelism (EP) strategy to avoid communication bottlenecks caused by frequent cross-node weight transfers.
2. Forward and Backward Operator Coverage
Training places much higher demands on operators than inference. In addition to forward operators, the system must provide the corresponding backward and gradient operators, while maintaining strict numerical alignment with the reference implementation.
Multimodal models can introduce less common operators through components such as vision encoders and cross-modal attention. These operators often require additional implementations or rewrites at the software-stack level.
3. Gradient Synchronization and Communication Optimization
Cross-node training depends on efficient collective communication libraries for gradient aggregation. In sharded training, the degree of overlap between gradient synchronization and computation has a direct impact on throughput.
During adaptation, the communication libraries must be validated for correctness and stability on the target hardware. Communication primitives also require targeted optimization to match the characteristics of the platform.
4. Optimizer-State Management and Checkpointing
Optimizer states in large-model training typically consume several times more memory than the model parameters themselves. Both sharded storage and the ability to resume from a checkpoint are therefore essential.
A complete training adaptation must include validation of checkpoint saving and restoration. After an interruption, training should be able to resume from the checkpoint accurately and continue execution without compromising the training state.
3. How to Validate Multi-GPU Training Stability
Training adaptation should not be judged only by whether a job can start. The more important question is whether it can continue running reliably.
A widely used validation method is to run all training processes in a real multi-node, multi-GPU environment through hundreds of consecutive optimizer updates while monitoring the loss and gradient norm throughout the process.
For example, consider cross-node training on two machines with a total of 16 integrated training-and-inference accelerators. The key indicators include the following:
- Finite loss values: The loss remains finite and decreases as expected, with no NaN or Inf values. This indicates that the forward and gradient-computation paths are numerically sound.
- Stable gradient norms: The gradient norm does not grow explosively or suddenly collapse to zero. This indicates that backpropagation and gradient synchronization are functioning properly.
- Uninterrupted optimizer updates: Hundreds of consecutive updates demonstrate that communication, memory management, and operator scheduling do not develop cumulative errors during long-running execution, such as memory leaks or communication deadlocks.
Continuous stable execution over hundreds of steps is still different from completing full pretraining. However, it provides strong evidence that the training pipeline has been connected at the engineering level and is ready to support larger-scale training workloads.
4. From “Can Train” to “Train Out of the Box”: The Evolution of Engineering Systems
Successfully adapting a model for a single training run is only the starting point. The more difficult task is to turn the experience gained from individual adaptations into reusable engineering capabilities.
The training support capabilities of domestic computing platforms generally need to evolve through three stages.
Stage 1: Inference Ready
After a new model is released, the platform should support inference adaptation quickly enough to meet immediate deployment requirements. This stage primarily tests the coverage of the operator library and the compatibility of the inference framework.
Stage 2: Training Ready
The platform must provide a complete distributed training pipeline that supports fine-tuning and, eventually, training from scratch for models ranging from tens of billions to several hundred billion parameters.
Existing practices have shown that domestically developed full-featured GPUs can support training from scratch for scientific foundation models with hundreds of billions of parameters. They can also support end-to-end training for emerging architectures such as world models and embodied intelligence models, while progressing toward training models with trillion-scale parameter counts.
Stage 3: Train Out of the Box
This is the ultimate goal: package operator adaptation, multi-GPU coordination strategies, memory optimization techniques, and automated tuning tools into standardized capabilities. Users should be able to obtain a model and start training without having to perform extensive low-level adaptation themselves.
Key investment areas include:
- Automatic operator adaptation: Use compiler technologies and automatic code generation to reduce the manual effort required when new models introduce new operators.
- Automatic parallelism search: Recommend combinations of data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism based on the model architecture and hardware topology.
- Training health monitoring: Combine general monitoring, alerting, and logging capabilities to observe loss curves, gradient norms, communication time, and memory utilization in real time, while providing early warnings for anomalies.
- Fault tolerance and elastic training: In large clusters, individual component failures are unavoidable. Fast detection, automatic isolation, and checkpoint-based resumption are fundamental to completing long-running training jobs successfully.
5. Practical Recommendations for Developers
Developers planning to train large models on domestic computing platforms should consider the following path:
- Validate inference before moving to training: The inference pipeline is relatively simple and provides a practical entry point for becoming familiar with the new hardware and software stack.
- Start at a smaller scale: First run a fine-tuning workflow on multiple GPUs within a single machine. Then expand to multi-node training to expose and resolve communication and stability issues gradually.
- Make numerical alignment a standard practice: Whenever a new operator or parallelism strategy is introduced, compare its results layer by layer with the reference implementation. This helps identify problems before they become difficult to diagnose.
- Use cloud-native infrastructure effectively: General-purpose container platforms, object storage, logging services, and related cloud capabilities can help manage training environments, datasets, and outputs while significantly reducing engineering overhead.
Conclusion
Completing training adaptation for a nearly three-trillion-parameter model on domestically developed GPUs marks an important transition from “inference ready” to “training ready.” However, achieving a genuine “train out of the box” experience will require continued investment in operator ecosystems, communication efficiency, automation toolchains, and fault-tolerance systems.
As these engineering capabilities mature, the barrier to training frontier models on domestic full-featured GPUs will continue to fall. Training domestic models on domestic chips can gradually move from isolated demonstrations to a scalable and repeatable practice.
