How a Chinese AI Accelerator Adapted Training for a Trillion-Parameter MoE Model
A technical analysis of how a domestic AI accelerator and software stack supported training for a 2.8-trillion-parameter model, covering FSDP2 sharding, communication bottlenecks, multimodal scheduling, gradient synchronization, and the value of a unified training-and-inference architecture. The article also outlines practical considerations for distributed training in cloud environments.
1. Background: Why Trillion-Parameter Training Tests AI Compute
A leading AI team recently open-sourced a flagship model with 2.8 trillion parameters. For any computing platform, fully supporting training at this scale is a comprehensive test of hardware compute capacity, interconnect bandwidth, memory capacity, and software-stack maturity.
A Chinese GPU vendor recently announced that it had completed training adaptation for the model using a flagship AI accelerator designed for both training and inference, together with its proprietary computing software stack. The effort established a native FSDP2-based multimodal training path and connected the complete workflow, from model loading and shard scheduling to gradient synchronization.
The significance of this achievement goes beyond simply getting the model to run. It validates a complete technical path in which domestic hardware and a proprietary software stack can work with mainstream deep learning frameworks in large-scale model training scenarios. The following sections examine the key components of this path.
2. Core Challenges in Trillion-Parameter Training
2.1 The Memory Wall
With 2.8 trillion parameters, the model weights alone occupy several terabytes even when stored in half precision. Optimizer states, gradients, and activations add substantially to the memory requirement, making it impossible for a single accelerator to hold the entire model.
The common industry approach is Fully Sharded Data Parallel (FSDP) and its evolution, FSDP2. These approaches distribute model parameters, gradients, and optimizer states across multiple compute nodes, aggregating and releasing them on demand.
Compared with the first-generation approach, FSDP2 provides several advantages:
- Shard management at the individual-parameter level rather than through flattened, coarse-grained partitions;
- More precise memory control;
- More flexible mixed-precision strategies;
- Better compatibility with techniques such as quantization-aware training.
These capabilities are particularly important for domestic accelerators with relatively constrained device memory. Finer-grained sharding reduces peak memory usage and provides more room for handling workload fluctuations and failures.
2.2 The Communication Wall
Sharding introduces frequent, high-volume collective communication. During the forward pass, parameter shards must be aggregated through all-gather. During backpropagation, gradients must be synchronized through reduce-scatter. As the parameter count grows, communication can account for an increasing share of total training time.
The efficiency of the training pipeline depends heavily on:
- The bandwidth and topology of high-speed interconnects between accelerators;
- How deeply the collective communication library is adapted to the hardware interconnect;
- The ability to overlap communication with computation.
2.3 The Software Ecosystem Wall
Mainstream training frameworks and model implementations are typically written for the CUDA ecosystem. Domestic hardware therefore needs a compatibility layer or native operators through its own software stack, allowing trillion-parameter training code to run with minimal changes.
This is often the most time-consuming part of training adaptation.
3. Three Key Stages in the Training Adaptation Pipeline
3.1 Model Loading and Weight Initialization
Loading a trillion-parameter model is itself a major engineering challenge. Common approaches include:
- Metadata first: Parse the model structure and shard metadata before loading the required shards, avoiding out-of-memory errors caused by loading the entire model at once;
- Multiple weight formats: Support mainstream distributed checkpoint formats and conversion-based loading from low-precision weights such as FP8 or INT4;
- Pipelined loading: Overlap storage I/O with initialization computation.
Illustrative pseudocode:
meta = load_meta("model_config") # Parse structure and shard metadata onlyshard = meta.get_shard(rank, world_size) # Determine the shard assigned to this rankweights = stream_load(shard.files) # Stream data while initializing
3.2 Shard Scheduling and the Multimodal Training Path
A “native FSDP2 multimodal training path” can be understood as a set of sharding and scheduling strategies designed for heterogeneous modules within the FSDP2 framework.
Multimodal models are challenging because their components can have very different architectures. A vision encoder may use a dense convolutional or ViT-based structure, while the language component may use a sparsely activated Mixture-of-Experts architecture. These modules have different memory and communication characteristics, so applying one uniform sharding strategy can waste resources.
A more suitable approach is to declare sharding policies at the module level, for example:
apply_fsdp2(vision_tower,sharding_strategy="full_shard",mixed_precision=bf16,sync_policy="forward_prefetch",)apply_fsdp2(language_model,sharding_strategy="hybrid_shard", # Replication within nodes, sharding across nodesexpert_parallel=True, # Expert parallelism for MoE)
3.3 Gradient Synchronization and Convergence
After backpropagation, gradients must be synchronized across shards through reduce-scatter. The optimizer then updates the parameter shards held by each device or process.
Key engineering considerations include:
- Gradient bucketing: Combine gradients from multiple parameters into larger communication buckets to improve bandwidth utilization;
- Communication-computation overlap: Start communication for earlier layers while gradients for another layer are still being computed;
- Numerical consistency checks: Use loss curves and gradient-norm comparisons from smaller-scale workloads to verify the numerical correctness of operators implemented in the domestic software stack.
4. The Value of a Unified Training-and-Inference Architecture
The accelerator used in this adaptation is positioned as a unified training-and-inference platform. In other words, the same hardware platform supports both model training and inference.
This design has both engineering and commercial value:
- Lower migration costs: Once training is complete, the model can be deployed for inference without being moved to another hardware platform, avoiding a second round of software and hardware adaptation.
- More consistent accuracy: Training and inference use the same operator implementations and numerical paths, reducing the risk of accuracy drift.
- More flexible resource scheduling: When training workloads are idle, the hardware can serve inference traffic, improving overall cluster utilization.
5. Implications for the Industry and Developers
5.1 Software-Stack Maturity Matters More Than Peak Compute
Peak performance is only the starting point when evaluating a training accelerator. Practical usability depends more on operator coverage, framework compatibility, communication-library efficiency, and the completeness of the debugging toolchain.
When selecting hardware, developers should pay particular attention to:
- The level of official support for mainstream training frameworks;
- The depth of support for distributed training features such as FSDP, ZeRO, and pipeline parallelism;
- The availability of mixed-precision and numerical-validation tools.
5.2 General Practices for Cloud-Based Large-Model Training
For teams planning to train large models in the cloud, the following practices are broadly applicable regardless of the underlying compute platform:
- Storage selection: Store training data and checkpoints in high-performance object storage or a parallel file system, supplemented by local caching to reduce I/O bottlenecks;
- Containerized delivery: Package the training environment through a container platform to ensure consistency across multiple nodes;
- Observability: Integrate logging, monitoring, and alerting systems to track key metrics such as loss curves, gradient norms, communication time, and accelerator utilization. When an anomaly occurs, stop the affected workload promptly and resume from the latest checkpoint;
- Elastic training: Support dynamic node additions and removals to improve fault tolerance for long-running training jobs.
6. Conclusion
Adapting domestic compute platforms to train extremely large models is an important milestone in the maturity of the AI accelerator ecosystem. Connecting the full workflow—from model loading and shard scheduling to gradient synchronization—demonstrates that domestic hardware and software stacks are gaining the engineering capabilities required to support advanced model development.
For developers, following the evolution of low-level adaptation technologies, learning distributed training methods such as FSDP2, and applying cloud-based training best practices will make it easier to develop large models efficiently across increasingly diverse compute environments.
