Adapting Domestic GPUs for Trillion-Parameter Multimodal MoE Model Training: Verification and Practice

    As large model parameters scale from tens of billions to trillions, Mixture of Experts (MoE) architectures and native multimodal capabilities have become industry standards. However, these complex structures pose unprecedented challenges to underlying computing infrastructure regarding communication bandwidth, memory management, and operator libraries. This article explores a successful training pipeline adaptation for a 2.8-trillion-parameter native multimodal MoE model on domestic GPUs. Under a dual-node 16-GPU configuration, the system completed 400 training steps without numerical overflow or abnormal interruptions, marking a significant milestone in systematic distributed training for domestic heterogeneous computing.

    As the parameter scale of large models leaps from tens of billions to the trillion level, Mixture of Experts (MoE) architectures and native multimodal capabilities have gradually become industry standards. However, such complex model structures present unprecedented challenges to underlying computing infrastructure, particularly in communication bandwidth, memory management, and operator libraries. Recently, a domestic GPU vendor successfully completed a training pipeline adaptation and verification for a 2.8-trillion-parameter native multimodal MoE model in a laboratory environment. Under a dual-node, 16-GPU configuration, the system completed 400 training steps consecutively without numerical overflow or abnormal interruptions. This event signifies that domestic heterogeneous computing is advancing from single-point operator adaptation to systematic distributed training pipeline integration when handling ultra-large and complex model training.

    1. Core Technical Challenges of Trillion-Parameter Multimodal MoE Models

    The core architectural features of a 2.8-trillion-parameter multimodal MoE model dictate a high threshold for the training pipeline. Specifically, it faces three major challenges:

    1. Memory and Compute Fluctuations from Dynamic Sparse Attention
    When processing cross-inputs of long text and high-resolution images, multimodal models widely adopt dynamic sparse attention mechanisms. While this effectively reduces computational complexity, it leads to highly dynamic memory allocation. For the underlying GPU, this dynamic allocation easily causes memory fragmentation. If the driver layer and memory pool management are not refined enough, Out of Memory (OOM) errors are highly likely to occur during backpropagation when calculating gradients.

    2. Multi-GPU Communication Bottleneck Caused by Expert Routing
    The essence of the MoE architecture lies in “sparse activation,” where only Top-K expert networks are activated during the forward pass of each layer. This mechanism breaks the load-balancing state found in traditional dense models across GPUs. When tokens are dynamically routed to experts on different GPUs, it triggers a massive amount of irregular cross-GPU communication. If the interconnect bandwidth of the GPU cluster is insufficient or the All-to-All primitive in the collective communication library is inadequately optimized, communication time will far exceed computation time, leading to idle computing power.

    3. Precision Control for Multimodal Alignment and Cross-Modal Projection
    Features extracted by the vision tower need to be aligned with the language backbone through a cross-modal projection module. Under mixed-precision training (e.g., BF16), the large scale differences in multimodal features can easily lead to numerical overflow or gradient vanishing in the projection layer, imposing stringent requirements on the precision of the hardware’s underlying operators.

    2. Training Pipeline Verification Practice: Engineering Exploration under Trimmed Configurations

    To verify training functionality and loss trends with limited hardware resources, the laboratory adopted a “trimmed configuration” for pipeline verification. This engineering practice is extremely common in the early stages of ultra-large model development, as it significantly reduces memory and compute consumption while keeping the core model structure intact.

    2.1 Model Structure and Dataset Configuration

    In this verification, the R&D team reasonably trimmed the model:

    • Language Backbone: Truncated to 13 network layers.
    • Expert Routing: Retained 16 routing experts with a Top-8 activation strategy.
    • Vision and Cross-Modal Modules: Fully retained the 27-layer vision tower and cross-modal projection module to ensure multimodal alignment capabilities were verified.
    • Training Data: Randomly initialized training based on a public general Visual Question Answering (VQA) dataset, allowing the visual branch to fully participate in parameter updates.

    2.2 Core Training Metrics Analysis

    On a dual-node, 16-GPU cluster, 400 consecutive training steps were completed, with core metrics showing a good convergence trend:

    • Training Loss: Significantly converged from a mean of 8.9365 (steps 21-70) to a mean of 2.1802 in the final 50 steps. This indicates that the forward computation and backward gradient update pipelines were fully connected, and parameters were being optimized in the correct direction.
    • Validation Loss: Decreased from an initial 6.5297 to 4.6873. The drop in validation loss proves that the model is not only learning the training set distribution but that the foundational logic of its generalization ability holds true.
    • Memory Peak: The memory peak during training stabilized at 44.80GiB. Under a dual-node 16-GPU configuration (where single-GPU memory is typically in the tens of GBs), this figure indicates that the R&D team employed efficient memory sharding and recomputation strategies, reserving space for subsequent cluster scaling.

    3. Systematic Engineering Breakthroughs: From Operators to Distributed Architecture

    The focus of this adaptation was not on topping single-card peak compute benchmarks, but on verifying the systematic integration of the distributed training pipeline. Achieving the aforementioned convergence required deep reconstruction at the engineering level.

    3.1 Bottom-Level Implementation of Hybrid Attention and MoE Operators

    The software stack of domestic GPUs needs to be fully compatible with the expression of mainstream deep learning frameworks. The R&D team re-implemented the forward and gradient computation logic for both hybrid attention and MoE operators for this MoE model. Below is a simplified pseudo-code example of the MoE forward routing, demonstrating the core logic that the underlying operators must support:

    1. def moe_forward(tokens, gating_network, experts):
    2. # Calculate routing probabilities
    3. gate_logits = gating_network(tokens)
    4. # Get Top-K expert indices
    5. top_k_indices = torch.topk(gate_logits, k=8, dim=-1).indices
    6. # Core challenge: irregular cross-GPU data dispatch and computation
    7. dispatched_tokens = all_to_all_dispatch(tokens, top_k_indices)
    8. # Expert computation
    9. expert_outputs = []
    10. for expert in experts:
    11. # Dynamically execute the forward logic of the corresponding expert
    12. expert_outputs.append(expert(dispatched_tokens[expert.id]))
    13. # Combine computation results across GPUs
    14. combined_outputs = all_to_all_combine(expert_outputs, top_k_indices)
    15. return combined_outputs

    On domestic GPUs, the all_to_all primitive in the above process must be deeply optimized by the collective communication library; otherwise, it will become a performance bottleneck for the entire training pipeline.

    3.2 Memory Management Relying on Distributed Sharding Strategies

    For the massive weights of 2.8 trillion parameters, even with a trimmed configuration, a single GPU’s memory cannot accommodate it. This verification adopted a distributed sharding strategy similar to FSDP2 (Fully Sharded Data Parallel). This strategy shards model parameters, gradients, and optimizer states (such as Adam’s first and second moments) within the data parallel group.
    During each forward and backward pass, required parameters are dynamically gathered via All-Gather, and after computation, gradients are synchronized and unneeded ones discarded via Reduce-Scatter. This mechanism reduces single-GPU memory usage from $O(N)$ to $O(N/P)$ (where P is the parallelism degree), enabling the dual-node 16-GPU setup to accommodate training for a model of this scale.

    3.3 Efficient Collaboration for Cross-Node Communication

    Dual-node multi-GPU training involves not only high-speed intra-node PCIe/NVLink communication but also relies heavily on cross-node network communication. This verification utilized a collective communication library self-developed by the domestic GPU vendor (functioning similarly to MCCL) to handle cross-node communication. Through underlying network topology awareness, RDMA technology, and compute-communication overlap, cross-node network latency was effectively masked.

    From an industry-wide perspective, the pace of adaptation between domestic GPUs and large models is continuously accelerating. Currently, multiple computing enterprises have driven training adaptations for mainstream open-source large models (such as hundred-billion-level dense models and multimodal MoE models) and are gradually extending to thousand-GPU and ten-thousand-GPU cluster scenarios, achieving training precision aligned with international mainstream products for specific tasks. According to industry research institutions, shipments of high-end AI chips in the domestic market are expected to surge in the coming years, with local solutions potentially capturing nearly 90% of the market share.

    For developers and enterprise users, this trend brings several important insights:

    1. Focus on Hardware-Agnostic Training Frameworks: When pre-training or fine-tuning large models, try to adopt highly encapsulated container platforms and training frameworks decoupled from underlying hardware. When switching the underlying hardware from Vendor A to Vendor B, you only need to replace the communication backend and operator libraries without rewriting upper-layer model code.
    2. Establish a Pipeline Verification Mechanism: Before conducting large-scale pre-training, as shown in this case, perform a few hundred steps of pipeline verification on a trimmed configuration or small-scale cluster first. Focus on observing the loss curve, gradient norms, and memory peaks as prerequisites for full-scale expansion.
    3. Prioritize Monitoring and Logging Services: Multi-node, multi-GPU training is highly susceptible to complete task interruption caused by minor hardware failures on a single GPU. A comprehensive cluster monitoring alerting system and distributed logging services are fundamental infrastructure to ensure the stable, long-term operation of ten-thousand-GPU clusters.

    In summary, this verification of the training pipeline for a trillion-parameter multimodal MoE model is not just a technical breakthrough for a single domestic GPU vendor, but a crucial microcosm of domestic heterogeneous computing moving towards systematic, large-scale training capabilities. As underlying operator libraries and distributed communication technologies continue to mature, the core competitiveness of domestic computing power in the era of AI large models will be further solidified.