Engineering Practices for Training Trillion-Parameter MoE Multimodal Models on Domestic GPUs
This article analyzes the engineering practices of validating the training pipeline for a 2.8-trillion-parameter Mixture-of-Experts (MoE) multimodal model on domestic GPUs. It details the core challenges of dynamic sparse attention, expert routing mechanisms, and multimodal joint training. By employing a trimmed configuration, the validation successfully completed 400 steps of continuous training, demonstrating healthy loss convergence, effective memory management via FSDP, and robust all-to-all communication. The article further explores operator implementation, memory sharding, communication layers, and stability verification, while outlining the remaining hurdles for full-scale pre-training. This provides a reproducible engineering reference for evaluating GPU training capabilities.
Engineering Practices for Training Trillion-Parameter MoE Multimodal Models on Domestic GPUs
1. Background: Why Trillion-Parameter MoE Multimodal Models are the “Touchstone” for Training Adaptation
In recent years, large model architectures have evolved rapidly. The Mixture-of-Experts (MoE) architecture has become the mainstream approach for building ultra-large-scale models due to its characteristic of having a large total parameter count but a small activated parameter count. When combined with native multimodal capabilities, the total model parameters can reach the trillion level. For example, a recent training pipeline validation disclosed by a domestic GPU manufacturer targeted a native multimodal MoE model with 2.8 trillion parameters, imposing extreme demands on the underlying compute platform.
Specifically, the training difficulties of such models are concentrated in three areas:
- Dynamic Sparse Attention Mechanism: Unlike fixed dense attention, dynamic sparse attention determines the sparsity pattern at runtime based on input content. This means operator implementations must support dynamic memory access and compute scheduling, making it impossible to simply apply static graph optimization.
- Expert Routing Mechanism: In MoE layers, each token is routed to several experts (e.g., Top-8 activated out of 16 routing experts). Routing decisions trigger cross-device data redistribution (all-to-all communication), which is highly sensitive to multi-card communication bandwidth and latency.
- Multimodal Joint Training: The introduction of a vision tower and cross-modal projection module complicates the forward computation graph. Memory usage exhibits heterogeneous and imbalanced characteristics, requiring memory management strategies to balance both the language backbone and the visual branch.
Because of these characteristics, successfully running the complete forward, backward, and parameter update loop on such models is considered a hard metric for evaluating a GPU platform’s training capability. It examines system engineering capacities, including operator coverage, distributed framework adaptation, communication library performance, and stability, rather than just single-card floating-point peak performance.
2. Validation Design: Pipeline Validation under a Trimmed Configuration and Its Engineering Significance
It is important to note that this validation utilized a trimmed configuration rather than a full-scale pre-training. Specifically, the language backbone was truncated to 13 layers with 16 routing experts (Top-8 activation), while the complete 27-layer vision tower and cross-modal projection module were retained. Training was performed with random initialization on a medical visual question-answering image-text dataset.
This design approach is representative in engineering practice, with its rationality reflected in:
- Preserving Key Architectural Features: Trimming only reduced the number of layers in the language backbone while completely retaining core structures such as MoE routing, sparse attention, and multimodal fusion. Thus, the pipeline validation conclusions remain strongly referential for full-scale training.
- Controlling Resource Thresholds: It can be conducted on a scale of fewer than a thousand cards, facilitating rapid iteration and issue localization.
- Observable and Reproducible: 400 continuous training steps are sufficient to expose the vast majority of pipeline-level issues, such as operator correctness, gradient synchronization, and memory leaks.
According to the disclosed training data, the training loss converged from 8.9365 (average of steps 21–70) to 2.1802 (average of the last 50 steps), and the validation set loss dropped from 6.5297 to 4.6873. Peak memory was approximately 44.80GiB, and visual branch parameters were confirmed to participate in gradient updates. The monotonic convergence of the loss curve and the synchronous decline in validation loss indicate that the forward computation, backpropagation, optimizer update, and cross-modal gradient backpropagation are numerically healthy, without typical failures like gradient explosion, NaN, or communication misalignment.
Here is an engineering caveat: the absolute loss value under random initialization is not meaningful for direct comparison with pre-training baselines. Pipeline validation focuses on the loss trend, the reasonableness of gradient norms, and numerical alignment with reference implementations, rather than the final converged accuracy.
3. Breakdown of Core Engineering Steps
3.1 Operator Layer: Forward/Backward Implementation of Hybrid Attention and MoE Operators
The first step in training adaptation is operator coverage. Forward operators only solve the inference problem; training requires complete gradient operators (backward kernels). For dynamic sparse attention, backpropagation requires efficiently computing Q/K/V gradients while saving necessary intermediate activations. For MoE layers, it involves computing gradients for routing weights and the backward pass for the expert load balancing loss. Common practices include:
- Using numerical precision tools (such as element-wise error comparison) to verify the deviation between newly implemented operators and reference implementations.
- Conducting small-scale end-to-end training to observe if the loss curve aligns with the reference platform, thereby uncovering hidden operator-level errors.
3.2 Memory Management: Sharding of Parameters, Gradients, and Optimizer States
Even when trimmed to a dozen layers, the parameters, gradients, and Adam-class optimizer states (first and second-order moments) of a trillion-parameter model far exceed single-card memory. The mainstream industry solution is to adopt Fully Sharded Data Parallel (FSDP) strategies: sharding parameters, gradients, and optimizer states across devices, aggregating on-demand (all-gather) before forward computation, and releasing shards immediately after the backward pass. Key tuning points for such strategies include:
- The impact of sharding granularity (by layer or sub-module) on the communication/memory trade-off.
- The balance between activation checkpointing and recomputation overhead.
- The storage location of the master weight copy in mixed-precision training.
In this validation, the single-card peak memory was controlled at around 45GiB, indicating that the sharding and recomputation strategies were appropriately configured, leaving memory headroom for subsequent model scaling.
3.3 Communication Layer: Collective Communication Library and MoE all-to-all
Cross-node communication is handled by the underlying collective communication library. MoE training imposes special requirements on the communication library, specifically the performance and correctness of the all-to-all primitive. In each step, token representations need to be redistributed among devices holding different experts. This communication pattern is irregular and changes dynamically with the batch size. Engineering focuses include:
- The overlap capability between all-to-all and computation.
- Topology-aware scheduling to limit communication within high-speed interconnect domains as much as possible.
- The impact of communication numerical precision (whether low-precision communication is supported to save bandwidth) on training stability.
3.4 Stability Verification: Gradient Check and Long-term Stability
A notable detail in this disclosure is the publication of gradient check results—systematically verifying the correctness of the backward implementation by comparing numerical differentiation with automatic differentiation. The public disclosure of such details signifies that the adaptation work has moved from being merely functional to running correctly and reproducibly. However, there remains a gap between a short 400-step validation and a full pre-training of hundreds of thousands of steps: long-term stability must address hardware failures, slow nodes, and communication jitter. Checkpoint saving, resumable training, and elastic fault tolerance mechanisms are essential capabilities that must be fully developed.
4. Industry Perspective: Observations from Case to Trend
Looking across the industry, the adaptation pace of domestic computing power with large model training has noticeably accelerated. Multiple chip manufacturers have successively disclosed multimodal pre-training and reinforcement learning practices on thousand-card or even ten-thousand-card clusters. Some claim their solutions have adapted to hundreds of mainstream open-source large models, while others have reported completing significant model version training on fully domestic clusters with effective training rate metrics. Industry research institutions predict that shipments of high-end domestic AI chips will maintain high-speed growth in the coming years, with the market share of local solutions continuously rising.
Against this backdrop, the practice of separately disclosing continuous training steps, loss curves, and gradient check details is particularly valuable. It transforms “successful adaptation” from a mere conclusion into examinable, comparable engineering evidence. For large model training teams evaluating whether a compute platform is usable, what they truly care about are exactly these reproducible engineering milestones: whether the loss is aligned, whether gradients are correct, whether memory and throughput are predictable, and whether efficiency degrades after cluster scaling.
5. Outlook: What Remains to Cross from Pipeline Validation to Full-Scale Training
In summary, moving from a trimmed pipeline validation to full-scale pre-training of a trillion-parameter model requires crossing at least three thresholds:
- Cluster Scale Expansion: Scaling from single-node or few-node validation to thousand-card or ten-thousand-card scales requires reconstructing parallel strategies (multidimensional combinations of data, tensor, pipeline, and expert parallelism), multiplying the complexity of communication topology and scheduling.
- Long-term Stability and Fault Tolerance: A complete pre-training cycle takes weeks or even months, imposing stringent requirements on hardware reliability, fault recovery speed, and checkpoint efficiency.
- Dual Alignment of Accuracy and Throughput: It is not just about being able to train, but also aligning convergence accuracy with mainstream international platforms while ensuring that effective training throughput is economically viable.
Overall, the disclosure of the 400-step continuous training and gradient check results provides a solid engineering reference node for the reproducibility of domestic GPUs in training. It proves that domestic computing power has bridged the key technical points in the training pipeline of MoE multimodal large models, but the real test lies in scale and long-term stability. For developers and enterprises following the domestic computing ecosystem, tracking such validation progress with complete engineering details is more valuable than focusing on any single-point metric.
