Adapting Trillion-Parameter Open-Source Model Training to a Chinese AI Computing Platform
This article examines a training adaptation project for a trillion-parameter multimodal model on a Chinese-developed AI computing platform. It covers accelerator and software requirements, a native Fully Sharded Data Parallel (FSDP) training workflow, hybrid parallelism, and communication optimization, along with practical approaches to memory management, numerical validation, and checkpoint recovery.
1. Training Challenges at the Trillion-Parameter Scale
Open-source models continue to grow in size. A recently released flagship multimodal model from an open-source community contains approximately 2.8 trillion parameters, using sparse architectures such as Mixture of Experts (MoE) to balance model quality and inference cost.
This growth places substantial demands on the underlying computing platform. A complete model cannot fit in a single accelerator’s memory, making large-scale distributed training essential. Heterogeneous multimodal data further complicates load balancing and communication scheduling.
Enterprises and research institutions are also exploring the feasibility of training large models on Chinese-developed AI computing platforms. The goals include diversifying compute supply and gaining greater control over the hardware and software stack.
A central engineering challenge is therefore to establish an end-to-end training workflow for very large models using Chinese-developed accelerators designed for both training and inference, together with their supporting software. This article outlines the technical considerations and methods from one such adaptation project.
2. The Compute Foundation: Accelerators and the Software Stack
The first step is to establish the capabilities and limitations of both the hardware and its supporting software.
Core Accelerator Requirements
Flagship accelerators supporting both training and inference generally need three capabilities:
- High-capacity, high-bandwidth memory: Sufficient capacity and bandwidth to support activations and optimizer states alongside large model shards.
- Efficient accelerator-to-accelerator and node-to-node interconnects: Interconnect performance strongly influences communication overhead during distributed training.
- Support for mainstream numerical formats: Compute units supporting formats such as FP16, BF16, and FP8 help meet the precision and throughput requirements of large-model training.
Why Software Adaptation Matters
Hardware capabilities depend on the software stack to become usable training performance. A complete stack typically includes drivers, operator libraries, communication libraries, and framework integration layers.
For model adaptation, operator coverage and communication-library performance are often decisive. MoE routing, sparse activation, and expert-parallel communication all require efficient underlying operators and communication primitives. Without them, even a well-designed framework-level parallelization strategy cannot be implemented effectively.
3. Building a Native FSDP Multimodal Training Workflow
The central outcome of this project was a native multimodal training workflow built on a newer generation of Fully Sharded Data Parallel (FSDP). The workflow spans three key stages.
Model Loading and Weight Sharding
Trillion-parameter model weights cannot be loaded as a complete model on a single accelerator. Sharding must begin during loading.
A common engineering approach combines lazy initialization with initialization on the meta device. The model structure is first created without allocating accelerator memory for its parameters. Weights are then materialized incrementally according to the sharding plan.
Multimodal models require module-specific decisions. Vision encoders, language backbones, and connector modules can differ substantially in parameter count. Sharding should reflect these differences to avoid introducing unnecessary communication by splitting small modules too aggressively.
Shard Scheduling and Hybrid Parallelism
FSDP shards parameters, gradients, and optimizer states across devices. Parameters are temporarily gathered when required for forward and backward computation.
Newer FSDP implementations improve usability and composability, allowing FSDP to be combined with tensor parallelism and expert parallelism. For MoE models, a common arrangement is to apply FSDP to the dense layers of the language backbone and expert parallelism to the expert layers. Separate process groups allow these strategies to be composed along distinct parallel dimensions.
The following pseudocode illustrates module-specific parallelization:
# Illustrative pseudocode: configure parallelism by modulefor name, module in model.named_modules():if is_expert_layer(module):apply_expert_parallel(module, ep_group=expert_group)else:apply_fsdp(module, dp_group=data_group,sharding_strategy="full_shard")
Gradient Synchronization and Communication Optimization
Gradient synchronization can become a training-throughput bottleneck. FSDP uses reduce-scatter to reduce gradients and distribute the resulting shards, rather than retaining fully synchronized gradients on every device.
Two complementary optimizations are important in practice:
- Overlap communication with computation: Start reducing gradients as they become ready, before the entire backward pass finishes.
- Bucket gradients: Combine small tensors into larger communication units to reduce communication-launch overhead.
Multimodal training also requires attention to differences in synchronization timing between vision and language branches. Poor scheduling can leave a faster branch waiting for a slower one.
4. Common Adaptation Challenges and Responses
Controlling Peak Memory Usage
Multimodal inputs can vary significantly in sequence length, making peak activation memory difficult to predict.
Activation checkpointing and dynamic memory reclamation can help control memory use. Small-scale trial runs are also useful for characterizing peak-memory behavior before scaling up.
Validating Numerical Stability
Cross-platform adaptation requires layer-by-layer numerical comparisons. Using identical inputs, engineers should compare intermediate activations and loss curves to identify the source of precision differences.
Common causes include differences in operator implementations and reduction order.
Fault Tolerance and Training Recovery
At the scale of tens of thousands of accelerators, hardware failures become a routine operational concern. Training systems therefore need asynchronous persistence of sharded checkpoints.
Object storage and message queues can be combined into a resilient checkpoint-management pipeline. Monitoring, alerts, and logging services provide ongoing visibility into training health and support recovery when failures occur.
5. Conclusion
This adaptation project indicates that a Chinese-developed AI computing platform, combining flagship training-and-inference accelerators with its own software stack, can support trillion-parameter multimodal model training.
The native FSDP workflow connects model loading, shard scheduling, and gradient synchronization into an end-to-end training path. For developers, three transferable skills stand out: designing sharding strategies, optimizing communication, and validating numerical stability.
As the hardware and software ecosystem continues to mature, these platforms are expected to become applicable to a broader range of large-model training workloads.
