Training a Trillion-Parameter Multimodal MoE Model on Domestic AI Accelerators: A Two-Node, 16-Card Case Study
This article reviews a reduced-scale training validation of a trillion-parameter multimodal Mixture-of-Experts (MoE) model on two servers with 16 AI accelerator cards. It covers the model components the adaptation must support, the FSDP2-based training design, the test configuration and results, and a checklist of optimizations. It also explains why a falling total loss alone does not confirm that multimodal training is working.
1. Background: Why Trillion-Parameter Multimodal MoE Models Are a New Challenge for Training Systems
Open-weight large multimodal models keep pushing parameter counts higher. These models usually share three traits. First, they reach trillion-level total parameters. A Mixture-of-Experts (MoE) architecture activates only a subset of experts for each token during inference and training, which balances large capacity with sparse computation. Second, they use hybrid attention, such as a design that combines dynamic sparse retrieval with gated sparse attention. This supports ultra-long contexts, on the order of one million tokens, while keeping attention costs under control. Third, they have full visual understanding and tool-calling capabilities. Besides the language backbone, they must maintain a separate vision tower and cross-modal projection modules.
Together, these traits place far greater demands on training infrastructure than dense language models do:
- Compute: Dynamic sparse retrieval and expert routing introduce many irregular gather/scatter operations and conditional computations. GPUs cannot pipeline these as efficiently as dense matrix operations.
- Memory: Under traditional data parallelism, each device holds a full copy of the parameters, gradients, and optimizer states. At the trillion-parameter scale, a single device cannot hold this.
- Communication: Expert routing moves tokens dynamically across devices through All-to-All communication. This adds to the gradient synchronization All-Reduce, which makes communication patterns more complex and places strict demands on the stability and performance of the collective communication library.
A Chinese GPU vendor recently published a reduced-scale training validation of this type of model on a two-node, 16-card configuration. The system completed 400 consecutive optimizer updates without numerical overflow or unexpected interruptions. The vision branch also produced actual gradient updates. This was a small-scale functional validation, not full pretraining. However, it exercised every key step of the adaptation work, so it is a useful reference. The sections below cover the architecture breakdown, the adaptation approach, the training configuration, the validation results, and an optimization checklist.
2. Target Model Architecture: Four Module Groups the Adaptation Must Cover
Based on public information, the model has about 2.8 trillion parameters and supports up to 1 million tokens of context. Its core components include:
- KDA and Gated DSA hybrid attention: Combines dynamic sparse retrieval with gated sparse attention to reduce attention complexity over long sequences.
- MoE layers: The routing layer selects the top-K experts for each token from an expert pool. In this test, the selection was Top-8 out of 16 experts. The forward pass involves distributing tokens to experts and aggregating their outputs.
- Vision tower and cross-modal projection: A multi-layer vision encoder converts images into embedding vectors. A projection layer aligns these embeddings with the language space for joint image-text understanding.
- Joint image-text training objective: The loss calculation must cover both the text and vision paths. Cross-entropy computation over long sequences is itself a memory bottleneck.
Accordingly, the adaptation work was organized into four areas: attention operator replacement, dynamic routing integration, vision encoder integration, and cross-modal projection integration. All modules must be included in the full automatic differentiation pipeline, covering the forward pass, backward pass, and parameter updates. This matters a great deal. An adaptation is not complete just because inference runs. The backward graph must be built correctly, and gradients must flow back to the vision branch. Otherwise, joint image-text training exists in name only.
3. Training Design: FSDP2, Unified Communication, and a Native Training Framework
3.1 Keeping the Native Training Workflow to Reduce Adaptation Cost
The solution keeps the native workflow of a mainstream large-model training framework instead of building a custom trainer. This is the sound engineering path. The native framework’s checkpoint management, learning rate scheduling, data loading, and gradient accumulation have already been thoroughly validated. The adaptation work can therefore focus on the operator layer and the parallelism strategy layer. This avoids reinventing those components and introducing new instability.
3.2 FSDP2: Fully Sharded Data Parallelism to Relieve Memory Pressure
The solution uses FSDP2, which is fully sharded data parallelism built on DTensor. It distributes parameters, gradients, and optimizer states across GPUs:
- Parameter sharding: Each device holds only one shard of the global parameters. During the forward and backward passes, shards are gathered on demand through All-Gather and released immediately after use.
- Gradient sharding: After the backward pass, gradients are reduced into shards through Reduce-Scatter. Full global gradients never reside in device memory.
- Optimizer state sharding: The first and second moments of Adam-style optimizers are also stored in shards.
For a trillion-parameter model, sharding all three reduces per-device memory to roughly 1/N, where N is the parallelism degree. This is what allows a small cluster to hold a model of this size. In this test, peak memory was about 44.8 GiB per device, which is a reasonable operating range for mainstream data center accelerators.
3.3 MCCL for Cross-Device and Cross-Node Communication
The vendor’s in-house collective communication library, MCCL, handles cross-device communication. It must support FSDP2’s All-Gather and Reduce-Scatter operations as well as the All-to-All operations triggered by expert routing. In a two-node setup, traffic also crosses the network interface, so scheduling quality directly determines training throughput. This leads to the prefetching and scheduling optimizations discussed in Section 5.
4. Test Configuration and Validation Results
4.1 Reduced Configuration
The validation used a randomly initialized, reduced model:
- The language backbone has 13 layers and 16 routed experts (Top-8 routing). The full 27-layer vision tower and cross-modal projection modules were kept.
- Hardware: two servers with 16 AI accelerator cards in total.
- Dataset: an image-text question-answering dataset, with a global batch size of 16 and a sequence length of 1024.
Reducing the layer and expert counts keeps all heterogeneous components: attention, routing, and visual projection. The validation of the training pipeline’s functional correctness is therefore thorough. Memory and compute requirements also stay manageable, which allows fast iteration with limited resources.
4.2 Training Results
- Loss convergence: Training loss fell from an average of about 8.94 over steps 21 to 70 to about 2.18 over the final 50 steps. Validation loss dropped from about 6.53 at step 100 to about 4.69 at step 400. The curves were smooth, with no abrupt jumps.
- Stability: The 16 training processes completed 400 consecutive optimizer updates. No NaN or Inf values appeared, and there were no unexpected interruptions.
- Active vision branch: The team checked the vision tower’s image embe
