Taming Trillion-Parameter MoE Multimodal Training on Domestic AI Accelerators

    This article examines the engineering practices behind adapting a domestic GPU cluster to train a trillion-parameter Mixture-of-Experts (MoE) multimodal model. It covers the core challenges of dynamic sparse attention, expert routing communication, and multimodal memory management, then outlines the systematic approach to distributed training – including operator completeness, full sharding of parameters, gradients, and optimizer states, and stable inter-node communication. The article also details the validation methodology used to prove training effectiveness, such as loss convergence, gradient checks, and long-run stability, and concludes with insights for developers evaluating domestic accelerator readiness for large-model training.

    Introduction: Domestic Accelerators Enter the Deep-Water Zone of Training

    In recent years, model parameter counts have surged, with trillion-parameter Mixture-of-Experts (MoE) architectures and native multimodal capabilities becoming the mainstream form for leading models. At the same time, a critical question faces the entire industry: can these complex training workloads run stably and reproducibly on domestic GPU clusters?

    Recently, a domestic GPU vendor disclosed that its computing cluster successfully adapted the training pipeline for a ~2.8-trillion-parameter MoE native multimodal model. Under a two-node, 16-GPU configuration, the team completed hundreds of consecutive training steps without numerical overflow or abnormal interruption, and published training loss convergence curves along with gradient consistency check results. While this progress is still a pipeline validation under a reduced configuration, the engineering value is substantial. Drawing on such practices, this article systematically outlines the core technical challenges and engineering methodologies involved in adapting domestic accelerators for trillion-parameter MoE multimodal training.

    Why Trillion-Parameter MoE Multimodal Models Are a Hard Training Problem

    1.1 Dynamic Sparse Attention Brings Computational Uncertainty

    Unlike traditional dense attention, modern large models widely adopt dynamic sparse attention: each position only performs attention computation with a subset of key context tokens. This mechanism significantly reduces compute in long-sequence scenarios, but introduces two engineering challenges. First, the sparsity pattern is dynamically generated, making static graph compilation and operator fusion difficult to apply directly. Second, the workload across different compute units is no longer uniform, complicating compute-communication pipelining across cards and easily creating a “bucket effect” that drags down overall throughput.

    1.2 Expert Routing Poses High Demands on Multi-Card Communication

    The core of MoE architecture is a router that dynamically assigns each token to several expert subnetworks. In a reduced configuration with 16 routed experts and top-8 token activation, the actual full-size model often has hundreds of experts distributed across different GPUs. This means every forward pass involves large-scale All-to-All communication: tokens must be sent to the devices hosting their assigned experts, computed, and then gathered back. Communication volume grows multiplicatively with expert count, active experts, and token count, placing extreme demands on inter-node interconnect bandwidth and the maturity of communication libraries.

    1.3 Multimodal Structure Complicates Memory Management

    Native multimodal models typically include a language backbone, a vision encoder tower, and cross-modal projection modules. In the adaptation described here, even though the language backbone was trimmed, the full 27-layer vision tower and cross-modal projection were retained. During image-text mixed training, the high-resolution feature maps from the vision branch consume a large amount of memory, and activation lifetimes vary significantly across modalities. Any carelessness in peak memory scheduling can trigger overflow. In this validation, the peak memory was approximately 44.80 GiB, a result of fine-grained memory planning.

    Systematically Unlocking the Distributed Training Pipeline

    2.1 Operator Layer: Completing Forward and Gradient Implementations

    The first step in adaptation is operator completeness. Operators related to mixed attention and MoE must not only have correct forward implementations, but more critically, numerically correct backward gradient implementations. In engineering, this is typically validated by comparing numerical gradients against automatic differentiation gradients: on several randomly initialized submodules, the relative error between analytical and finite-difference gradients must stay within the 1e-5 order of magnitude to consider the gradient path trustworthy. The disclosure of gradient check details in this case is a significant indicator of training reproducibility.

    2.2 Sharding Strategy: Full Sharding of Parameters, Gradients, and Optimizer States

    A trillion-parameter model cannot fit on a single GPU, so a fully sharded data-parallel approach (often called FSDP-style) is required to partition parameters, gradients, and optimizer states across all compute units. The core idea: each compute unit persistently holds only one shard of the parameters, and during forward and backward passes, the full parameters are temporarily aggregated via collective communication and released immediately after use. This allows a two-node, 16-card configuration to support a model far larger than a single card’s memory capacity. A simplified training skeleton is shown below:

    1. # Illustrative code: core flow of fully sharded training (not tied to a specific framework API)
    2. model = shard_model(model, mesh=cluster_mesh) # shard params/gradients/optimizer states
    3. for batch in dataloader:
    4. with gather_params(model): # gather parameter shards on demand before compute
    5. loss = model(batch.images, batch.texts)
    6. loss.backward()
    7. grad_clip_and_check(model) # gradient clipping and anomaly detection
    8. optimizer.step(); optimizer.zero_grad()

    2.3 Communication Layer: Stability of Cross-Node Collective Communication

    Cross-node communication is typically handled by a dedicated collective communication library, which implements primitives such as All-to-All (for expert routing), All-Gather (for parameter aggregation), and Reduce-Scatter (for gradient sharding). For MoE models, overlapping communication with computation is especially important: prefetching the routing targets of the next batch of tokens while current expert computations are still running can significantly hide communication latency. The maturity of the communication library on domestic hardware directly determines the upper bound of cluster linear scaling efficiency.

    Validation Methodology for Training Effectiveness

    Unblocking the pipeline is only the first step; proving that “training is actually learning” is equally critical. The validation methods disclosed in this case offer a typical reference:

    • Training loss convergence: The training loss dropped from an average of ~8.94 in the early/mid stage to ~2.18 in the final segment, showing a healthy downward trend and confirming that the forward, backward, and optimizer update paths are jointly correct.
    • Validation loss decreases in parallel: Validations loss fell from ~6.53 to ~4.69, indicating the model is not simply overfitting training samples and that cross-modal representations are genuinely improving.
    • All branches receive gradient updates: Confirmation that the vision branch’s gradient backpropagation is not blocked — a common hidden flaw in multimodal training is that one branch silently loses gradient flow while training “appears normal.” Checking gradient norms per branch is a necessary step.
    • Long-run stability: Hundreds of consecutive steps without numerical overflow or abnormal interruption provide direct evidence that loss scaling strategies and numerical stability handling in mixed-precision training are effective.

    It is important to note that such validation is typically based on reduced configurations and random initialization, with the goal of verifying functional correctness and loss trends rather than producing a production-ready model. Between this reduced-configuration validation and full-scale pretraining, there remain significant hurdles: cluster scaling from hundreds to thousands of cards, long-duration stable operation (checkpoint-resume, fault tolerance), and precision alignment.

    From publicly available information, several domestic accelerator vendors are accelerating training-side adaptation: some have used thousand-card clusters to support multimodal pretraining and reinforcement learning; others are pushing mainstream open-source model families into thousand-card and ten-thousand-card scenarios; and industry reports indicate that domestic AI chip solutions are rapidly gaining market share in China. On the cloud side, platforms including Baidu AI Cloud are lowering the engineering threshold for large-model training through elastic compute scheduling, distributed training frameworks, and monitoring/alerting systems. Developers can build their own training pipelines on top of general cloud platform capabilities without building infrastructure from scratch.

    For developers, this type of practice offers three key takeaways: First, when evaluating accelerator adaptation maturity, focus on reproducible engineering evidence such as loss curves, gradient checks, and peak memory usage, rather than raw peak FLOPS metrics. Second, MoE and multimodal structures are the best litmus test for the completeness of a training stack; successfully running such architectures means that communication, sharding, and operator systems are all in place. Third, there is still a gap between pipeline validation and production-grade pretraining, so when planning training tasks, reserve sufficient engineering headroom for cluster expansion and long-duration stable operation.

    Conclusion

    The successful training-pipeline validation of a trillion-parameter MoE multimodal model on domestic GPUs marks a substantial step from “inference-capable” toward “training-capable” for domestic accelerators. Although challenges remain in scaling to full-size, long-cycle production training, the publicly disclosed engineering details provide a reference point for the industry. As operator ecosystems, communication libraries, and distributed frameworks continue to mature, the role of domestic accelerators in the main battleground of large-model training looks increasingly promising.