Trillion-Parameter Multimodal MoE Training on a Domestic GPU Cluster: A 16-Card, 400-Step Engineering Validation
This article reviews an engineering validation in which a roughly 2.8-trillion-parameter multimodal MoE model was adapted to run on a domestic flagship AI training-and-inference accelerator card and its supporting software stack. It covers the main technical challenges, the native FSDP2-based training design, four key optimizations, the 16-card 400-step test configuration and results, and the gradient-based check used to confirm that the vision branch actually participated in training. Readers gain a practical methodology for validating large-model training on a new hardware platform while keeping the scope clearly limited to functional correctness and stability rather than full-scale pretraining.
Training Adaptation of a Trillion-Parameter Multimodal Model on a Domestic Computing Platform: A 400-Step Continuous Training Practice with Two Servers and 16 Cards
1. Background: New Hardware Challenges from Very Large Model Training
As large-model technology evolves rapidly, model architectures are moving from text-only models toward composite architectures that combine native multimodality with mixture-of-experts (MoE). Recently, a class of open-weight multimodal models has emerged with about 2.8 trillion total parameters and support for contexts up to 1 million tokens. Their technical characteristics include:
- Hybrid attention mechanisms: combining a linear attention variant with gated sparse attention to balance computational efficiency and context modeling in long-sequence scenarios;
- MoE architecture: using dynamic expert routing so that only part of the parameters are activated in each forward pass, expanding model capacity while controlling computation;
- Native multimodal capability: supporting both visual understanding and tool calling, with image-text data jointly participating in forward and backward propagation during training.
These models impose requirements far beyond those of conventional dense models: dynamic sparse retrieval and expert routing introduce irregular computation graphs and dense cross-card communication; joint image-text training requires the vision encoder, cross-modal projection layer, and language backbone to be updated together in one training flow; and ultra-long contexts further increase memory pressure. Therefore, validating whether an AI accelerator card and its software stack can support training for such models is an important measure of engineering maturity.
This article is based on a publicly described engineering validation case. It reviews the technical process of completing training adaptation for the above trillion-parameter model on a domestic flagship AI training-and-inference accelerator card and its supporting software stack, and running continuously and stably for 400 steps.
2. Core Technical Challenges in Adaptation
2.1 Diversity of Attention Computation
The model’s attention is not standard multi-head attention. It combines linear attention and gated sparse attention. The former requires dedicated high-performance operator support, while the latter involves dynamic sparse retrieval, and its computation path changes with the input. Adaptation work must provide high-performance implementations for both types of computation and ensure numerical correctness during backpropagation.
2.2 Dynamic Expert Routing
The router in the MoE layer dynamically selects experts based on the input, which causes uneven computational load across cards and makes AllToAll communication patterns complex. If the partitioning strategy for expert parallelism and data parallelism is not designed properly, communication bottlenecks or load imbalance can easily occur.
2.3 Cross-Modal Joint Training
The output of the vision tower must pass through the cross-modal projection module and then enter the language model. The entire path must form a closed loop within a unified forward pass, backward pass, and parameter update flow. A common hidden problem is that although the vision branch is “connected” in the data flow, it does not actually participate in training because gradients are frozen or the computation graph is broken. Such issues must be verified through gradient checks rather than by observing loss decrease alone.
3. Training Design: A Multimodal Training Path Based on Native FSDP2
3.1 Retaining the Native Training Flow
The key decision in the adaptation scheme was to retain the mainstream training framework’s native AutoModel flow rather than rewriting a private training logic. The benefit is that model definition, data processing, and the training loop remain consistent with the upstream ecosystem. Future model upgrades or configuration changes do not require repeated adaptation, keeping maintenance cost low.
3.2 FSDP2 Fully Sharded Data Parallel
To address the memory pressure caused by trillion-level parameters, the scheme uses FSDP2 (second-generation Fully Sharded Data Parallel) to distribute model parameters, gradients, and optimizer states across different GPUs. Each card holds only one shard of the full state and aggregates it on demand during forward and backward computation. This mechanism reduces per-card memory usage from “holding the entire model” to “holding 1/N of the model,” which is the prerequisite for running the trimmed model training on two servers with 16 cards.
3.3 Cross-Card Communication
Cross-card and cross-node communication is handled by the supporting collective communication library, covering parameter aggregation, gradient reduction, and AllToAll expert exchange in the MoE layer. Deep coordination between the communication library and the software stack is key to ensuring multi-node training efficiency.
4. Key Optimizations
In addition to basic path adaptation, the engineering team completed four advanced optimizations:
- Coordination between FSDP2 and expert parallelism: combining parameter sharding and expert partitioning orthogonally to avoid redundant communication when the two are stacked;
- Parameter prefetching and gradient communication scheduling: overlapping computation and communication to hide AllGather and ReduceScatter latency;
- High-performance linear attention operators: providing dedicated kernel implementations for the linear part of hybrid attention to avoid naive token-by-token loop computation;
- Chunk Loss computation: splitting loss computation into chunks to avoid expanding a huge logits tensor across the vocabulary dimension at once, significantly reducing peak memory.
In the 400-step test, Chunk Loss was actually enabled, and the other three items were also adapted and can support larger-scale training configurations.
5. Test Configuration and Result Analysis
5.1 Test Environment
The test used two servers with 16 accelerator cards in total. To complete validation on limited hardware, the model used a trimmed configuration: a 13-layer language backbone and 16 routed experts (Top-8 routing), while fully retaining the 27-layer vision tower and cross-modal projection module to ensure the multimodal path was realistic. The training data was a medical visual question answering image-text dataset, with a global batch size of 16 and a sequence length of 1024.
5.2 Training Stability
All 16 training processes completed 400 consecutive optimizer updates without numerical overflow or abnormal interruptions. Training loss decreased from an average of 8.9365 over steps 21–70 to 2.1802 over the last 50 steps; validation loss decreased from 6.5297 at step 100 to 4.6873 at step 400. The smooth downward trend of the loss curve indicates that optimizer states, gradient synchronization, and the mixed-precision strategy were all working properly. The device-sampled peak memory was 44.80 GiB, within the safe range of a single card’s capacity.
5.3 Strict Verification of Vision Branch Participation
This is the most instructive part of the validation. The technical team checked the image embedding layer, first and last layer parameters of the vision tower, and the cross-modal projection module one by one, confirming that these parameters produced non-zero gradients and underwent actual updates. This proved that the vision encoding part truly participated in training rather than merely passing data through without updating.
For multimodal training engineering, this check should become a standard action. A recommended verification method is to compare parameter snapshots before and after several training steps, or directly assert after backpropagation that the gradient norm of key parameters is greater than zero:
# Illustrative check: confirm that the vision branch has non-zero gradientsfor name, param in model.named_parameters():if "vision_tower" in name or "cross_modal_proj" in name:assert param.grad is not Noneassert param.grad.norm().item() > 0, f"{name} did not participate in training"
6. Conclusions and Implications
It should be noted objectively that this validation used a randomly initialized trimmed configuration. Its purpose was to validate the functional correctness and stability of the training path, not full-scale pretraining of the complete model. From an engineering perspective, however, its value is still clear:
- It demonstrates that a domestic AI accelerator card and its software stack can support training of trillion-parameter multimodal MoE models;
- It validates the feasibility of key technology combinations such as FSDP2 + expert parallelism + communication scheduling in a real multi-node environment;
- It establishes a reusable adaptation methodology: retain the native training flow, adapt operators module by module, and use gradient checks to confirm that each branch truly participates in training.
For teams planning to migrate large-model training to a new hardware platform, the recommended path is to “validate the training path with a small configuration, then gradually scale up,” prioritizing numerical correctness and multimodal branch completeness before investing compute in long-duration training. This step-by-step engineering strategy can avoid systemic risks in large-scale training at the lowest cost.
