Adapting a 2.8T-Parameter Multimodal MoE Model for Training on Domestic AI Accelerators
This article examines the recent adaptation of a 2.8-trillion-parameter multimodal Mixture-of-Experts (MoE) model for training on domestic AI accelerators. We break down the key technical challenges — from complex attention mechanisms and dynamic routing to cross-modal gradient flow — and detail the four primary optimization strategies that enabled 400 consecutive training steps on a 16-card cluster with stable loss convergence and verified vision-branch updates. This case demonstrates a practical methodology for moving from inference-only support to full-scale training readiness on non-GPU hardware stacks.
1. Background: Why This Adaptation Matters
A domestic AI accelerator vendor recently announced that its flagship training-and-inference card, along with its software stack, has successfully adapted a natively multimodal model with approximately 2.8 trillion parameters for training. In a dual-server, 16-card environment, the system completed 400 consecutive training steps without numerical overflow or abnormal interruption, and the vision branch achieved genuine gradient updates.
To understand the significance, it helps to examine the complexity of the adapted model:
- Massive parameter scale: Approximately 2.8 trillion total parameters using a MoE (Mixture of Experts) architecture. Only a subset of experts is activated per forward pass, placing extreme demands on memory and scheduling.
- Complex attention mechanisms: The model employs KDA (Key-Value Decomposed Attention) mixed with Gated DSA (Dynamic Sparse Attention), involving dynamic sparse retrieval that standard Transformer attention cannot directly cover.
- Natively multimodal: Includes a full vision encoding tower and cross-modal projection modules. Joint image-text training means gradients must flow through both language and vision branches simultaneously.
- Extreme context length: Supports up to 1 million tokens of context, which severely tests memory management and operator efficiency.
For domestic chips, the ability to run training — not just inference — on such models is a critical milestone. Inference only requires forward-pass operators, whereas training demands numerically correct forward, backward, and parameter-update paths, efficient communication, and long-duration stability.
2. Core Adaptation Work: Integrating Four Modules into a Unified Training Pipeline
The adaptation centered on four compute-intensive modules: attention computation, dynamic routing, vision encoding, and cross-modal projection. The goal was not merely to “compute,” but to integrate these modules into a unified forward, backward, and parameter-update workflow. Specific challenges included:
- Backward graph completeness: Custom operators for mixed attention and dynamic sparse retrieval must provide correct gradient implementations. Any missing gradient silently halts upstream parameter updates.
- Differentiability of expert routing: Top-K routing relies on gating scores, and routing weights must participate in gradient computation. Meanwhile, load imbalance across experts can cause memory overflows on some cards, requiring coordinated parallelism strategies.
- Cross-modal gradient propagation: The vision tower cannot merely function as a “frozen” feature extractor; its gradients must be verified to flow back and parameters must actually update.
The training approach preserved the model’s native construction pipeline. Using a fully sharded data parallel strategy (FSDP2-style), model parameters, gradients, and optimizer states were partitioned across GPUs/accelerators, substantially reducing per-card memory pressure. Inter-card and inter-node communication was handled by the underlying communication library, abstracting away hardware differences.
3. Test Configuration and Results: What 400 Consecutive Steps Demonstrate
The test used two servers with 16 accelerator cards in total. To keep validation costs manageable, a trimmed model configuration was used:
- Language backbone: 13 layers, 16 routed experts, Top-8 routing
- Full 27-layer vision tower and cross-modal projection modules retained
- Training data: image-text QA dataset, global batch size of 16, sequence length of 1024
Key results:
| Metric | Value |
|---|---|
| Consecutive optimizer updates | 400 steps, no interruption |
| Training loss (steps 21–70 average) | 8.9365 |
| Training loss (last 50 steps average) | 2.1802 |
| Validation loss (step 100 → step 400) | 6.5297 → 4.6873 |
| Peak memory per card | 44.80 GiB |
The steady, monotonic decrease in loss indicates that the entire training pipeline is numerically correct. If silent gradient errors existed (e.g., zero gradients at some layer or stalled optimizer states), the loss would typically plateau or oscillate from the start.
The vision branch validation deserves special attention. The engineering team performed layer-by-layer inspection and found that the vision tower’s image embeddings, first/last layers, and the cross-modal projection module all produced non-zero gradients and parameter updates. This proves the vision encoding portion is genuinely “learning,” rather than merely serving as a data pipeline. The validation method can be generalized as practice:
# Check gradients and parameter changes in key modules after several training stepsfor name, p in model.named_parameters():if "vision" in name or "proj" in name:assert p.grad is not None and p.grad.abs().sum() > 0assert param_diff(name) > 0 # parameter updated relative to initialization
It is worth emphasizing that this validation used a randomly initialized, trimmed configuration. The goal was to verify functional correctness and stability of the training pipeline, not to perform full-scale pretraining. This is a pragmatic engineering strategy: first validate the “pathway” with a small configuration, then scale up to full size.
4. Four Key Optimizations for Larger-Scale Training
Beyond the foundational adaptation, the team completed four optimizations aimed at scalability:
- FSDP2 and expert parallelism co-design: Parameter sharding along the data dimension and parallelism along the expert dimension require coordinated partitioning strategies to avoid duplicate sharding of the same parameters or redundant communication.
- Parameter prefetching and gradient communication scheduling: Leverage overlapping windows between computation and communication by prefetching sharded parameters for upcoming forward passes while scheduling gradient synchronization to hide communication latency.
- High-performance KDA operators: Customized low-level operators for the hybrid attention mechanism to improve computational efficiency in sparse retrieval scenarios.
- Chunked Loss computation: Loss over the large vocabulary is computed in chunks to prevent the logits matrix from consuming excessive memory at once. This was already enabled during the 400-step test.
Together, these four optimizations aim to enable smooth scaling from the 16-card validation configuration to more nodes, more experts, and longer sequences.
5. Conclusion
This adaptation demonstrates a reusable methodology for large-model training adaptation: first validate pipeline functional correctness with a trimmed configuration (gradient propagation, loss convergence, memory control), then progressively address communication scheduling, operator performance, and parallel co-design, ultimately enabling full-scale training. For the domestic compute ecosystem, moving from “inference-capable” to “stably training trillion-parameter multimodal MoE models” marks a significant step in software-hardware stack maturity and lays a solid engineering foundation for even larger training efforts ahead.
