Adapting Chinese-Made AI Accelerators for Trillion-Parameter Multimodal Model Training: A Practical Path

    This article explains the main technical challenges of training multimodal models with trillions of parameters, including memory limits, structural differences between submodules, and communication efficiency. It describes a native FSDP2 training path and an end-to-end workflow from weight loading and shard scheduling to gradient synchronization, using a recent adaptation of a 2.8-trillion-parameter open-source multimodal model on a Chinese AI accelerator as a reference.

    Multimodal large models have grown from tens of billions of parameters to trillions, and training them is no longer solved by simply adding more accelerator cards. A Chinese AI accelerator vendor recently announced that its flagship training and inference accelerator card and supporting software stack completed training adaptation for an open-source multimodal flagship model with 2.8 trillion parameters. The work built a native fully sharded data parallel training path and connected the full pipeline, from model loading and shard scheduling to gradient synchronization. The result reflects the end-to-end engineering capability of Chinese compute platforms in very large-scale training. This article breaks down the technical challenges of trillion-parameter multimodal training and the general solution paths behind them, using this work as a reference.

    1. Core Challenges of Trillion-Parameter Multimodal Training

    1. The Memory Wall

    At 2.8 trillion parameters, the model weights alone require about 5.6 TB of memory in FP16. This exceeds the capacity of any single machine. Optimizer states, such as the first and second moments kept by AdamW, gradient buffers, and activations increase the actual memory requirement further. Traditional data parallelism requires each device to hold a full copy of the model, which is not feasible at this scale. Parameters, gradients, and optimizer states must therefore be sharded across devices.

    2. Structural Complexity of Multimodal Models

    Multimodal models typically consist of a vision encoder, a language model backbone, and cross-modal alignment modules. These submodules differ significantly in parameter count, compute density, and activation patterns. The training framework must apply different parallelism strategies and sharding granularities to different modules instead of using a single uniform scheme.

    3. Communication and Scaling Efficiency

    In large-scale training, the communication volume for gradient synchronization grows linearly with model size. If communication cannot overlap effectively with computation, cluster utilization drops sharply. Inter-node bandwidth is often lower than intra-node bandwidth. The design of a hierarchical communication topology and scheduling strategy directly determines training throughput and cost.

    2. Native Fully Sharded Data Parallel Design

    A core outcome of this adaptation is a native FSDP2 training path for multimodal models. Fully Sharded Data Parallel (FSDP) shards model states across the data-parallel ranks and gathers them temporarily as needed during forward and backward computation.

    Compared with earlier hook-based implementations, newer approaches typically move sharding logic into parameter registration and tensor subclass layers. This offers the following advantages:

    • Unified sharding abstraction: A custom tensor subclass handles sharding markers, broadcasting, and resharding logic within the dispatch mechanism. This avoids repeating code at each hook point and lowers maintenance cost.
    • More flexible sharding granularity: Different submodules can use different sharding strategies and dtype conversion rules. This suits multimodal models, where the vision tower and the language backbone have different characteristics.
    • Native integration with activation checkpointing and mixed precision: Precision conversion can happen during sharded recomputation, which reduces extra memory and bandwidth overhead.

    Illustrative pseudocode is shown below:

    1. from torch.distributed.fsdp import fully_shard
    2. # Apply sharding to the multimodal model module by module
    3. for block in model.vision_encoder.blocks:
    4. fully_shard(block)
    5. for block in model.language_model.blocks:
    6. fully_shard(block)
    7. fully_shard(model) # Root module handles the remaining parameters as a fallback

    This pattern of applying sharding layer by layer, with a root-module fallback, lets the framework interleave computation with communication between layers. This creates the conditions for overlapping communication and computation.

    3. End-to-End Training Pipeline

    A complete large-scale training adaptation requires connecting each of the following stages:

    1. Model loading and weight sharding. Checkpoint files for trillion-parameter models often reach several terabytes. The adaptation must load weights from object storage in a streaming, sharded manner and initialize shards directly on each rank. This avoids out-of-memory failures caused by materializing a full copy on the CPU first.

    2. Shard scheduling and device placement. The framework must decide device placement and shard granularity automatically, based on parameter size, available memory, and topology. It should also support resharding during training to respond to changes in memory pressure.

    3. Gradient synchronization. During backpropagation, each shard computes its local gradients and then synchronizes them through a reduce-scatter operation. The temporarily gathered full parameters are released immediately, which returns peak memory to the sharded baseline. Efficient implementations combine gradient bucketing with asynchronous communication, so the reduction overlaps with the computation of the previous layer.

    4. Optimizer and fault tolerance. Optimizer states are also saved in sharded form. Periodic asynchronous checkpointing and fast recovery allow long training jobs to resume after hardware failures.

    4. Software Stack Requirements for Heterogeneous Compute

    For Chinese-made accelerators, the adaptation challenge extends beyond the framework layer. A complete path requires the software stack to provide:

    • Device interfaces and operator libraries compatible with mainstream deep learning frameworks, so training code can be migrated with near-zero changes;
    • An efficient collective communication library that makes full use of intra-node and inter-node interconnect topology;
    • Compiler-level graph optimization and operator fusion to offset performance losses caused by ecosystem gaps;
    • Profiling tools that help developers locate communication bottlenecks and compute utilization issues.

    5. Closing Thoughts

    Moving from running inference to stably training trillion-parameter models marks an important threshold in measuring the maturity of an AI compute stack. This tests not only single-accelerator compute but also the completeness of the software stack, the engineering maturity of distributed training frameworks, and the stability of large clusters. As more Chinese compute platforms validate their capabilities in such demanding scenarios, developers will have a growing range of reliable options for compute selection in large model training.