Training a 2.8-Trillion-Parameter Multimodal Model on Domestic AI Accelerators: An Engineering Deep Dive
As large language models scale into the trillion-parameter range with million-token context windows, training infrastructure faces unprecedented pressure. This article examines an engineering effort to adapt a flagship domestic AI training chip to train a native multimodal model with roughly 2.8 trillion parameters. Using a two-node, 16-card cluster and an FSDP2-based distributed training path, the team completed 400 consecutive stable training steps. We break down the model's architectural challenges, the distributed training design, key performance metrics, a practical method for verifying that the vision branch truly participates in gradient updates, and four deep optimizations—along with an honest assessment of what this validation does and does not prove.
Training a 2.8-Trillion-Parameter Multimodal Model on Domestic AI Accelerators: An Engineering Deep Dive
As model parameter counts reach the trillion scale and context lengths extend to the million-token range, pressure on training infrastructure is rising sharply. This is especially true for native multimodal model training, where dynamic sparse attention, expert routing, and joint image-text computation stack on top of one another, placing unprecedented demands on compute, memory management, multi-card communication, and software stack completeness. A recent adaptation effort—built on a flagship domestic AI accelerator designed for both training and inference—offers a valuable engineering reference: on a two-node, 16-card cluster, the team successfully adapted the full training pipeline for a native multimodal open-weight model with roughly 2.8 trillion total parameters and ran 400 consecutive stable training steps. This article provides a systematic technical breakdown of that effort.
1. Target Model Architecture and Training Challenges
To appreciate the difficulty of the adaptation work, it helps to first understand the target model. It is an open-weight native multimodal model with approximately 2.8 trillion parameters, supporting context lengths of up to 1 million tokens, along with visual understanding and tool-calling capabilities. Its architecture reflects several key trends in current large model evolution:
1. Hybrid attention mechanisms. The model combines a linear attention variant with gated sparse attention. The goal of this design is to control computational complexity over extremely long contexts, but the trade-off is a significant increase in operator implementation complexity—sparse retrieval means the computation graph is no longer statically dense, and operators must support dynamic indexing and irregular memory access. This directly tests the operator coverage of the underlying compute libraries.
2. Mixture-of-Experts (MoE) architecture. The model sparsifies computation through expert routing, activating only a subset of experts per forward pass. The routing logic introduces dynamic cross-card data distribution and aggregation, which can easily create communication hotspots and load imbalance in distributed training, placing high demands on the topology awareness and scheduling capabilities of the collective communication library.
3. Native multimodal structure. The vision encoder, cross-modal projection modules, and language backbone are trained jointly, meaning gradients must propagate correctly across heterogeneous subnetworks. A common hidden problem in multimodal training: the vision branch appears to participate in the forward pass, but its gradients are cut off or its parameters never actually update—resulting in “fake training.”
Taken together, adapting this class of model is not simply a matter of “getting it to run.” It must simultaneously satisfy four conditions: operator-level support for dynamic sparse computation, memory management that can handle trillion-scale parameter sharding, communication that supports cross-card expert routing, and correctness guarantees that every subnetwork genuinely participates in gradient updates.
2. Training Design: An FSDP2-Based Path on the Native Workflow
A key decision in this adaptation was not to rewrite the training framework, but to preserve the native workflow of a mainstream large model training framework and build an FSDP2 (Fully Sharded Data Parallel, second generation) training path on top of it. This approach deserves a closer look.
The core idea of FSDP2 is to shard model parameters, gradients, and optimizer states across GPUs, with each card holding only one slice of the full state and aggregating on demand during computation. Compared with traditional data parallelism—where every card stores a full replica—this “full sharding” strategy can reduce per-card memory usage by roughly an order of magnitude, which is the prerequisite for training trillion-parameter models on limited hardware.
The adaptation work centered on four core modules:
- Attention computation module: Adapting high-performance operators for the hybrid attention mechanism, ensuring numerical consistency of dynamic sparse retrieval in both forward and backward passes;
- Dynamic routing module: Integrating MoE gating and expert dispatch into a unified communication schedule to handle load fluctuations caused by uneven routing;
- Vision encoding module: Ensuring the vision tower’s forward computation and gradient propagation remain intact in the sharded environment;
- Cross-modal projection module: Connecting the image-text feature fusion path into the unified parameter update flow.
Cross-card and cross-node communication is handled by the companion collective communication library, which manages parameter shard aggregation, gradient reduction, and expert data dispatch. Notably, the team also implemented coordinated support for FSDP2 and expert parallelism (EP)—model parameters are sharded along the data-parallel dimension while expert parameters are split along the expert dimension. Stacking these two parallel strategies is a key capability for supporting larger-scale training configurations.
3. Two-Node, 16-Card Validation: Complete Data from 400 Consecutive Steps
The validation environment configuration and results are as follows. These numbers are the core evidence for evaluating adaptation quality.
Hardware and model configuration:
| Item | Configuration |
|---|---|
| Compute nodes | 2 servers, 16 accelerator cards total |
| Language backbone | 13 layers |
| Routing experts | 16 experts, Top-8 routing |
| Vision component | Full 27-layer vision tower + cross-modal projection |
| Training data | Medical image-text QA dataset |
| Global batch size | 16 |
| Sequence length | 1024 |
Training process metrics:
- All 16 training processes completed 400 consecutive optimizer updates with no numerical overflow and no abnormal interruptions;
- Training loss dropped from an average of 8.9365 (steps 21–70) to 2.1802 over the final 50 steps, showing a normal convergence trend;
- Validation loss fell from 6.5297 at step 100 to 4.6873 at step 400, consistent with the training loss trend—indicating the model was genuinely learning rather than overfitting noise;
- Peak device memory sampled at 44.80 GiB, leaving a safe margin within the per-card memory capacity.
Two engineering judgments deserve special mention here. First, the continuous, smooth decline of the loss curve is a strong signal of pipeline correctness—if the attention operators had numerical deviations, or gradient communication suffered packet loss or misalignment, the loss would typically oscillate, diverge, or stall early in training. Second, the 44.80 GiB peak indicates that FSDP2’s sharding strategy worked well: the combined footprint of parameters, gradients, optimizer states, and activations was effectively controlled, leaving headroom for longer sequences or larger batch sizes later.
4. Verifying That the Vision Branch Truly Participates in Training
The most easily overlooked aspect of multimodal training adaptation is verifying whether the vision branch genuinely participates in parameter updates. A rigorous approach is to snapshot and compare key submodule parameters before and after training, and to inspect gradient tensors. In this effort, the team confirmed that the vision tower’s image embedding layer, its first and last layers, and the cross-modal projection module all produced non-zero gradients and actual parameter updates—proving that gradients propagated correctly from the language-side loss back into the vision encoding path, and that the vision branch was substantively involved in training rather than serving merely as a pass-through channel.
This verification method is broadly applicable and worth adding to the acceptance checklist of any multimodal training effort. A simple check looks like this:
# Compare vision module parameters before and after trainingfor name, param in vision_tower.named_parameters():if param.grad is not None:grad_norm = param.grad.norm().item()print(f"{name}: grad_norm={grad_norm:.6f}")# grad_norm should be significantly greater than 0
5. Four Deep Optimizations: From “It Runs” to “It Runs Steadily, at Scale”
Beyond basic pipeline adaptation, this effort included four optimizations aimed at scaling up training:
- Coordinated FSDP2 and expert parallelism: Resolving communication conflicts when parameter sharding and expert splitting are combined—a prerequisite for supporting full-scale model training;
- Parameter prefetching and gradient communication scheduling: Overlapping parameter aggregation communication with computation to hide communication latency and improve overall training throughput;
- High-performance sparse attention operators: Custom optimizations for the hybrid attention mechanism to prevent dynamic sparse computation from becoming a performance bottleneck;
- Chunked Loss computation: Splitting loss computation into chunks to avoid the massive Logits tensor from ultra-long sequences consuming memory in one shot. This feature was enabled during the 400-step test.
In this validation, Chunked Loss was in actual use, while the other three optimizations were completed and ready to support larger-scale training configurations.
6. Understanding the Limits of This Validation
It should be stated objectively that this test used a randomly initialized, reduced configuration—13 language layers and 16 experts—rather than full-scale pretraining of the complete 2.8-trillion-parameter model. Its core value lies in validating the functional correctness and operational stability of the training pipeline: operators work, communication is reliable, memory is controlled, and gradients genuinely propagate. This is a necessary first step from “adaptation complete” toward “supporting production-grade training”; longer-duration stability and convergence at full scale remain to be verified.
Conclusion
Adapting trillion-parameter multimodal model training is fundamentally a systemic test of AI compute hardware, parallelization strategy, operator implementation, and communication scheduling working in concert. The stable 400-step run on a two-node, 16-card cluster demonstrates that domestic AI compute platforms already offer complete functional support for large-scale multimodal training pipelines. For teams evaluating training infrastructure for large models, the sharding strategy design, the vision-branch gradient verification method, and the layered optimization path from this effort all offer directly transferable lessons.
