Training Adaptation for a 2.8T-Parameter Multimodal Model on China-Developed AI Accelerators

    This article analyzes the technical path for adapting a roughly 2.8-trillion-parameter open-source multimodal model to training on China-developed AI accelerator cards with an in-house software stack. It explains why training adaptation is harder than inference adaptation, examines distributed sharding and scheduling for trillion-parameter models, outlines the multimodal training pipeline, and walks through the full chain from checkpoint loading and device mapping to forward/backward validation and gradient synchronization. It also discusses the software stack’s role and the implications for teams building large-scale AI training infrastructure.

    In recent years, the parameter scale of open-source large models has continued to rise from tens of billions to trillions, and the complexity of training adaptation has grown exponentially. A recent case involved a flagship open-source multimodal model with about 2.8 trillion parameters. China-developed AI accelerator cards completed training adaptation for this model using an in-house software stack. This case provides a useful sample for discussing how ultra-large-scale models can complete training on heterogeneous compute. This article breaks down the full chain of large-model training adaptation from a technical perspective.

    1. Why Training Adaptation Is Harder Than Inference Adaptation

    Inference adaptation usually only needs to ensure that the model’s forward computation executes correctly on specific hardware. The focus is mainly on operator coverage and inference performance optimization. Training adaptation is different: it requires the entire backpropagation process to run completely and correctly on the target hardware, including:

    1. Operator gradient support: Every operator involved in forward computation needs a corresponding gradient implementation, and its numerical precision must match the reference implementation.
    2. Mixed-precision training: Mainstream large-model training generally uses mixed-precision strategies. Hardware must provide stable support for half precision, single precision, and necessary extended precision formats.
    3. Communication and synchronization: Trillion-parameter models inevitably rely on multi-machine, multi-card training. The stability and bandwidth utilization of collective communication libraries directly determine training efficiency.
    4. Long-running stability: Training jobs often run for weeks. Any issue such as memory leaks, numerical overflow, or communication timeouts will be amplified.

    Therefore, completing training adaptation for an ultra-large-scale model is essentially a full-stack validation of hardware, compilers, communication libraries, and distributed frameworks.

    2. Core Challenges of Distributed Training: Sharding and Scheduling

    The parameter count, gradient volume, and optimizer states of a trillion-parameter model far exceed the memory capacity of a single card. In common mixed-precision training, parameters, gradients, and optimizer states such as momentum and variance are often stored in FP32, and the memory footprint can exceed 16 times the parameter count. For 2.8 trillion parameters, state storage alone requires tens of TB of memory, making multi-dimensional parallelism and sharding strategies mandatory:

    1. Data parallelism and Fully Sharded Data Parallel (FSDP): Parameters, gradients, and optimizer states are evenly sharded across cards, then aggregated and released on demand during forward and backward computation, greatly reducing peak memory per card. Newer sharding implementations are often based on per-parameter dynamic sharding and support more flexible aggregation strategies and CPU offload.
    2. Tensor parallelism and pipeline parallelism: For models with oversized layers or very deep layer stacks, tensor parallelism splits matrix operations within a layer, while pipeline parallelism divides layers into stages. Combining the three forms 3D parallelism.
    3. Sharding scheduling optimization: Sharding granularity that is too fine increases communication frequency, while coarse sharding reduces memory savings. Engineering practice requires differentiated sharding strategies for different modules such as attention layers, feed-forward layers, and embedding layers based on computation graph analysis. Prefetch mechanisms can overlap communication with computation and hide aggregation latency.

    The illustrative sharding configuration logic is as follows:

    1. # Pseudocode: configure differentiated sharding strategies for different modules
    2. sharding_config = {
    3. "embedding": dict(shard_dim=0, offload=True), # Large-vocabulary embedding, can be offloaded to CPU
    4. "attention": dict(shard_dim="full", prefetch=True),
    5. "ffn": dict(shard_dim="full", prefetch=True),
    6. "norm": dict(shard_dim="none"), # Small parameter count, no sharding
    7. }
    8. apply_sharding(model, sharding_config)

    3. Building the Multimodal Training Path

    Compared with text-only models, multimodal models add several key steps to the training path:

    1. Heterogeneous data pipelines: Text, images, audio, and other data come from different sources. Preprocessing pipelines need to unify them into a consistent batch format and pipeline data loading with GPU computation to avoid data supply becoming a bottleneck.
    2. Co-training of modality encoders and the language model: Vision encoders, projection layers, and the language model may use different learning rates and update strategies. The framework must support fine-grained configuration at the parameter-group level.
    3. Sequence packing and variable-length handling: Multimodal samples vary widely in length. Sequence packing with attention masks is commonly used to improve throughput while preserving semantic isolation.

    During training adaptation, it is necessary to verify operator coverage and numerical correctness for these components on the target hardware. This is especially important for vision-side operators such as convolution, interpolation, and normalization, whose gradient implementations are often weak points in adaptation.

    4. The Full Chain from Model Loading to Gradient Synchronization

    A complete training adaptation project can be broken down into four stages:

    1. Model loading and weight initialization: The checkpoint files of a trillion-parameter model themselves reach tens of TB. The system needs to support chunked loading, lazy loading, and resumable training to avoid memory overflow during loading.
    2. Sharding and device mapping: Based on memory capacity and topology, including bandwidth differences between cards and between nodes, the system automatically generates device placement and sharding plans.
    3. Forward and backward computation validation: Start with a small-scale configuration, such as fewer layers or a smaller vocabulary, to verify numerical correctness. Compare loss curves and gradient norms against the reference implementation, then scale to the full configuration.
    4. Gradient synchronization and optimizer updates: Verify the correctness and efficiency of collective communication for gradient aggregation, such as ReduceScatter and AllGather, and confirm read/write consistency for sharded optimizer states.

    The milestone for completing this chain is stable operation over multiple iterations at real-scale configuration, with loss convergence behavior consistent with industry reference implementations.

    5. Software-Hardware Co-Design: The Key Role of the Software Stack

    The reason China-developed accelerator cards can complete this type of adaptation is that the in-house software stack acts as an “ecosystem translation layer.” A typical software stack includes the low-level runtime and drivers, operator libraries and communication libraries, graph compilers and autotuning, and distributed training framework interfaces. Adaptation work usually focuses on:

    • Operator completion: Add forward and backward implementations for newly introduced model operators, such as new attention variants.
    • Compilation optimization: Reduce memory fragmentation and memory access overhead through operator fusion and memory planning.
    • Communication optimization: Optimize collective communication algorithms for the interconnect topology between cards, choosing ring, tree, or hierarchical aggregation strategies.

    6. Implications for the Industry

    This adaptation case sends several important signals. First, training adaptation capability is becoming a core metric for measuring the maturity of an AI compute platform. Inference capability alone is not enough to support the requirements of the large-model era. Second, the portability design of mainstream distributed training frameworks, such as native sharded parallel interfaces, significantly lowers the cost of integrating heterogeneous hardware. The openness of the software ecosystem can determine deployment speed more than single-hardware performance. Third, multimodal capability is becoming standard for flagship models, and training infrastructure must treat multimodal data pipelines and mixed-modality scheduling as first-class design concerns.

    For teams planning large-scale model training, practical recommendations are: first complete numerical correctness validation at a reduced scale, then gradually expand parallel dimensions; establish comprehensive monitoring for gradient norms and loss; and pay attention to throughput matching between the data pipeline and the compute pipeline. Only by bringing every part of the training chain into the scope of validation and optimization can ultra-large-scale model training be truly stable in production.