Domestic GPU Enables Trillion-Parameter Multimodal Training Adaptation
This article explains how a domestic AI accelerator vendor adapted its hardware to train an open-weight, native multimodal large model with roughly 2.8 trillion parameters, a hybrid attention mechanism, MoE routing, and a 1M-token context window. It breaks down the three core pressures of trillion-parameter training—memory, communication, and numerical stability—then walks through the adaptation approach built around FSDP2 sharding, expert parallelism, and a unified forward/backward/update flow across attention, routing, vision encoding, and cross-modal projection. A 16-card, two-server test completed 400 optimizer updates without interruption, with loss and memory results included. The article also covers how to verify that the vision branch is genuinely training via non-zero gradients, four key optimizations, and reusable engineering practices for validating large-scale multimodal training pipelines.
1. Background: Three Pressures Trillion-Parameter Multimodal Models Place on Training Systems
A domestic AI accelerator vendor recently announced that it had completed training adaptation for an open-weight, native multimodal large model. The model has roughly 2.8 trillion total parameters, supports a context length of up to 1 million tokens, and uses a hybrid attention mechanism together with a Mixture-of-Experts (MoE) architecture. It also supports visual understanding and tool calling. Getting the training pipeline to run on this kind of model is difficult not simply because of the parameter count, but because three types of pressure stack on top of each other.
The first is memory pressure. Even stored in mixed precision, the combined parameters, gradients, and optimizer states of a trillion-parameter model far exceed the capacity of a single card, so a sharding mechanism is required to spread the states across devices.
The second is communication pressure. MoE expert routing introduces dynamic all-to-all communication, and joint image-text training adds cross-modal tensor synchronization on top of that. Both the volume and the pattern of communication are more irregular than in a pure language model.
The third is numerical stability pressure. Once dynamic sparse retrieval, expert routing, and visual encoding are combined, the backward path becomes longer and more branched, making numerical overflow, missing gradients, or training interruptions more likely.
The core goal of the adaptation, therefore, is not to “run a single step,” but to “run many steps continuously, stably, and verifiably.”
2. Adaptation Approach: Bringing Four Modules into a Unified Forward, Backward, and Parameter Update Flow
The adaptation centers on four modules: attention computation, dynamic routing, visual encoding, and cross-modal projection. The key principle is that all modules must enter the same forward, backward, and parameter update flow rather than each maintaining separate side logic.
- Attention computation: Hybrid attention contains a linearized branch and a sparse retrieval branch. Both operators must be differentiable in the backward pass and keep their numerical range under control.
- Dynamic routing: Expert routing produces discrete choices. The routing result must stay consistent with gradient backpropagation, avoiding the case where “an expert selected in the forward pass receives no gradient in the backward pass.”
- Visual encoding: The image branch must genuinely participate in optimization rather than serving only as data preprocessing.
- Cross-modal projection: This maps visual features into the language space and is the necessary channel for gradients to flow back from the language backbone to the vision tower.
The training scheme retains the common industry practice of native model definition and uses FSDP2 to distribute model parameters, gradients, and optimizer states across different accelerators, reducing per-card memory usage. Collective communication across cards and nodes is handled by the vendor’s in-house communication library.
The illustrative configuration logic is as follows (it expresses structure only, not a specific product interface):
# Sharding strategy: split the parameters/gradients/optimizer states trio across cardsmodel = shard_model(model,strategy="fsdp2",mesh=device_mesh, # 2D device mesh: inter-card x inter-nodeoffload_optimizer=False, # skip offload when memory is sufficient, prioritize throughput)# Bring the vision tower and projection layers into sharding and update scopefor module in [vision_tower, cross_modal_projector]:module = shard_module(module, mesh=device_mesh)# Chunked loss: split the large-vocabulary logits into chunks to reduce peak memoryloss = chunked_cross_entropy(logits, labels, chunk_size=4096)
3. Test Configuration: A “Trimmed but Complete” Structure to Verify Pipeline Correctness
The actual test used two servers with a total of 16 flagship training-and-inference compute cards. On the model side, it used a 13-layer language backbone with 16 routed experts and Top-8 routing, while keeping the full 27-layer vision tower and cross-modal projection module. The training data was an image-text question-answering dataset, with a global batch size of 16 and a sequence length of 1024.
The design intent here is clear: the language backbone was trimmed to fit the two-server scale, but the vision tower and cross-modal projection were kept complete, because these two parts are the real verification focus for “whether multimodal training is actually happening.” All 16 training processes completed 400 consecutive optimizer updates with no abnormal interruptions.
4. Interpreting the Results: What the Loss Curves and Peak Memory Show
- Training loss dropped from an average of 8.9365 over steps 21 to 70 down to 2.1802 over the final 50 steps, indicating the optimization direction was correct and the decline was sustained.
- Validation loss dropped from 6.5297 at step 100 to 4.6873 at step 400, showing that generalization was not merely overfitting on the training set.
- The sampled device peak memory was 44.80 GiB, leaving headroom within a single card’s capacity and providing room to later increase batch size or layer count.
- No numerical overflow occurred throughout, indicating that the numerical handling of hybrid attention and MoE routing is reliable.
It should be emphasized that this validation used a randomly initialized, trimmed configuration. It is not full-scale pretraining of the complete model. Its value lies in proving the functional correctness and stability of the training pipeline, not in producing usable model weights.
5. Is the Vision Branch “Really Training”? Non-Zero Gradients Are the Hardest Evidence
A common hidden failure in multimodal training is that the vision tower is treated only as data input while its parameters never actually change. The way to determine this is straightforward: check the gradients and the parameter update amounts.
# After training for several steps, check whether the vision branch gradient norm is non-zerofor name, p in model.named_parameters():if "vision" in name or "projector" in name:g = p.gradassert g is not None and g.norm().item() > 0, f"{name} did not participate in training"
The technical team found that the vision tower’s image embedding layer, first and last layers, and the cross-modal projection module all produced non-zero gradients and parameter updates, proving that the visual encoding part actually participated in the optimization process. This check should be a standard step in multimodal training acceptance.
6. Four Key Optimizations: From “Able to Run” to “Able to Scale”
- Coordinating FSDP2 with expert parallelism: The sharding dimensions and expert dimensions must be arranged jointly to avoid communication conflicts and load imbalance.
- Parameter prefetching and gradient communication scheduling: Overlap parameter loading and gradient reduction with forward and backward computation to hide communication latency.
- High-performance hybrid attention operators: Use fused implementations for the linearized branch and the sparse retrieval branch to reduce the amount of intermediate tensors written to memory.
- Chunked loss computation: Splitting the large-vocabulary projection into chunks significantly reduces peak memory. This was actually enabled in the 400-step test; the other three have also been adapted and can support larger-scale configurations.
7. Reusable Engineering Lessons
- Define acceptance criteria up front: put “N consecutive steps without interruption,” “non-zero vision branch gradients,” and “peak memory with headroom” on the acceptance checklist.
- Validate the pipeline at a small, trimmed scale first, then gradually scale up layer count and expert count, avoiding the situation where a pipeline defect is discovered only after committing large-scale resources at once.
- Overlapping communication and computation is key to the efficiency of domestic card clusters and needs to be tuned jointly with the sharding strategy.
- Training observability is indispensable: combine monitoring alerts and logging services to continuously collect loss, gradient norms, memory, and communication time.
