Engineering Verification: Training a Trillion-Parameter MoE Multimodal Model on Domestic GPUs

    This article explores the engineering practice of adapting and verifying the training pipeline for a 2.8-trillion-parameter native multimodal Mixture of Experts (MoE) model on domestic GPUs. It analyzes the technical challenges of dynamic sparse attention, expert routing communication, and numerical stability, while introducing a reusable validation methodology using a reduced configuration that preserves architectural complexity. Finally, it outlines the key engineering pillars and the necessary steps to transition from pipeline verification to full-scale pretraining.

    I. Background: Domestic GPU and Large Model Adaptation Enters the Deep End

    In recent years, as large model parameter scales approach the trillion-level and architectures evolve from dense models to Mixture of Experts (MoE) structures, the demands on underlying computing platforms have fundamentally changed. The pace of adaptation between domestic GPU vendors and model teams has accelerated significantly. Public industry information indicates that several domestic computing platforms have successfully completed multimodal pretraining and reinforcement learning tasks on thousand-GPU clusters, with training accuracy gradually aligning with mainstream international products. The scope of adaptation is also extending from tens of billions of parameters to trillion-parameter models.

    A notable recent milestone is that a domestic GPU vendor’s laboratory successfully adapted the training pipeline for a 2.8-trillion-parameter native multimodal MoE model. They completed 400 consecutive training steps in a dual-node, 16-GPU configuration without any numerical overflow or abnormal interruptions. The significance of this case lies not in the scale itself, but in the fact that, for the first time, it disclosed the process of打通 the training pipeline for an ultra-large-scale MoE multimodal model on domestic computing power with fine engineering granularity, including key details such as loss curves, gradient behavior, and memory usage.

    It is important to maintain a sober perspective: this verification is a pipeline test under a reduced configuration and does not equate to full-scale pretraining. However, from an engineering methodology standpoint, it provides a highly valuable template—demonstrating how to systematically verify the correctness of a complex training pipeline at a controllable cost.

    II. Why Trillion-Parameter MoE Multimodal Models Are Difficult to Adapt

    2.1 Irregular Computation from Dynamic Sparse Attention

    Unlike traditional dense attention, new-generation multimodal models generally adopt dynamic sparse attention mechanisms, where each token only computes attention with a portion of the context. While this reduces computation, it introduces irregular memory access patterns and dynamic shape changes, demanding higher flexibility in operator implementation and memory management. The GPU-side kernels must efficiently handle variable-length sequences and sparse indices; otherwise, the computation saved by sparsification will be offset by memory access overhead.

    2.2 Communication Pressure from Expert Routing

    In the MoE architecture, each token is distributed to several experts via a routing network (e.g., activating Top-8 out of 16 routing experts). In a distributed multi-GPU scenario, experts are typically sharded across different devices. The cross-device dispatch and collection of tokens (All-to-All communication) becomes a critical bottleneck for training throughput. At the trillion-parameter scale, with a high number of experts and large parameters per expert, the All-to-All communication volume expands synchronously with sequence length and expert scale, posing a severe test for both intra-node interconnect bandwidth and cross-node networks.

    2.3 Heterogeneous Computing Characteristics of Multimodal Architecture

    Native multimodal models usually consist of a language backbone, a vision tower, and a cross-modal projection module. These three components differ significantly in computational density, memory footprint, and gradient magnitude. The vision tower relies mostly on dense computation, while the language backbone uses sparse MoE computation. Their parallelization strategies often require differentiated designs. Simply applying a uniform parallel sharding scheme can easily lead to uneven device loads and increased pipeline bubbles.

    2.4 The Hidden Threshold of Numerical Stability

    Under mixed precision training, the routing logits and expert outputs of MoE models are more sensitive to numerical ranges, making the probability of gradient explosions or NaN occurrences significantly higher than in dense models. The seemingly simple result of “no numerical overflow, no abnormal interruptions” in pipeline verification actually implies that a complete set of numerical stability mechanisms—including mixed precision scaling, gradient clipping, and loss scalers—have been correctly implemented on the domestic hardware.

    III. Reduced Configuration Verification: A Reusable Methodology

    The engineering strategy of this verification is highly worth referencing: since full-scale pretraining on the complete model is extremely costly, a reduced configuration that “preserves architectural features while shrinking the scale” was used for initial verification. Specific practices included:

    • Language Backbone Truncation: Retained 13 layers (far fewer than the full model) but fully preserved the hybrid attention and MoE structures to ensure the operator paths matched the full model.
    • Expert Configuration Reduction: 16 routing experts with Top-8 activation, retaining real routing and All-to-All communication behaviors.
    • Multimodal Modules Fully Retained: The 27-layer vision tower and cross-modal projection module were not truncated, ensuring the multimodal forward and gradient backpropagation paths were fully covered.
    • Real Data, Random Initialization: Training was initialized randomly based on a public medical image-text QA dataset, focusing on verifying functional correctness and loss convergence trends rather than pursuing final accuracy.

    The core of this reduction philosophy is: reduce parameter count, but not architectural complexity. Pipeline verification tests whether “all code paths can execute correctly, gradients can flow correctly, and numerics can converge stably.” These factors have little to do with the number of layers but are strongly correlated with operator types, communication patterns, and module combinations.

    Based on the disclosed data, the training loss converged from 8.9365 (average of steps 21–70) to 2.1802 (average of the final 50 steps), and validation loss decreased from 6.5297 to 4.6873. The peak memory was 44.80GiB, and the vision branch parameters were confirmed to have participated in updates. These metrics each answer a key question in pipeline verification: stable training loss decline proves the optimization path is correct; synchronous validation loss decline proves the absence of implementation-level overfitting artifacts; the peak memory data proves the feasibility of the memory management strategy; and vision branch gradient updates confirm that the cross-modal gradient backpropagation path is genuinely connected—the most easily overlooked aspect in multimodal adaptation.

    IV. Three Engineering Pillars for Unlocking the Distributed Training Pipeline

    4.1 Completing Forward and Gradient Implementations for Key Operators

    The first step in adaptation is ensuring that hybrid attention and MoE-related operators have complete forward and backward implementations on the target hardware. The difficulty here lies not in a single operator, but in ensuring that the gradient implementation strictly corresponds to the forward pass—such as the discrete choices during routing, the backpropagation of load balancing auxiliary losses, and the gradient sparsification of sparse attention. Any missing or inconsistent component will manifest as non-converging loss or gradient anomalies.

    4.2 Memory Management Based on Parameter Sharding

    Even after reduction, a trillion-parameter model poses a challenge to single-GPU memory. Engineering-wise, Fully Sharded Data Parallel (FSDP) was used to perform 3D sharding on parameters, gradients, and optimizer states. During training, parameters are aggregated on-demand for computation and then released, allowing each GPU to hold only a shard of the global state. This approach shifts the memory pressure from “fitting the entire model on a single GPU” to “fitting a slice of the model on a single GPU,” which is the de facto standard for large model training. The 44.80GiB peak memory indicates that the sharding granularity and communication scheduling are well coordinated.

    4.3 Stability of Cross-Node Communication Libraries

    The combination of MoE’s All-to-All communication and FSDP’s parameter aggregation makes the training process highly sensitive to the correctness and performance of the communication library. Completing 400 consecutive steps without interruption proves that the collective communication primitives operate stably in a multi-node environment. In engineering practice, overlapping communication with computation, tuning communication bucket sizes, and topology-aware routing strategies are key optimization directions for transitioning from “able to run” to “running fast.”

    V. From Pipeline Verification to Full-Scale Pretraining: How Far to Go

    It must be objectively stated that the 400-step reduced verification is only a starting point. To move toward full-scale pretraining, the following thresholds must be crossed:

    1. Scale-out Stability: Scaling from 16 GPUs to thousands of GPUs will fundamentally change communication patterns, failure rates, and checkpointing strategies.
    2. Numerical Health over Long Training Runs: Hundreds of steps without overflow does not equal tens of thousands of steps without overflow. Continuous loss spike monitoring and automatic recovery mechanisms are required.
    3. Throughput and MFU Optimization: Pipeline verification solves “correctness”; the next step is solving “efficiency,” including operator fusion, pipeline parallel scheduling, and communication-computation overlap.
    4. End-to-End Data Pipeline: Full-scale training imposes higher requirements on data loading throughput and multimodal data preprocessing.

    Looking at general industry deployment paths, engineering teams typically leverage general cloud infrastructure capabilities at this stage to support scaled training. For instance, using object storage to host massive training data and checkpoints, container platforms to orchestrate elastic training tasks, and logging services with monitoring and alerting systems to track the health of long-cycle training. Cloud platforms like Baidu AI Cloud have mature capabilities in these general product categories and can provide standardized infrastructure support for large-scale training tasks, although specific training framework and computing power adaptation still require deep collaboration between model teams and hardware vendors.

    VI. Conclusion

    The successful pipeline verification of a 2.8-trillion-parameter MoE multimodal model on a domestic GPU provides a clear methodology. It uses a “preserve architecture, shrink scale” reduction strategy to lower verification costs, defines pass criteria across four dimensions (training loss, validation loss, peak memory, and branch gradients), and identifies operator completion, parameter sharding, and communication stability as the three engineering pillars. For developers, this approach is applicable not only to domestic hardware adaptation but also to verifying the feasibility of complex model training pipelines on any new hardware platform. The synergy between domestic computing power and large models is still ongoing, but the path is becoming increasingly clear.