Training Trillion-Parameter MoE Multimodal Models on Domestic GPUs: Engineering Practices
This article examines the engineering work required to adapt domestically produced GPUs to training-side workloads for trillion-parameter MoE multimodal models. It covers operator coverage for hybrid attention and expert routing, distributed parameter sharding and communication coordination, numerical stability validation through loss curves and gradient checks, and the limits of trimmed-configuration validation. It also offers practical guidance for teams evaluating domestic GPU training infrastructure and outlines the gap between pipeline validation and full-scale pretraining.
Training Trillion-Parameter MoE Multimodal Models on Domestic GPUs: Engineering Practices
1. Background: Training-Side Adaptation of Domestic GPUs Moves into Deep Water
Over the past two years, large model parameter scales have moved from the hundreds of billions to the trillions. MoE (Mixture-of-Experts) architectures and native multimodal capabilities have become mainstream directions. Alongside this shift, training infrastructure is increasingly moving toward domestic hardware: more model teams are beginning to run pretraining and reinforcement learning tasks on domestically produced GPUs, and industry consulting firms predict that the share of local AI chips in the domestic high-end market will continue to rise rapidly.
In this process, the criteria for measuring the maturity of domestic compute are changing. Early adaptation work focused more on inference scenarios and single-card operator coverage. Today, the industry’s attention has shifted to training-side system capability: whether the full multi-node, multi-GPU distributed training pipeline can run on models with hundreds of billions or trillions of parameters while maintaining numerical stability and normal loss convergence. Recently, a domestic GPU vendor disclosed that its lab completed training-pipeline adaptation validation for a 2.8-trillion-parameter MoE native multimodal model. On a two-node, 16-GPU configuration, it ran 400 consecutive training steps without numerical overflow or abnormal interruptions, and published details of the loss curve and gradient checks. This case provides a rare engineering snapshot for observing the training-side capabilities of domestic compute. This article uses it as a starting point to break down the key technical issues involved.
2. Why Trillion-Parameter MoE Multimodal Models Are a Hard Test for Training Adaptation
2.1 Operator Complexity from Dynamic Sparse Attention
Native multimodal large models typically use hybrid attention mechanisms: the language backbone may alternate between global attention and local sliding-window attention, while the vision encoding part must handle large numbers of visual tokens after high-resolution image splitting. This means the GPU side must implement not only the forward and backward passes of standard attention, but also efficient operators for sparse patterns, variable-length sequences, and cross-modal concatenation. If any operator lacks a gradient implementation or has a precision deviation, it can directly cause training interruption or abnormal loss.
2.2 Expert Routing Pressure on Communication and Load Balancing
MoE architectures use Top-k routing to dispatch tokens to different experts, which introduces two typical challenges in multi-GPU environments:
- Communication-intensive All-to-All: Tokens must be frequently exchanged across GPUs along the expert-parallel dimension. The communication volume grows linearly with the number of experts and activated experts, placing severe demands on both intra-node interconnect bandwidth and inter-node networking.
- Load imbalance: Routing naturally creates hot experts. Without auxiliary balancing losses or capacity factor controls, some GPUs may run out of memory while others sit idle, and overall throughput is dragged down by the slowest node.
2.3 Multiple Memory Management Pressures
Even after trimming, the total volume of parameters, gradients, optimizer states, and activations for a trillion-parameter model far exceeds single-GPU memory. In multimodal scenarios, the vision tower and cross-modal projection modules require additional memory, and the output resolution of the vision branch directly affects activation size. How to complete sharding, recomputation, and communication overlap within limited memory is a prerequisite for getting the pipeline to run.
3. Key Engineering Steps in Completing the Training Pipeline
3.1 Operator Layer: Completing Forward and Gradient Implementations
The first step in adaptation work is operator coverage. For hybrid attention and MoE structures, the domestic GPU software stack must implement:
- Forward and backward kernels for sparse/sliding-window attention, with alignment to reference implementations within an acceptable numerical error range;
- Dispatch/combine operators for expert routing, supporting grouped GEMM to improve expert computation efficiency;
- Complete gradient paths for cross-modal projection and vision-encoding operators, ensuring that vision branch parameters can participate in updates normally. This point is often overlooked; in some adaptation cases the vision tower is frozen, which strictly speaking does not count as complete multimodal training.
3.2 Distributed Layer: Parameter Sharding and Communication Coordination
For parallelism strategy, fully sharded data parallel (FSDP-style) solutions are currently a mainstream choice. The core idea is to store parameters, gradients, and optimizer states in shards across GPUs, and aggregate them on demand during computation:
# Illustration: memory composition of FSDP-style sharded trainingper-GPU memory ≈ parameters/N + gradients/N + optimizer states/N+ aggregated parameters for current layer (temporary) + activations (recomputable)
Combined with expert parallelism (EP) and data parallelism (DP), cross-node communication is handled by collective communication libraries. Key optimizations include:
- Communication-computation overlap: prefetching the next layer’s parameters while backward computation is running;
- Gradient bucketing and compressed transmission to reduce network congestion;
- Isolating or scheduling expert-parallel All-to-All and data-parallel AllReduce links to avoid blocking each other.
3.3 Numerical Stability: Loss Curves and Gradient Checks
A training pipeline that “runs” and one that “runs correctly” are two different things. In engineering practice, correctness is usually verified through the following methods:
- Loss curve comparison: Observe whether training loss decreases at the expected pace. In the publicly disclosed case, on a randomly initialized trimmed configuration, training loss converged from about 8.94 in the early stage (mean of steps 21–70) to about 2.18 (mean of the last 50 steps), and validation loss decreased in parallel. This indicates that the forward pass, backward pass, and optimizer update pipeline are internally consistent.
- Gradient norm monitoring: Check whether gradients in each module are at a reasonable magnitude, and whether there is gradient explosion, vanishing, or a zero gradient in a particular branch, which would mean that branch is not participating in updates.
- Overflow and anomaly detection: During mixed-precision training, loss scaling and NaN/Inf events should be recorded throughout the run. Running 400 consecutive steps without interruption is a basic stability threshold.
- Memory profiling: Record peak memory usage. In this case it was 44.80 GiB per GPU, which can be used to evaluate whether the sharding strategy and recomputation configuration are reasonable.
4. How to Interpret the Value and Boundaries of “Trimmed Configuration Validation”
It is important to clarify that such validation usually uses a trimmed model configuration—for example, using only part of the language layers, reducing the number of routed experts, retaining the full vision tower and cross-modal modules, and training from random initialization on a public image-text dataset. Its purpose is pipeline validation of training functionality and loss trends, not full-scale pretraining.
Moving from trimmed validation to full-scale training still requires crossing several critical thresholds:
- Cluster scale expansion: From 16 GPUs to thousands or tens of thousands of GPUs, communication topology, failure rates, and scheduling complexity grow nonlinearly. Effective training time ratio—the share of actual training time after deducting failure recovery and restart overhead—becomes a core metric.
- Long-duration stability: Full pretraining of trillion-parameter models takes weeks or even months. A complete reliability mechanism is required, including fast checkpoint save/restore, hot replacement of failed GPUs, and silent data corruption detection.
- Precision alignment: Downstream task metrics after convergence on the target dataset must align with training results from mainstream international solutions to prove that the full pipeline has no systematic deviation.
- Performance tuning: Model FLOPs utilization (MFU) determines training cost, involving long-term optimization work such as operator fusion, pipeline bubble reduction, and communication-topology-aware scheduling.
5. Practical Recommendations for Developers and Enterprises
For teams planning to evaluate domestic GPU training solutions, the following path is recommended:
- First validate operator and numerical correctness: Align loss curves and gradients on small-scale configurations before discussing scale-up.
- Stress-test communication capabilities by layer: Separately test intra-node and inter-node collective communication bandwidth and All-to-All performance to locate bottlenecks.
- Establish a reproducible validation baseline: Fix random seeds, datasets, and trimmed configurations to form regression tests that can be compared continuously.
- Use mature platforms to reduce trial-and-error costs: During engineering deployment, teams can rely on cloud platforms with complete toolchains for cluster scheduling, monitoring and alerting, and log analysis. For example, mainstream cloud platforms such as Baidu AI Cloud provide container platforms, logging services, and monitoring and alerting capabilities that can help teams quickly build training infrastructure and focus on core adaptation work at the model and operator levels.
6. Conclusion
Training-pipeline validation of domestic GPUs on trillion-parameter MoE multimodal models marks a substantive step from “can run inference” toward “can run training.” Four hundred consecutive training steps, normal loss convergence, passed gradient checks, and a vision branch that participates in updates—these details constitute engineering evidence of reproducibility. Objectively speaking, however, there is still a long road from trimmed-configuration validation to full-scale, long-cycle, high-precision pretraining, including cluster expansion, long-duration stability, and performance tuning. For the industry, disclosing more engineering details of this kind and establishing unified validation criteria will do more to mature the domestic training ecosystem than peak-compute marketing alone.
