Training a Trillion-Parameter Multimodal Model on Domestic AI Accelerators: A Complete Adaptation Practice

    A walkthrough of adapting a 2.8-trillion-parameter open-source multimodal model to a domestic AI accelerator and software stack, covering FSDP2 full sharding, memory and communication optimization, multimodal data pipeline design, and the engineering lessons for large-scale distributed training.

    Training a Trillion-Parameter Multimodal Model on Domestic AI Accelerators: A Complete Adaptation Practice

    Background: Why Trillion-Parameter Multimodal Training Is a Hard Battle

    The open-source community recently released a flagship multimodal model with 2.8 trillion parameters, placing it among the largest open-source models to date. Training a model of this scale presents three major challenges:

    1. The memory wall: Storing model weights alone in training precision requires terabytes of memory capacity, far beyond what a single multi-GPU node can provide. Multi-level sharding and offloading strategies are mandatory.
    2. Heterogeneous multimodal data: Text, image, and other modalities differ significantly in sequence length, data distribution, and preprocessing. Even minor instability in the data pipeline can drag down overall training throughput.
    3. Software and hardware ecosystem maturity: On non-mainstream ecosystems—especially domestic AI accelerators—operator coverage, communication library stability, and distributed strategy adaptation often demand extra engineering effort.

    A domestic AI chip vendor recently announced that it had completed the training adaptation of this model. Using its flagship training-and-inference accelerator and a proprietary heterogeneous computing software stack, the team built a native FSDP2 multimodal training path, covering the full pipeline from model loading and sharded scheduling to gradient synchronization. The practice is a valuable reference for the industry: it demonstrates that a domestic hardware and software stack can carry real ultra-large-scale training workloads. This article breaks down the key technical components.

    Core Challenges: Memory and Communication at Trillion-Parameter Scale

    2.1 Breaking Down Memory Usage

    Training-state memory can be roughly estimated as: weights + gradients + optimizer states. Taking mixed-precision training (for example, BF16 weights with FP32 master weights and momentum) as an example, each trainable parameter requires roughly 16 bytes or more of state. With 2.8 trillion parameters, optimizer states alone can reach tens of terabytes. Therefore:

    • Parameter sharding is a requirement, not an option;
    • Activation checkpointing is needed to compress activation memory;
    • CPU/NVMe offloading should be available as a fallback when necessary.

    2.2 The Communication Bottleneck

    Sharding comes at the cost of higher communication volume. Forward and backward passes require all-gather operations to fetch parameters across devices, while the gradient phase requires reduce-scatter. At scales below tens of thousands of cards, how well communication overlaps with computation directly determines training efficiency. Common techniques include:

    • Asynchronous pipelining of communication and computation;
    • Gradient bucketing to reduce the number of communication rounds;
    • Topology-aware communication groups that prioritize high-bandwidth intra-node interconnects.

    Key Technical Path 1: FSDP2 Fully Sharded Data Parallelism

    3.1 Why FSDP2

    Compared with traditional data parallelism (DDP), fully sharded data parallelism (FSDP) slices parameters, gradients, and optimizer states across all devices, aggregating them temporarily on demand—trading communication for memory. The new-generation approach (commonly known as FSDP2) offers two significant advantages over earlier implementations:

    1. Dimension-wise sharding based on DTensor: Weights of linear layers can be sharded finely by column or row, rather than wrapping entire parameters at coarse granularity, giving much better control over shard granularity.
    2. Better integration with quantization and offloading: It combines easily with low-precision training and CPU offloading, forming a flexible portfolio of memory strategies.

    A schematic training loop looks like this (pseudocode):

    1. # FSDP2-style sharded wrapping (illustrative)
    2. from torch.distributed.fsdp import fully_shard
    3. for block in model.transformer_blocks:
    4. fully_shard(block, shard_dim=0) # Fine-grained sharding layer by layer
    5. fully_shard(model) # Root module sharding
    6. for batch in dataloader: # Mixed multimodal batches
    7. loss = model(batch)
    8. loss.backward() # Gradients are automatically reduce-scattered
    9. optimizer.step() # Optimizer states remain sharded

    3.2 Special Handling for the Multimodal Path

    Multimodal models typically consist of a vision encoder and a language backbone. Adaptation requires:

    • Heterogeneous sharding strategies: The vision encoder has relatively few parameters but large activations, so it can use a lower sharding degree with more frequent checkpointing. The language backbone, with its enormous parameter count, needs the most aggressive sharding and offloading combination.
    • A decoupled data pipeline: Multimodal samples vary widely in sequence length. Sample packing, length-grouped batching, and similar techniques reduce padding waste and keep per-device load balanced.
    • Training stability: Ultra-large multimodal models are prone to numerical instability under mixed precision, so gradient clipping, loss scaling, and anomaly detection mechanisms are essential.

    Key Technical Path 2: Adapting the Domestic Hardware and Software Stack

    Completing this kind of adaptation on a proprietary accelerator and its software stack typically involves solving the following problems:

    1. Operator coverage and precision alignment: Multimodal models include attention variants and custom fused operators, each of which must be aligned with precision and performance baselines on the target hardware;
    2. Distributed communication libraries: Collective communication primitives (all-gather/reduce-scatter/all-reduce) must run stably at large topology scales and integrate with upper-layer strategies such as FSDP2;
    3. Compilation and graph optimization: Graph-level optimizations such as operator fusion and memory planning help close the gap in raw hardware compute and improve actual MFU;
    4. End-to-end fault tolerance: Over long training runs, failure recovery, automatic retraining, and fast checkpoint loading are critical engineering capabilities for keeping progress on track.

    The unified training-and-inference architecture also means the same hardware and software stack handles both training and inference, requiring the software stack to provide a consistent abstraction between high-throughput training and low-latency inference.

    Industry Implications and Engineering Lessons

    The value of this adaptation can be understood on three levels:

    • Ecosystem validation: It demonstrates that domestic accelerators and proprietary software stacks can carry real training workloads at the trillion-parameter level—not just inference or small-scale fine-tuning;
    • Open-source collaboration: Open-source flagship models have become a common benchmark for evaluating hardware platforms. Vendors proactively adapting their hardware to open-source models is becoming a mainstream model of ecosystem co-building;
    • Methodology: For engineering teams, the core methodology of ultra-large-scale training is universal—sharding strategies, communication optimization, multimodal data pipelines, and fault tolerance form a playbook that can be reused across different hardware platforms.

    For teams planning to build their own large-model training capability, a practical path is: first validate distributed strategies and data pipelines on small and mid-sized models, then scale up incrementally to the target size. From the start, establish a dual-metric evaluation system covering both precision alignment and throughput baselines to avoid ending up in the trap of “it runs, but not fast enough and not accurately.”

    Conclusion

    Adapting a trillion-parameter multimodal model for training is a comprehensive test of compute, software stack, and engineering capability. As domestic hardware continues to keep pace with mainstream distributed training paradigms, a co-designed domestic infrastructure for large-model training is steadily maturing, offering the industry a more diverse set of compute options.