Training a 2.8-Trillion-Parameter Multimodal Model on a Chinese AI Chip: Native FSDP2 Adaptation Practice

    This article explains how a domestic AI chip platform and its in-house software stack were adapted to train a 2.8-trillion-parameter mixture-of-experts multimodal model. It covers the memory and load challenges of trillion-parameter training, the design of a native FSDP2 training path from model loading and sharding to gradient synchronization, and a practical methodology for hardware-software co-adaptation.

    Training a 2.8-Trillion-Parameter Multimodal Model on a Chinese AI Chip: Native FSDP2 Adaptation Practice

    Introduction: The Compute Adaptation Challenge of the Trillion-Parameter Era

    As large language and multimodal models grow to trillions of parameters, model training places unprecedented demands on the underlying compute platform. Recently, an open-source community released a flagship multimodal model with 2.8 trillion parameters. Its mixture-of-experts (MoE) architecture and multimodal fusion capabilities make it an important benchmark for testing how mature AI training infrastructure is.

    Against this background, a Chinese AI chip manufacturer completed the training adaptation of this model. The work used its flagship integrated training and inference AI accelerator card and its in-house software stack. The team built a native FSDP2 multimodal training path and connected the full training workflow, from model loading and shard scheduling to gradient synchronization. The practice shows that a domestic compute platform can support training of very large models, and it offers an engineering methodology that others in the industry can adapt. This article examines the key steps and core challenges of this adaptation process from a technical perspective.

    1. Why Training Trillion-Parameter Multimodal Models Is So Difficult

    1.1 The Memory Wall: Triple Pressure from Parameters, Gradients, and Optimizer States

    For a model with 2.8 trillion parameters, the parameters alone require several terabytes of memory, even when stored in mixed precision with FP16 or BF16. Training also requires gradient copies and optimizer states, such as the first and second moments of the Adam optimizer. The total memory requirement is often several times the size of the parameters. A single device or even a single machine cannot hold this load, so large-scale distributed parallelism is required.

    1.2 Additional Complexity from Multimodality

    A multimodal model typically includes a vision encoder, a language backbone, and cross-modal alignment modules. These components have very different compute profiles. The vision encoder is compute-intensive, the language backbone is memory-access-intensive, and load imbalance in the MoE routing layers increases communication overhead. Designing sharding and scheduling strategies that fit these heterogeneous modules is one of the core difficulties of the adaptation work.

    1.3 The Software Ecosystem Gap

    Most mainstream open-source large models were developed for specific GPU ecosystems. Their operator implementations, communication libraries, and distributed frameworks are tightly coupled to that hardware. Moving such a model to a new hardware architecture requires solving a series of problems, including operator coverage, numerical precision consistency, and compatibility of communication primitives. These issues put the completeness of the software stack to a serious test.

    2. Building the Native FSDP2 Training Path

    2.1 Why FSDP2

    Fully Sharded Data Parallel (FSDP) is the mainstream approach for training very large models. Its core idea is to shard model parameters, gradients, and optimizer states across all devices. Full parameters are gathered temporarily through all-gather only during computation and released immediately afterward. FSDP2 is the next-generation implementation. It introduces more flexible explicit sharding semantics and more efficient memory management. These features give finer control over parameter lifetimes, reduce memory fragmentation, and combine more effectively with hybrid parallelism strategies.

    2.2 What “Native” Support Means

    In engineering practice, “native” is a critical distinction. It means that FSDP2’s sharding scheduling, communication primitives, and memory pool management are built directly on the software stack of the hardware platform. They are not executed through a compatibility layer that translates calls. A native implementation avoids the performance losses and potential correctness risks of intermediate translation. It also allows collective operations such as all-gather and reduce-scatter to call hardware-optimized communication libraries directly, which makes full use of interconnect bandwidth.

    3. Three Key Stages of the Complete Training Pipeline

    3.1 Model Loading: A Pipeline from Disk to Shards

    Loading the weights of a trillion-parameter model is an engineering challenge in itself. In practice, the following strategies are commonly used:

    • Lazy loading and streaming deserialization: Each compute process loads only the shards it is responsible for. This prevents the complete model state from being gathered on a single node.
    • Tensor-level parallel sharding: Weight tensors are split during loading according to a predefined sharding plan. A standardized checkpoint format makes the loading process parallelizable.
    • Metadata first: The model’s metadata, including shapes, data types, and shard ownership, is built first. The actual data is then populated on demand. This significantly reduces the peak memory usage during initialization.

    3.2 Shard Scheduling: Differentiated Strategies for Heterogeneous Modules

    Given the structure of multimodal MoE models, sound shard scheduling must be designed at multiple levels:

    1. Dense layers, such as the vision encoder and attention layers, are well suited to standard full sharding with FSDP.
    2. MoE expert layers are well suited to expert parallelism (EP). Different experts are distributed across different device groups, and routing is completed through all-to-all communication.
    3. Embedding and output layers need separate tensor parallelism or sharding because their vocabularies are very large.
    4. Activation checkpointing granularity must balance memory savings against compute overhead. It is typically enabled for deep Transformer blocks and selectively disabled for shallow modules.

    3.3 Gradient Synchronization: Overlapping Communication with Computation

    Gradient synchronization is a key factor in training throughput. In FSDP2 mode, after backpropagation finishes, gradients are reduced and sharded across devices through reduce-scatter. The main engineering optimizations include:

    • Overlapping communication with computation: Gradient reduction runs interleaved with the backward computation of subsequent layers, which hides communication latency.
    • Gradient bucketing: Gradients are grouped into buckets by size. This reduces the number of communication calls and improves the efficiency of each call.
    • Mixed-precision communication: While convergence stability is maintained, gradient communication can use BF16 to reduce bandwidth usage.
    • Topology-aware scheduling: Communication groups are arranged according to the cluster interconnect topology, with high-speed links within a node and the network between nodes. This gives priority to high-bandwidth links.

    4. A Methodology for Hardware-Software Co-Adaptation

    This adaptation practice yields a general methodology with four principles.

    First, align operators before anything else. Build a complete operator inventory, then verify each operator’s implementation and numerical accuracy on the target hardware. Pay particular attention to critical operators such as attention, normalization, and MoE routing.

    Second, verify layer by layer. Validate in the order of single operator, single layer, single module, and full network. First confirm that forward outputs match numerically. Then verify that backward gradients are consistent. Finally, run end-to-end training.

    Third, let profiling guide optimization. Use performance analysis tools to locate bottlenecks, whether they are insufficient memory, communication blocking, or inefficient operators. Optimize based on the findings rather than tuning parameters blindly.

    Fourth, run long-duration stability tests. Trillion-parameter training often runs for weeks. After adaptation, the system needs long-duration stability testing to verify fault tolerance and recovery, checkpoint saving, and resumption from checkpoints.

    Conclusion

    Completing the training adaptation of a 2.8-trillion-parameter multimodal model marks a solid step forward for domestic AI compute platforms in large-scale distributed training. The significance lies not only in running one model, but also in validating the completeness of the technical route that combines a flagship AI accelerator card, an in-house software stack, and a native distributed training framework. For organizations and developers building large model training infrastructure, the methodology around FSDP2 and similar mainstream frameworks, covering shard scheduling, communication optimization, and hardware-software co-adaptation, has broad reference value. As the open-source model ecosystem and the domestic compute ecosystem continue to develop together, the barrier to training trillion-parameter models may keep falling.