Adapting China-Made AI Accelerators for Training Ultra-Large Open-Source Models: A Practical Path
This article explains how China-made AI accelerators were adapted to train an open-source model with 2.8 trillion parameters. It covers the memory and communication challenges of training at this scale, why FSDP2 is a common choice, the software stack layers that adaptation requires, and the role of integrated training-inference hardware. It closes with a look at future efficiency work.
1. Background: Training Infrastructure Challenges in the Trillion-Parameter Era
In recent years, the parameter counts of open-source large language models have kept growing, from tens of billions to now trillions. Training such models is no longer a task a single machine with several GPUs can handle. It has become a systems engineering problem that involves compute clusters, communication scheduling, memory management, and fault tolerance.
Recently, a team open-sourced a flagship model with 2.8 trillion parameters. Several compute vendors in the industry then began adapting their platforms to train this model. Among these efforts, the work on China-made AI accelerators draws particular attention. It shows that non-mainstream compute stacks can train models at this scale.
2. Core Technical Challenges in Ultra-Large Model Training
Memory Bottlenecks and Sharding Strategies
The parameters, gradients, and optimizer states of a trillion-parameter model far exceed the memory of a single device. Take mixed-precision training as an example. Each parameter needs about 16 bytes of storage during training, covering the parameter itself, its gradient, and two optimizer states. For 2.8 trillion parameters, the state storage alone reaches tens of terabytes of device memory.
The industry commonly uses Fully Sharded Data Parallel (FSDP). FSDP splits parameters, gradients, and optimizer states across multiple devices. During computation, the required parameters are gathered on demand through all-gather operations. This approach trades communication for a large reduction in memory use per device.
The second generation, FSDP2, improves on this in three ways. It introduces a multi-dimensional parallelism abstraction based on DeviceMesh, which allows flexible combinations of data parallelism and model parallelism. It uses per-parameter sharding, which makes the sharding finer-grained and easier to control. It also provides more complete native support for mixed-precision and low-precision training. These improvements explain why many adaptation projects chose to build a native FSDP2 training path.
Communication Efficiency and Gradient Synchronization
With sharded architectures, parameter gathering during the forward and backward passes creates a large communication volume. Engineers typically combine the following techniques to reduce its cost:
- Overlapping communication with computation: All-gather and reduce-scatter operations run asynchronously alongside matrix computation, which hides communication latency.
- Hierarchical, topology-aware communication: Intra-node high-speed interconnects are handled separately from inter-node networks, using a hierarchical reduction strategy.
- Gradient accumulation and bucketed communication: Gradients from multiple layers are packed together and sent in batches, which reduces the overhead of small messages.
The following pseudocode illustrates the scheduling logic:
# FSDP2 sharding schedule (illustrative)model = apply_fsdp2(model, mesh=(dp, tp), sharding="full")for batch in dataloader:with fsdp_prefetch(layer_group): # Prefetch the next group of shardsloss = model(batch).loss()loss.backward() # Shard gathering and gradient synchronization happen automatically during backwardoptimizer.step()
Completing the Multimodal Training Pipeline
Modern flagship models are often multimodal, and their training data includes text, images, and other modalities. A complete training pipeline must cover several stages: parsing and sharding multimodal weights during model loading, heterogeneous preprocessing in the data pipeline, load balancing during sharded scheduling, and cross-device gradient synchronization and reduction after backpropagation. A gap at any stage can interrupt training or cause abnormal accuracy. For this reason, a complete pipeline from model loading through sharded scheduling to gradient synchronization is the baseline requirement for adaptation work to succeed in practice.
3. Key Work in Adapting the China-Made Compute Software Stack
For non-mainstream accelerators, the difficulty of training adaptation lies less in hardware specifications than in the software ecosystem. A typical adaptation effort covers four layers:
- Compiler layer: Provide programming interfaces and operator libraries compatible with mainstream AI frameworks, and translate high-level framework instructions into the hardware’s own instructions. A common approach is to build an abstraction layer similar to a unified runtime software stack.
- Communication library layer: Implement efficient versions of collective communication primitives, such as all-reduce and all-gather, and optimize them for the hardware interconnect topology.
- Framework layer: Adapt distributed training components within the framework, including operator mapping for FSDP2, mixed-precision policies, and checkpoint saving and restoring.
- Validation layer: Ensure training quality through numerical consistency tests, which compare loss curves and gradient distributions against a reference implementation. Long-duration stability tests run training continuously for several days and monitor NaN occurrences and hardware failure rates.
4. The Value of Integrated Training and Inference Architecture
This adaptation was completed on an integrated training-inference AI accelerator. Such hardware handles both training and inference workloads on the same devices. This brings three benefits. First, it reduces infrastructure complexity, because operations teams do not need to maintain two separate heterogeneous clusters. Second, a trained model can be deployed directly on the same compute platform, which shortens the iteration cycle. Third, resource scheduling can shift quotas between training and inference flexibly, which improves overall utilization.
5. Conclusion and Outlook
The emergence of trillion-parameter open-source models marks a new stage for large language model technology. Completing training adaptation on China-made compute shows that these platforms have reached engineering maturity under extreme training conditions.
Looking ahead, advances in sharded parallelism, low-precision training such as FP8, and heterogeneous parallel scheduling should still leave considerable room to improve training infrastructure efficiency. For engineering teams, understanding the principles of distributed paradigms such as FSDP2 and knowing how to validate end-to-end training pipelines will be essential skills for working with ultra-large models.
