Trillion-Parameter Multimodal Model Training on Domestic AI Computing Platforms: A Practical Path

    This article explains how a domestic AI computing platform in China was adapted to train an open-source multimodal model with 2.8 trillion parameters. It covers the main challenges of training at this scale, including GPU memory limits, Mixture-of-Experts scheduling, multimodal data pipelines, and software ecosystem maturity. It then walks through a native FSDP2 training path, from checkpoint loading and sharding to gradient synchronization and fault tolerance, and ends with practical steps for teams planning similar work.

    Introduction: Training Adaptation Challenges in the Trillion-Parameter Era

    An AI team recently released an open-source flagship multimodal model with 2.8 trillion parameters, again raising the scale of openly available large models. At the same time, a Chinese GPU vendor used its flagship training and inference AI accelerator and in-house software stack to adapt the training of this model. The work built a native FSDP2 multimodal training path and connected the full training workflow, from model loading and shard scheduling to gradient synchronization. This marks a key step for domestic AI computing platforms in large-scale model training.

    For developers and enterprise users, the technical questions behind this result matter most. How does a trillion-parameter model run on a domestic compute platform? Which core problems must be solved during adaptation? This article sets aside the specific vendor details and reviews the engineering work from a general technical perspective.

    1. Why Training Trillion-Parameter Models Is So Difficult

    1.1 The Memory Wall: Parameters That a Single Device Cannot Hold

    A model with 2.8 trillion parameters needs about 5.6 TB of memory for its weights alone when stored in mixed precision, such as BF16 at 2 bytes per parameter. Adding optimizer states, such as the first and second moments of Adam (typically 8 bytes per parameter), gradients, and activations pushes the total memory requirement into the tens of terabytes. No current single accelerator has enough memory for this. Distributed training is therefore required, not optional.

    1.2 Scheduling Complexity from Mixture-of-Experts Architectures

    Today’s flagship models commonly use a Mixture-of-Experts (MoE) architecture. Although the total parameter count is very large, each forward pass activates only a small subset of experts. This sparse activation adds requirements for the training framework. It needs efficient routing and scheduling, support for Expert Parallelism, and load-balancing strategies across experts. Without these, some devices run at full utilization while others sit idle, which wastes resources.

    1.3 Heterogeneous Multimodal Data Pipelines

    Multimodal models process text, images, and sometimes audio and video. Data from different modalities varies widely in size, sequence length, and preprocessing requirements. Data loading and preprocessing can easily become the bottleneck of the training pipeline. A reliable training path must support modality-aware dynamic batching and pipelined preprocessing on the data side.

    1.4 Coordination Between Hardware and Software Ecosystems

    Adapting to a domestic AI computing platform also depends on how mature the software stack is. Key questions include whether operator coverage is complete, whether the communication library is efficient, and how well the stack works with mainstream training frameworks. These foundational capabilities determine how deep the adaptation work must go and what final training efficiency is achievable.

    2. Core Design of the Native FSDP2 Training Path

    A key feature of this adaptation is the use of the native FSDP2 (Fully Sharded Data Parallel, second generation) path, rather than the traditional first-generation sharding approach. Understanding the reasons behind this choice is essential to understanding the whole design.

    2.1 Improvements in FSDP2 Over Its Predecessor

    The core idea of FSDP2 is to shard model parameters, gradients, and optimizer states across devices. Each device holds only one shard of the full state and gathers the needed parts on demand during computation. Compared with the previous implementation, the second generation improves several areas:

    • Native tensor-based sharding abstraction: Instead of flattening and wrapping parameters at the module level, FSDP2 manages parameters as sharded tensors. This gives clearer semantics and works more smoothly with compilation optimizations and checkpoint saving.
    • More flexible hybrid sharding: Within the same cluster, FSDP2 can combine full sharding with replication. This allows hierarchical optimization for typical topologies, where high-bandwidth interconnects link devices within a node and lower-bandwidth links connect nodes.
    • Finer-grained communication scheduling: The all-gather and reduce-scatter operations can be pipelined more precisely. This increases the overlap between communication and computation, which hides cross-device communication overhead.

    2.2 Sharding Strategy for MoE Architectures

    For Mixture-of-Experts models, the FSDP2 path is usually combined with Expert Parallelism. A common approach applies data parallelism with parameter sharding to the dense parts, such as attention layers and shared layers. The expert parts are split along the expert dimension across device groups. The following illustrative configuration shows the logic:

    1. # Illustrative pseudocode: combined sharding policy configuration
    2. sharding_plan = {
    3. "attention_layers": FullShardPolicy(mesh=dense_mesh),
    4. "shared_layers": FullShardPolicy(mesh=dense_mesh),
    5. "expert_layers": ExpertShardPolicy(
    6. expert_mesh=expert_mesh,
    7. load_balance="aux_loss" # Auxiliary load-balancing loss
    8. ),
    9. }

    This hybrid strategy, which shards dense layers and partitions expert layers separately, controls memory usage and keeps expert routing efficient.

    2.3 Software Stack Support

    To run the native FSDP2 path on a domestic platform, the software stack must provide three basic capabilities. First, a tensor operator library must support sharded tensors so that operations remain semantically correct after partitioning. Second, a high-performance collective communication library must optimize primitives such as all-gather and all-to-all for the platform’s interconnect topology. Third, a compatibility layer with the upper-level training frameworks must let developers complete the adaptation through familiar APIs without rewriting model code.

    3. Key Stages of the Complete Training Workflow

    3.1 Model Loading: From Checkpoint to Sharded Initialization

    The weight files of a trillion-parameter model are themselves at the terabyte scale. Loading the full model onto every device and then sharding it is impractical. The standard engineering approach is lazy loading with sharded reads. Each device reads only the shard it owns, or the model skeleton is first built on the meta device, and weights are then materialized shard by shard. This requires a checkpoint format that supports random access by shard index.

    3.2 Shard Scheduling: Orchestrating Computation and Communication

    Shard scheduling determines which computations each device performs and which communications it starts in every iteration. The main optimization techniques include:

    • Overlapping communication and computation: While the current layer runs its forward pass, the parameter shards needed for the next layer are prefetched. During backpropagation, gradient reduction runs in parallel with subsequent computation.
    • Activation checkpointing: This trades compute for memory. Intermediate activations are not stored during the forward pass and are recomputed during the backward pass. This can reduce activation memory by about an order of magnitude and is a standard technique for trillion-parameter models.
    • Dynamic sequence packing: Multimodal sequences vary widely in length. Packing samples together reduces wasted padding and improves effective throughput.

    3.3 Gradient Synchronization: Balancing Correctness and Efficiency

    Gradient synchronization uses the reduce-scatter primitive. It aggregates gradients across devices and then splits the result back to each device. Engineers should pay close attention to several details. These include the precision of gradient reduction under mixed precision, which is typically raised to a higher precision during reduction. They also include grouped synchronization of MoE expert gradients and dense parameter gradients, and the timing of synchronization when gradient accumulation is used.

    3.4 Fault Tolerance and Elasticity

    Long training runs on thousands or tens of thousands of accelerators experience hardware failures regularly. A complete training path must include periodic checkpointing, automatic removal of failed nodes, and state recovery. Asynchronous checkpointing moves the writing of weight snapshots out of the main training loop. This can significantly reduce the impact of saving on throughput.

    4. Practical Recommendations for Developers

    Teams planning large-scale model training on a domestic AI computing platform should consider the following steps:

    1. Validate numerical correctness on a small scale first. Run the full workflow on a reduced model using a few devices. Compare the loss curve with a single-device reference implementation to confirm that operators and communication semantics are correct.
    2. Expand parallel dimensions step by step. Start with pure data parallelism, then add parameter sharding, and finally introduce Expert Parallelism and pipeline parallelism. Measure throughput and memory baselines at each step.
    3. Build an observability system. Use the monitoring and alerting tools the platform provides to track memory usage per device, the share of time spent on communication, and Model FLOPs Utilization (MFU). Base tuning decisions on this data.
    4. Give the data pipeline proper attention. In multimodal training, the real bottleneck often sits on the data side. Build preprocessing and data loading as asynchronous pipelines, decoupled from computation, and stress-test them separately.

    Conclusion

    Completing the training adaptation of a 2.8-trillion-parameter multimodal model on a domestic integrated training and inference AI platform shows more than that one model can run. It shows that the domestic hardware and software stack can support large-scale training end to end, from native FSDP2 sharding and multimodal data pipelines to gradient synchronization and fault tolerance. As more engineering work like this accumulates, organizations building self-reliant large-model training infrastructure will have a stronger technical foundation and more options to choose from.