Adapting Domestic GPUs for Trillion-Parameter MoE Multimodal Training: A Practical Verification
This article examines how to verify whether a domestic (China-based) GPU can truly support trillion-parameter MoE multimodal training—not just whether it runs, but whether it trains continuously and converges stably. Using a publicly disclosed case in which a 2.8-trillion-parameter MoE multimodal model was trained on a 2-node, 16-card setup for 400 consecutive steps under a trimmed configuration, the article explains why such models are hard to adapt, how to design trimmed-configuration verification, how to read the results (loss curves, peak memory, numerical health, and visual-branch updates), and the key engineering points behind a working distributed training pipeline. It also outlines the three hurdles that remain between a 400-step run and full-scale training, and closes with a phased acceptance checklist for teams planning large-model training on domestic accelerators.
1. The Shift in Adaptation Goals: From “Can Run” to “Can Train Continuously”
Over the past two years, the pace of adaptation between domestic AI chips and mainstream large models has clearly accelerated. Common public statements—such as “completed adaptation for a given model series,” “adapted to hundreds of mainstream large models,” or “an all-domestic cluster completed training of a major release with an effective training rate above 95%”—each illustrate, from a different angle, the breadth of adaptation and the engineering maturity of these clusters. The industry driver behind this is equally clear: research firms broadly forecast that high-end AI chip shipments in the China market will reach roughly 5 million units in 2026, up about 83% year over year, with domestic solutions (including cloud vendors’ in-house purpose-built chips) accounting for nearly 90% of the share.
For enterprise training teams, however, a more practical question than “how many models have been adapted” is this: can the accelerators in hand support the target model and keep it stably converging from launch through a complete training run? When the target shifts to a natively multimodal model with 2.8 trillion parameters on an MoE architecture, the difficulty of this question rises sharply.
Take a recent publicly disclosed validation from a domestic AI accelerator vendor as an example: on a 2-node, 16-card configuration, the vendor completed training-pipeline adaptation for a trillion-scale MoE multimodal model under a trimmed configuration and ran 400 consecutive steps. The results provided four categories of key information:
- No numerical overflow or abnormal interruption occurred at any point;
- Training loss dropped from 8.94 (mean of steps 21–70) to 2.18 (mean of the last 50 steps);
- Validation loss dropped from 6.53 to 4.69;
- Peak single-card memory reached 44.80 GiB, and parameters in the visual branch also participated in the update.
A boundary needs to be drawn here: this is a pipeline validation under a trimmed configuration, aimed at checking training functionality and loss trend, and it is not equivalent to full-scale pre-training. Public reports rarely disclose gradient and loss details at the “per-step” level for models of this magnitude, so it is better regarded as a referenceable engineering milestone. This article uses it as a sample to focus on how such validation should be done, how the results should be read, and what still needs to be filled in to move from validation to full-scale training.
2. Why Trillion-Parameter MoE Multimodal Models Are Hard to Adapt
To understand the value of validation, first look clearly at the difficulty of the adaptation target. The idea behind MoE (Mixture of Experts) is to trade parameters for capacity: the model holds a large number of expert subnetworks, but each token is routed to only a few of them, so the total parameter count can be very large while the compute per token stays relatively manageable. “Multimodal” means that data from different modalities, such as language and vision, must be jointly modeled within the same parameter space. Once these two are combined, the engineering difficulties concentrate in four areas.
1. Dynamic sparse attention: irregular compute and memory access
Compared with causal attention that uses a fixed mask, dynamic sparse attention determines its sparsity pattern at every step based on the input. This brings three consequences:
- Compute and memory access become irregular, making kernel implementation more complex;
- Randomized memory addresses are unfriendly to memory bandwidth and cache utilization;
- The sparsity pattern varies widely, making it hard to deeply tune for fixed shapes.
These irregularities ultimately translate into real losses in throughput.
2. MoE expert routing: an amplifying effect on communication
After tokens are scored by the gating network, they are dispatched to several experts distributed across different cards. When expert parallelism is used, every MoE layer involves two all-to-all communications: first dispatching tokens, then collecting results. This creates two problems:
- A higher share of communication: communication volume grows with the number of activated experts, and the more dispersed the experts, the higher the proportion of cross-card and cross-node communication. When handling trillion-scale MoE, communication overhead is often the main bottleneck on scaling efficiency.
- Load imbalance: tokens on popular experts may outnumber those on unpopular ones by several times, turning some cards into long tails while others simply wait.
3. Multimodal heterogeneity: a dual imbalance in compute graph and memory
- Vastly different compute profiles: the vision tower is compute-intensive with a small parameter count, while the language backbone has a large parameter count with relatively low per-token compute; the two differ in their operator spectra and parallelism needs.
- Uncertain memory usage: image inputs vary widely in count and resolution, so the number of visual tokens fluctuates substantially and the memory peak is hard to estimate with a fixed formula.
- Imbalanced parameter updates: most of the model’s parameters reside in the language backbone, and the gradient scale of the cross-modal projection layer differs noticeably from the language side, so learning rates and weight decay must be designed separately; otherwise one side may “fail to learn” while the other “learns too much.”
4. Numerically sensitive spots
- Dynamic sparse selection is discrete: both attention selection and expert routing depend on the ranking of continuous outputs. Once a tiny numerical deviation changes the ranking, the computed result can differ markedly.
- Mixed precision amplifies error: bf16 has only 7 mantissa bits (plus 1 implicit bit), fewer than fp16’s 10, but it offers a larger dynamic range and lower overflow risk, which is why large-model training generally uses bf16 with an fp32 master copy of the parameters. Even under bf16, operations such as softmax, gating logits, the statistics of LayerNorm/RMSNorm, and the exponentiation of routing weights can still produce large values or ill-conditioned inputs, and deserve dedicated safeguards.
3. Trading Full Scale for Verification Efficiency with a Trimmed Configuration
Full-scale trillion-parameter MoE multimodal pre-training involves large-scale clusters, massive datasets, and training cycles spanning months, which makes it unsuitable as the first step for pipeline validation. A more pragmatic approach is to run a small-scale validation under a trimmed configuration: use controllable resources to cover the structures in the real model most prone to problems, exposing issues as early as possible. Referring to the case above, this design can be understood along three dimensions.
1. What to trim: compress the language backbone, keep the vision tower
| Structure | Handling | Purpose of keeping |
|---|---|---|
| Language backbone | Truncated to 13 layers | Shorten forward and backward time |
| MoE layers | 16 routed experts per layer, Top-8 activation | Preserve the “few active” characteristic of sparse routing |
| Vision tower | All 27 layers kept | Preserve the real multimodal compute graph |
| Cross-modal projection | Fully preserved | Verify the cross-modal gradient path |
The first two items reduce compute while preserving the core characteristics of routing communication and sparse activation; the last two are deliberately not trimmed, because the vision tower and cross-modal projection are precisely the parts most easily “bypassed” in pure-text adaptation. Only when the visual branch participates in parameter updates is the multimodal pipeline genuinely validated.
2. What data to use: a visual question-answering dataset plus random initialization
The validation uses a public visual question-answering dataset and trains from random initialization rather than fine-tuning from existing weights. This is a deliberate trade-off:
- Under random initialization, the model’s initial outputs are close to meaningless, and loss starts from a high value (around 8.94); at this point the training signal is at its “cleanest” and most sensitive to operator errors and gradient misalignment.
- If fine-tuning from pre-trained weights, the loss already sits at a low level, and some operator defects may be “masked.”
- Running a small-scale baseline on the same dataset and hyperparameters on a reference platform provides a control: the loss curves can directly verify whether convergence behavior is consistent. For this reason, the control experiment is the key step that upgrades “can train” to “trains correctly.”
3. How long to run: 400 consecutive steps
400 steps do not mean training is already sufficient; first and foremost, it is a stability test:
- Every step goes through a complete forward, backward, and optimizer update;
- It continuously exposes problems in memory allocation, communication timing, and gradient accumulation;
- Occasional communication timeouts, intermittent numerical overflows, or long-tail slowdowns can only be observed across continuous multi-step runs.
Put differently, the first step tests “can it train,” and the 400th step tests “is it stable.”
4. Reading the Results: Four Key Signals
The publicly disclosed figures are not numerous, but each one points to a specific facet of adaptation quality.
Loss curve: judging whether it is genuinely “learning”
- Training loss dropping from about 8.94 to 2.18 indicates the direction of parameter updates is correct.
- Validation loss dropping in step from 6.53 to 4.69 indicates the gains are not merely a fit to the training samples.
- The gap between the two (validation loss minus training loss, about 2.51) can also serve as a rough monitoring metric: when the gap keeps widening, it may mean the number of training steps has exceeded the reasonable range for this configuration, and continuing to “rack up steps” is pointless.
Two often-overlooked details also deserve attention:
- Statistical convention: the starting value uses the mean of steps 21–70 and the final value uses the mean of the last 50 steps, which itself reflects consideration for optimizer warmup. Adam-family optimizers make relatively large step adjustments early on based on first- and second-moment estimates of the gradient, and single-step loss fluctuates heavily. Comparing step 1 directly against the last step could distort the conclusion.
- Validation cadence: validation loss was able to drop to 4.69 only because validation-set evaluation was performed at regular intervals during training. This suggests that pipeline validation should build validation evaluation into the routine process, rather than only running the training itself.
Peak memory: judging whether it can “scale up”
The 44.80 GiB peak needs to be read in the context of hardware memory capacity:
- If the card has around 64 GiB of memory, headroom is roughly 30%, leaving limited room to expand;
- If the card has around 80 GiB, there is still headroom to take on more data and parameters.
In either case, the “peak headroom” should be used as the starting point for estimating full-scale memory needs, with a safety margin reserved.
Numerical health: judging whether it is “trustworthy”
“No numerical overflow” carries at least three layers of meaning:
- Loss and logits did not become inf/nan;
- Safeguards such as gradient clipping were not continuously triggered;
- After backpropagation, the gradient norm on each shard stayed within a reasonable magnitude.
Visual branch participating in updates: judging whether it is truly “multimodal”
This check is often overlooked: if the gradients of the cross-modal projection or the vision tower stay near zero for a long time and the parameters never change, it means the modality-fusion path was not truly connected and the multimodal training is only nominal. In practice, one can compute norm statistics separately for the vision-tower parameters and the language-backbone parameters to confirm that both sides are changing continuously.
5. Engineering Implementation Details
What this adaptation truly connected was a distributed training pipeline. Its engineering points are also valuable to other domestic hardware platforms.
1. Combining parallelism strategies
A trillion-parameter model cannot fit on a single card, so multiple forms of parallelism must be combined:
- Data parallelism: under data parallelism with full sharding of parameters, gradients, and optimizer states (FSDP, for example), each card holds only a portion of the parameters and states, completing computation via pre-forward parameter gathering and gradient reduction during backpropagation, which substantially lowers static per-card memory usage.
- Expert parallelism: MoE experts are distributed across card groups, which naturally complements data parallelism.
- Tensor/pipeline parallelism: compute-intensive structures such as the vision tower can be introduced as needed.
The key principle in choosing is to keep communication within the high-bandwidth domain (such as intra-node interconnect) as much as possible, and to place low-frequency cross-node communication (such as gradient reduction) on the lower-bandwidth layer.
2. Collective communication and communication hiding
- Parameter gathering after sharding, gradient reduction, and all-to-all all rely on the collective communication library, so it is necessary to confirm that its supported collective primitives, data types, and multi-node topology awareness integrate well with the training framework.
- Frameworks typically launch communication asynchronously in the order in which computation becomes ready during backpropagation, overlapping it with computation. On domestic hardware, one must verify that the pipeline and event synchronization are correct; otherwise “compute finishes and waits for communication” idling may occur, directly lowering effective throughput.
- Gradient accumulation reduces the frequency of parameter updates, but it does not reduce the parameter gathering required for each forward step. For sharded data parallelism, what it mainly reduces is the number of gradient reductions and optimizer updates; and gradient reduction itself is often already overlapped with backward computation. Therefore, “the larger the accumulation steps, the more communication is saved” is only partly true.
3. Memory budget management
Memory usage can be roughly broken into five parts:
- Parameter shards;
- Gradient shards;
- Optimizer state shards (for Adam-family optimizers, typically the fp32 first and second moments plus a master copy of the weights);
- Activations;
- Communication buffers and temporary tensors.
Optimization strategies include:
- Activation recomputation (activation checkpointing);
- Offloading optimizer states to host memory;
- Using tensor parallelism for the vision tower, which has long sequences and a small parameter count, to spread out activation memory.
At the same time, one should monitor the difference between the allocator’s reserved memory and peak memory to prevent fragmentation from causing an apparent-but-false case of “seemingly enough headroom, actually OOM.”
4. Aligning operator implementations item by item
The difficulty in training adaptation often lies not in “being able to compute a result,” but in “forward and gradients being fully consistent.” Building a reusable alignment test for each new operator is an effective way to control regression risk. The example below omits imports and data preparation code, and the naming is illustrative only:
def test_custom_op_grad_alignment(op_ref, op_ours, atol, rtol):"""Gradient alignment check between reference and custom operators:- Use the reference implementation as the baseline with random tensors as input- Compare the forward output, plus the input and parameter gradients after backprop- Record max absolute error and max relative error separately"""# Random input with a fixed seed for reproducibilityx = torch.randn(4, 256, 512)w = torch.randn(512, 512, requires_grad=True)x_ours = x.detach().clone().requires_grad_(True)w_ours = w.detach().clone().requires_grad_(True)# Use the same random gradient as the starting point for backpropgrad_out = torch.randn(4, 256, 512)# Forward: compare output valuesy_ref = op_ref(x, w)y_ours = op_ours(x_ours, w_ours)assert torch.allclose(y_ref, y_ours, atol=atol, rtol=rtol)# Backward: compare input gradients and parameter gradientsy_ref.backward(grad_out)y_ours.backward(grad_out)assert torch.allclose(x_ours.grad, x.grad, atol=atol, rtol=rtol)assert torch.allclose(w_ours.grad, w.grad, atol=atol, rtol=rtol)
The sources of reference implementations for each spot can differ:
- Mathematically equivalent substitution: for example, the relationship between efficient attention and naive attention. Here one should accept a limited error, and set a reasonable tolerance based on the upper bound of rounding error for the four basic IEEE 754 operations (0.5 ulp, i.e., half the gap between two adjacent representable floating-point numbers).
- Single-card versus distributed versions of the same operator: here there should be no difference, so near element-wise strict comparison should be applied.
5. Anomaly monitoring of training steps
The example below uses a typical training loop to illustrate gradient health checks and safe step updates. The code omits imports and data loading, and the naming and style are illustrative only:
# A typical training loop illustrating gradient health checks and safe step updates# (not tied to a specific framework's API)for step, (images, texts, labels) in enumerate(dataloader, start=1):# Forward: multimodal inputs pass through the vision tower and cross-modal# projection before entering the MoE language backbonelogits = model(images, texts)loss = criterion(logits, labels)# Backward: FSDP-sharded parameters complete gradient reduction hereloss.backward()# 1) Gradient health check: clip the global norm first, then check for inf/nangrad_norm = clip_grad_norm_(model.parameters(), max_norm=1.0)if not torch.isfinite(grad_norm):logger.warning({"step": step, "grad_norm": str(grad_norm)})optimizer.zero_grad(set_to_none=True)continue # Skip this update to avoid polluting optimizer state# 2) Run the optimizer step under the safety conditionoptimizer.step()optimizer.zero_grad(set_to_none=True)# 3) Log training metrics: smooth single-step fluctuation with a window meanmetrics = {"step": step, "loss_window": float(loss.detach())}train_logger.log(metrics)
Three accompanying practices apply:
- Gradient checks should run through every step, not just at the end.
- If the model has no tied weights, it is generally inadvisable to clip uniformly with the whole
model.parameters(); instead, handle parameters by group. - A single skipped update is acceptable, but non-finite gradients appearing across several consecutive steps must trigger immediate root-cause investigation.
MoE models should also separately monitor the load distribution across experts and the routing entropy: persistent imbalance can worsen long-tail waiting and leave experts underutilized.
6. From 400 Steps to Full Scale: Three Remaining Hurdles
1. Scaling efficiency
Trimmed validation is completed on a small-scale configuration, and passing it does not mean training remains efficient when scaled to hundreds or even thousands of cards. Scaling efficiency can be measured with two categories of metrics:
- Strong scaling efficiency = (small-scale time ÷ target-scale time) ÷ scaling factor;
- Weak scaling efficiency = (single-card throughput × number of cards) ÷ measured cluster throughput.
As the cluster grows, the number of hops and latency of collective communication rise, and load imbalance is further amplified. Network topology (differences in intra-node and inter-node bandwidth) and the ability to overlap communication with computation often become the deciding factors for scaling efficiency.
2. Long-run stability
400 steps typically correspond to a runtime on the order of minutes to hours, whereas full pre-training is often measured in weeks or even months. Long-running exposes problems that short-cycle validation cannot cover:
- Gradual memory growth or accumulated fragmentation;
- Individual nodes downclocking or link bit errors;
- The consistency of checkpoint writes and recovery.
A mature cluster needs capabilities such as fault detection and isolation, elastic fault tolerance, and automatic resumption of training.
3. Reproducibility balanced with performance
Only by fixing the random seed, the data-loading order, and the communication reduction order can one compare bit-for-bit across different platforms, which is especially important for operator-level debugging. But enforcing determinism often sacrifices some performance, so it is usually enabled only in small-scale training for reproducing problems, while large-scale training is configured for performance first.
7. Acceptance Checklist for Domestic GPU Training Adaptation
For teams preparing to run large-model training on domestic accelerators, the following checklist can serve as a reference, advancing acceptance stage by stage:
| Stage | Core question | Key checks | Pass criteria |
|---|---|---|---|
| Operator level | Is a single operator computed correctly | Forward numerical comparison, gradient comparison, bf16/fp32 error analysis | Error within the set tolerance |
| Single-card level | Can a single card train | Forward/backward time, peak memory and headroom | Continuous iteration possible with memory headroom |
| Small-scale pipeline | Can the full pipeline train | Trimmed model, control experiment, loss curve, gradient health, visual-branch parameter changes | Loss trend consistent with the reference platform, no overflow or interruption |
| Mid-scale cluster | Can it scale | Scaling efficiency, communication ratio, expert load balance | Efficiency meets business requirements |
| Full-scale long-run | Can it train for long | Effective training rate, fault recovery time, checkpoint consistency | Meets training-cycle and fault-tolerance requirements |
Trimmed-configuration validation addresses the third layer, an indispensable but far-from-sufficient step on the way to large-scale training.
8. Conclusion
That a domestic GPU completed training-pipeline validation for a trillion-scale MoE multimodal model matters not for any single performance number, but because the methodology of “training-side adaptation” is becoming measurable: control cost with a trimmed configuration, guarantee correctness with a control experiment, judge pipeline quality with the loss curve, peak memory, and gradient health, then gradually scale up to large clusters.
For adopters, the value of this kind of validation is lowering the trial-and-error cost of selection: a reproducible, comparable engineering milestone is far more useful for decision-making than a vague claim of “supporting a given model.” For the hardware and software ecosystem, it is likewise a starting point. Moving from trimmed validation to full-scale pre-training still means clearing, in order, three hurdles—cluster-scale expansion, long-run stability, and reproducibility; only after completing all three can one say a training pipeline has truly “run through.”
