Trillion-Parameter Model Training on Domestic AI Compute Chips: A Technical Analysis
This technical analysis reviews the engineering work required to adapt a 2.8-trillion-parameter multimodal model to training on domestically developed AI compute chips. It covers the main infrastructure bottlenecks, hardware and software stack requirements, sharding and gradient synchronization paths, multimodal training considerations, and a reusable methodology for large-model training adaptation.
1. Background: Infrastructure Challenges of Trillion-Parameter Models
A 2.8-trillion-parameter multimodal flagship model was recently open-sourced. The release of such an ultra-large model is not only a leap in model capability but also places strict requirements on the underlying training infrastructure. For domestic AI compute platforms, whether they can fully support training of such models is an important benchmark for the maturity of their hardware and software stacks.
Ultra-large model training faces three core challenges:
- Memory wall: Even when stored in half precision, the weights of a 2.8-trillion-parameter model alone require several terabytes of memory capacity, far exceeding the capability of a single card or even a single node. Multidimensional parallelism and sharding strategies are therefore mandatory.
- Communication wall: Gradient synchronization in data parallelism, activation transfer in pipeline parallelism, and All-Reduce operations in tensor parallelism all become bottlenecks as scale increases.
- Software ecosystem wall: Mainstream training frameworks and operator libraries have long been built around specific hardware ecosystems. A new platform must provide comprehensive operator coverage, communication libraries, and compiler optimization capabilities.
A domestic AI vendor recently announced that, based on its flagship training-and-inference integrated AI accelerator card and in-house unified software stack, it has completed training adaptation for this open-source model, built a native distributed training path, and connected the full training chain from model loading and sharding scheduling to gradient synchronization. This progress provides a valuable engineering reference for the domestic compute ecosystem. The following sections break down the key technical steps.
2. Overall Technical Architecture for Training Adaptation
2.1 Unified Training-and-Inference Hardware Foundation
The design approach of a training-and-inference integrated AI accelerator card is to let the same hardware handle both training and inference tasks. This requires the chip to strike a balance in the following areas:
- Compute density and memory bandwidth: Training involves forward computation, backward computation, and optimizer updates. Backpropagation places especially high demand on memory bandwidth. High-bandwidth memory combined with a large on-chip cache is the foundation for supporting large-model training.
- High-speed interconnect: Multi-card and multi-node scaling depends on high-bandwidth, low-latency inter-card and inter-node interconnect to carry frequent collective communication.
- Precision support: The hardware needs to cover half-precision formats such as BF16/FP16 and gradually support low-precision training formats such as FP8 to improve throughput.
2.2 Role of the Unified Software Stack
A software stack typically includes driver, runtime, communication library, operator library, and compiler layers. When adapting large-model training, the software stack needs to ensure that:
- Mainstream Transformer-related operators, such as attention mechanisms, normalization, and large matrix multiplication, have efficient implementations;
- Communication primitives, including All-Reduce, All-Gather, Reduce-Scatter, and Send/Recv, are complete and meet performance requirements;
- The compiler layer can perform operator fusion, memory planning, and automatic tuning to reduce memory access overhead.
3. Key Paths: From Loading to Gradient Synchronization
3.1 Model Loading: Sharding First
Loading a trillion-parameter model cannot follow a “load the whole model first, then split it” approach; otherwise, no single card can hold the complete weights. In engineering practice, a common approach is:
- Generate per-card parameter shard metadata according to the parallelism strategy, including shard dimension, offset, and data type;
- Stream shards directly from distributed storage to the corresponding devices;
- Use lazy initialization and meta device techniques to first build the model structure at the logical layer, then materialize it layer by layer onto actual devices.
This can significantly reduce peak initialization memory and avoid OOM during the loading phase.
3.2 Sharding Scheduling: Combining Multiple Parallelism Dimensions
Modern large-model training generally adopts a multidimensional parallelism combination strategy:
- Data parallelism (DP): Different devices process different data shards, which is the basis for throughput scaling;
- Tensor parallelism (TP): Splits a single-layer weight matrix across multiple cards, suitable for scenarios where a single layer has a very large amount of computation;
- Pipeline parallelism (PP): Splits the model by layer across different devices and reduces bubbles through micro-batch pipelining;
- ZeRO-style sharding: Further shards optimizer states, gradients, and parameters within data-parallel groups, greatly reducing redundant memory usage.
The meaning of a “native FSDP2-style training path” is that the sharding logic is implemented natively by the framework and pushed down to communication-layer scheduling, rather than implemented through an external wrapper. Its advantages include:
- Shard granularity and communication timing can be finely controlled. Parameters can be All-Gathered on demand during forward computation and released immediately after backward computation, achieving “aggregate when used, release when done”;
- It supports differentiated configuration of state sharding and parameter sharding, balancing communication volume and memory usage;
- It can co-schedule with activation recomputation (checkpointing) to uniformly manage computation-communication overlap.
3.3 Gradient Synchronization: Overlapping Communication and Computation
Gradient synchronization is a throughput bottleneck in large-model training. Typical optimization methods include:
- Bucketing and asynchronous reduction: Divide gradients into buckets. As soon as backward computation produces a bucket, start a Reduce-Scatter/All-Reduce operation so that communication overlaps with subsequent backward computation;
- Gradient accumulation: When the small batch size is limited by memory, accumulate gradients over multiple forward and backward passes to effectively enlarge the batch size and amortize communication overhead;
- Mixed precision and loss scaling: Use half precision for forward and backward computation, keep master weights and optimizer states in high precision, and use dynamic loss scaling to avoid numerical underflow.
An illustrative gradient bucket synchronization logic is shown below:
for bucket in grad_buckets:# Start reduction immediately after the current bucket's backward computation completes,# overlapping it with subsequent backward computationbucket.reduce_scatter(async_op=True)# After backward finishes, wait for all communication to complete, then run the optimizer updatefor bucket in grad_buckets:bucket.wait()optimizer.step()
4. Special Considerations for Multimodal Training
A multimodal model contains a vision encoder, a language model backbone, and modality alignment modules. Training adaptation also needs to handle the following:
- Heterogeneous data processing pipeline: Preprocessing, packing, and padding strategies for variable-length sequences in image-text multimodal samples directly affect GPU utilization. Sequence packing can significantly reduce wasted computation.
- Different parallelism strategies for heterogeneous modules: The vision side has high compute density and a relatively small number of parameters, while the language backbone requires heavy sharding. Different modules need different parallel dimensions and shard granularity.
- Long-context support: Multimodal inputs significantly increase sequence length. Efficient attention implementations and context parallelism are needed to control activation memory.
5. General Methodology for Adapting Large-Model Training to Domestic Compute Platforms
This case suggests a reusable adaptation methodology:
- First, validate single-card operator correctness and performance: Align numerical precision on a small-scale model, for example by comparing loss curves against a reference implementation, then identify and optimize time-consuming operators;
- Next, establish single-node multi-card training: Validate the correctness of parallelism strategies and communication libraries, and tune computation-communication overlap;
- Finally, scale to multi-node clusters: Focus on inter-node bandwidth, fault tolerance and recovery (automatic checkpoint saving and resume-from-checkpoint training), and elastic scheduling;
- Build end-to-end monitoring: Cover metrics such as throughput (tokens/s), MFU (model FLOPs utilization), memory utilization, and communication time share, and continuously locate bottlenecks.
6. Conclusion
Domestic accelerator cards completing full-chain training adaptation for a trillion-parameter open-source model marks a key leap from “can infer” to “can train,” and from “running through” to “running well.” The core experience is as follows: at the hardware level, use training-and-inference integration and high-bandwidth interconnect as the foundation; at the software level, replace external adaptation with a native distributed training path; at the engineering level, connect the three key paths of model loading, sharding scheduling, and gradient synchronization one by one. As software-hardware co-optimization continues to deepen, the usability and efficiency of domestic compute in large-model training scenarios still have room for further release, and this area deserves continued attention and practical validation from developers and engineering teams.
