Engineering Practices for Training Trillion-Parameter MoE Multimodal Models on Domestic GPUs
This article examines the engineering challenges and validation methodologies involved in training trillion-parameter Mixture-of-Experts (MoE) multimodal models on domestic GPU platforms. It covers the key technical hurdles—including dynamic sparse attention, expert routing communication pressure, and multimodal memory management—and outlines a systematic pipeline for validating training correctness through scaled-down configurations, numerical stability monitoring, and gradient checking. The discussion also addresses critical components of the distributed training stack, such as parameter sharding and cross-node collective communication, and concludes with practical recommendations for developers preparing for full-scale pretraining on domestic accelerators.
Background: Domestic GPUs Moving from Inference to Training
In recent years, domestic GPUs have achieved a relatively mature level of adaptation for large model inference, with mainstream inference frameworks progressively improving support for domestic accelerators. The training side, however—particularly for trillion-parameter Mixture-of-Experts (MoE) multimodal models—imposes fundamentally different requirements on both hardware and software stacks. It tests not only single-card compute power but also multi-card communication bandwidth, memory management capabilities, operator completeness, and numerical stability over extended runtime periods.
Recent industry developments indicate an accelerating pace of adaptation between domestic GPUs and large model training. One vendor announced the completion of a 400-step continuous training pipeline validation for a 2.8-trillion-parameter MoE-architecture native multimodal model on a dual-node, 16-GPU configuration, with no numerical overflow or abnormal interruption throughout the process. Several chip companies have also disclosed pretraining and reinforcement learning practices on thousand-card or even ten-thousand-card clusters, with training accuracy aligned to mainstream international products. Industry research institutions predict that high-end AI chip shipments in the domestic market will maintain rapid growth in the coming years, with local solutions expected to gain a dominant share.
Behind these developments, what truly deserves developers’ attention is not any single vendor’s promotional messaging, but the common engineering challenges: What exactly makes training trillion-parameter MoE multimodal models on domestic GPUs difficult, and how can it be systematically validated? This article breaks down these questions from an engineering perspective.
Why MoE Multimodal Models Are the “Touchstone” for Training Adaptation
Operator Challenges from Dynamic Sparse Attention
Next-generation large models commonly adopt hybrid attention mechanisms—alternating between global attention and local sparse attention within the same model to balance long-context capability with computational efficiency. This imposes specific requirements on the GPU software stack:
- Forward propagation must support variable-length sparse attention kernels while efficiently utilizing the hardware’s matrix computation units;
- Backward propagation requires complete implementation of corresponding gradient operators; any missing component will prevent training from starting or produce incorrect gradients;
- Unlike standard dense attention, sparse patterns feature irregular memory access, demanding more from kernel scheduling and memory access optimization.
Communication Pressure from Expert Routing
In MoE architectures, each token is dispatched by a router to the Top-K experts for computation. Taking a configuration of 16 routed experts with Top-8 activation as an example, every forward pass involves large-scale token distribution and collection across cards (All-to-All communication). The engineering difficulties include:
- Communication volume scales with expert parallelism: When experts are sharded across different cards, All-to-All communication becomes one of the primary bottlenecks for training throughput;
- Load imbalance: Popular experts may receive tokens well above the average, requiring mechanisms such as capacity factors and auxiliary load-balancing losses;
- Communication-computation overlap: Efficient implementation requires communication primitives to overlap with the computation pipeline, which directly tests the maturity of the GPU collective communication library.
Memory Management Complexity in Multimodal Architectures
Multimodal models typically consist of a language backbone, a vision tower, and cross-modal projection modules. The vision branch consumes substantial activation memory, and the varying computational density across modules requires careful design of memory allocation, gradient checkpointing strategies, and parameter update ordering. Verifying that the vision branch genuinely participates in parameter updates is also a key signal for determining whether the training pipeline is fully operational.
Engineering Methodology for Training Pipeline Validation
Why Start with Scaled-Down Configurations
Launching full-scale pretraining directly on a complete 2.8-trillion-parameter model is extremely costly and carries uncontrollable risks. The industry-standard practice is to first validate the correctness of the training pipeline with a scaled-down configuration, then progressively expand scale. A typical downscaling strategy includes:
- Keeping only a small number of layers in the language backbone (e.g., 13 layers) while preserving the complete attention and MoE structures;
- Retaining the full vision tower and cross-modal projection modules to ensure the multimodal path is genuinely exercised;
- Using real domain-specific datasets (e.g., medical imaging QA data) with random initialization rather than synthetic data, to expose numerical issues under real data distributions.
The value of this approach lies in the fact that while the model is narrower and shallower, every type of operator, every communication path, and every parallel strategy is genuinely executed. If problems exist in the pipeline, 400 steps of continuous training are sufficient to expose them.
Observability Metrics for Numerical Stability
Training pipeline validation is not complete simply because “it runs”—it requires a quantifiable observation framework:
- Training loss convergence trend: For example, converging from an initial phase value of approximately 8.9 to approximately 2.2 at the final stage, with a smooth curve and no spikes;
- Validation loss decreasing in parallel: For example, dropping from approximately 6.5 to approximately 4.7, indicating the model is genuinely learning rather than overfitting noise;
- No numerical overflow: In FP8/BF16 mixed-precision training, gradient norms and loss scaling factor dynamics must be monitored;
- Controllable peak memory: For example, a single-card peak of approximately 45 GiB, indicating effective memory sharding and activation recomputation strategies.
Below is a simplified training monitoring pseudocode example:
for step, batch in enumerate(train_loader):loss = model(batch)loss.backward()grad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)optimizer.step()scheduler.step()optimizer.zero_grad()if step % 10 == 0:log({"step": step,"train_loss": loss.item(),"grad_norm": grad_norm.item(),"peak_mem_gib": get_peak_memory() / 1024**3,})assert not math.isnan(loss.item()), "Numerical anomaly detected; interrupt for investigation"
Gradient Checking: Verifying Backward Pass Correctness
For newly adapted hardware platforms, observing loss reduction alone is insufficient—loss reduction can mask incorrect gradient implementations in certain operators (the model may still be learning, but learning “incorrectly”). A rigorous approach involves gradient checking: comparing numerical differentiation results against automatic differentiation results for critical operators, with errors required to fall within thresholds allowed by floating-point precision. Proactively disclosing gradient checking details is a relatively rare practice of rigor in the industry and provides a reference point for reproducibility.
Key Components of the Distributed Training Stack
Parameter Sharding Strategies
A trillion-parameter model cannot fit entirely on a single card; it must rely on fully sharded data parallel (FSDP-class) techniques to shard parameters, gradients, and optimizer states across three dimensions. Key points include:
- All-gathering parameters on demand before forward computation and releasing them immediately after;
- Reduce-scattering gradients during backward propagation;
- Optimizer states (such as Adam’s momentum and variance) are also stored in sharded form, saving approximately 75% or more of optimizer memory usage.
Cross-Node Collective Communication
In multi-node, multi-card scenarios, the communication library must simultaneously support data-parallel gradient synchronization, expert-parallel All-to-All, and tensor-parallel All-Reduce. On domestic GPUs, this typically relies on vendor-proprietary collective communication libraries, whose performance and stability directly determine the feasibility of large-scale training. Engineering practice should focus on:
- The ability to overlap communication primitives with computation (communication hiding ratio);
- Utilization of cross-node RDMA links;
- Communication error rates and retry mechanisms over extended runtime.
From Pipeline Validation to Full-Scale Pretraining: How Far Remains
It must be clearly recognized that 400 steps of continuous training validation under a scaled-down configuration is not equivalent to full-scale pretraining. At least three hurdles exist between the two:
- Scale expansion: Scaling from 16 cards to thousands or tens of thousands of cards requires parallel strategies to expand from two dimensions to three or even four dimensions (data/tensor/pipeline/expert parallelism), with communication topology complexity growing nonlinearly;
- Long-duration stability: Hardware failures on ten-thousand-card clusters are the norm rather than the exception, requiring checkpointing, automatic fault isolation, and rapid recovery mechanisms to support weeks or even months of continuous training;
- Effective training efficiency: Leading industry practices have raised effective training efficiency (the proportion of actual training time after excluding failure and restart losses) to approximately 97%, making this a core metric for measuring cluster engineering capability.
At the same time, the overall trajectory of domestic chips on the training side warrants optimism: multiple companies have disclosed cases of completing multimodal pretraining and reinforcement learning on thousand-card clusters with accuracy aligned to international products, and the adaptation coverage of mainstream open-source large models is rapidly improving.
Practical Recommendations for Developers
- Validate the pipeline first, scale later: For any new hardware platform, training integration should begin with end-to-end validation over several hundred steps using a scaled-down model before discussing expansion;
- Establish a comprehensive observation framework: Loss curves, gradient norms, peak memory, and communication latency are all indispensable; monitoring and alerting capabilities should be built in parallel with training tasks;
- Never skip gradient checking: For newly implemented operators, numerical differentiation comparison is the lowest-cost, highest-value correctness verification method;
- Focus on operator completeness rather than peak compute: Single-card TFLOPS is only a paper metric; what truly determines training feasibility is whether key operators such as hybrid attention and MoE routing have complete forward and backward implementations.
Conclusion
Every step of validation for training trillion-parameter MoE multimodal models on domestic GPUs is, in essence, a comprehensive test of software stack maturity, communication engineering capability, and numerical stability systems. Four hundred steps of continuous training is only a starting point, but the methodology it embodies—downscaled validation, loss observation, gradient checking, and sharding management—provides a reusable engineering paradigm for the industry. As cluster scale expands and long-duration stability capabilities continue to improve, deeper breakthroughs for domestic compute in large model training are well within sight.
