Trillion-Parameter MoE Multimodal Training on Domestic GPUs: An Engineering Adaptation and Validation Guide

    This article uses a recent 400-step validation run on a domestic GPU to explain the core challenges, verification methods, and deployment considerations for adapting trillion-parameter MoE multimodal models to domestic compute. It covers why sparse MoE architectures, native multimodal training, and hybrid attention are among the hardest workloads to port, then breaks down a trimmed-configuration validation strategy, the five engineering layers from operators to clusters, and the remaining hurdles between a trimmed run and full-scale training. Developers will find a concrete engineering reference point, a recommended validation methodology, and practical guidance for embedding adaptation checks into a standard training workflow.

    1. Introduction: Trillion-Parameter Multimodal Training as a Litmus Test for Domestic Compute

    On November 17, a domestic GPU vendor announced that its lab had completed validation of the training pipeline for a trillion-parameter native multimodal MoE model built by a domestic team. The validation ran on a dual-node, 16-card configuration: the model trained for 400 consecutive steps with no numerical overflow or abnormal interruptions. The vendor also disclosed details such as the loss curve, gradient checks, and memory usage. Publicly available information indicates the model has roughly 2.8 trillion total parameters and uses a native multimodal MoE architecture.

    Across the broader industry, the pace of adapting domestic AI chips to mainstream large models has clearly accelerated:

    • One vendor used a thousand-card cluster to support multiple large-model companies in completing multimodal pretraining and reinforcement learning;
    • Another has continued adapting mainstream open-source model families for training and is extending toward larger clusters;
    • One vendor disclosed that an all-domestic cluster achieved a high effective training rate in training an important model version;
    • Another claimed its accelerator cards had adapted to hundreds of mainstream large models, with coverage above 90%.

    Industry research forecasts point the same way: high-end AI chip shipments in the China market are expected to reach roughly 5 million units in 2026, up about 83% year over year. Domestic solutions, including self-developed ASICs from cloud providers, hold a share approaching 90%.

    What makes this validation worth attention is not simply that it ran, but its level of detail. Most public disclosures stop at outcome-level metrics such as “adaptation completed,” “thousand-card scale,” or “effective training rate.” For an object like a “2.8-trillion-parameter MoE multimodal model,” it remains uncommon to separately disclose consecutive step counts, loss trends, and gradient-check details.

    For developers, this provides an engineering milestone that can be referenced directly. But a boundary must be drawn first: this test used a trimmed configuration whose goal was to check training functionality and loss trends. It is not equivalent to a full-scale pretraining run. This article does not evaluate the merits of any specific product; instead, it uses this case to systematically lay out the core difficulties, verification methods, and deployment points for adapting trillion-parameter MoE multimodal models for training on domestic compute.

    2. Why “Trillion MoE + Native Multimodal” Is One of the Hardest Targets to Adapt

    2.1 Sparse Architecture: Systematic Challenges from Decoupling Parameter Count and Compute

    Mixture of Experts (MoE) uses a gating network to select a small number of experts to participate in computation for each token, decoupling the model’s total parameter count from the number of parameters activated per token. The parameter scale can expand to the trillion level, while the compute for a single forward pass depends only on the number of activated experts. This “large capacity, small activation” property makes memory a resource that hits its ceiling before compute, and it creates three classes of problems:

    1. Expert load imbalance: Popular experts get selected by large numbers of tokens while cold experts go under-trained. In practice this typically calls for a load-balancing loss, a capacity factor (the upper limit of tokens an expert can receive), and a token-dropping strategy. The resulting indexing, masking, and truncation logic require hardware operators such as gather/scatter, sorting, and grouped matrix multiplication to be not only functionally correct but also numerically consistent during gradient backpropagation.
    2. Cross-card token routing: When experts are partitioned across accelerator cards, the gating results must be distributed and collected via All-to-All collective communication. Communication volume grows with the degree of expert parallelism and is highly sensitive to network topology.
    3. Long-tail gradient distribution: Skew in expert usage translates into skew in gradient norms. If a single global gradient norm is used for clipping, the gradients of high-frequency experts can easily mask anomalies in individual long-tail parameters.

    2.2 Native Multimodal: Combined Memory and Gradient Pressure from Joint Training

    “Native multimodal” means the model is trained jointly on multimodal data from the pretraining stage onward, rather than bolting a visual adapter onto a language model. The typical structure is: a vision encoder splits images into patches and encodes them into visual tokens, a cross-modal projection layer aligns them to the language space, and they are then fed into the language backbone together with text tokens.

    This structure imposes three constraints on the training pipeline:

    • The vision tower must participate in parameter updates and endure gradients that differ substantially in scale from the language backbone;
    • Interleaved image-text data with its variable-length, heterogeneous nature places high demands on the data pipeline and on variable-length packing capability;
    • The vision forward pass is often the main source of peak memory and determines the batch size a single card can hold.

    2.3 Hybrid Attention: A Test of Operator Implementation and Memory-Access Patterns

    Hybrid attention means combining multiple attention forms across different layers or modules of the same model—for example, sliding-window local attention, sparse attention, and global attention—to balance long-context modeling capability against compute cost. From an engineering perspective, it has two special requirements:

    • Irregular memory access: Sparse or windowed attention must gather valid tokens by index, producing irregular access patterns that place high demands on memory bandwidth and cache locality;
    • Backward-pass complexity: Backpropagation must replay the computation graph according to the indices and masks produced in the forward pass, making the implementation noticeably harder and more error-prone than standard full attention.

    2.4 The Common Bottleneck: From “Operator Alignment” to “Full-Stack Coordination”

    Ultimately, all of the above converge on a single question: can the software stack of a domestic accelerator achieve “operator alignment” and even “full-stack coordination” on a new model architecture? This specifically includes:

    • Numerical consistency: The error between cross-platform forward outputs and backward gradients must stay within an acceptable range, typically by comparing against industry-standard test sets and error criteria;
    • Dynamic shape support: The data-dependent branches introduced by variable-length sequences and routing require sufficient flexibility in graph compilation and operator scheduling;
    • Collective communication capability: A collective communication library implemented for domestic hardware must maintain stable bandwidth and latency across different scales and topologies;
    • Framework and ecosystem compatibility: Core capabilities such as distributed training frameworks, mixed-precision training, and checkpointing and resume-from-checkpoint must all be fully functional on the target hardware.

    3. Trimmed-Configuration Validation: The “First Mile” of Adaptation Work

    Faced with a system this complex, attempting adaptation in one shot at full scale is prohibitively costly and risky. A sensible path is to complete “pipeline-level validation” with a trimmed configuration first, then scale up step by step. The guiding principle of trimming is: preserve architectural characteristics while shrinking problem size.

    3.1 Breaking Down the Trimming Strategy

    The trimming approach used in this validation can be summarized across four dimensions:

    Trimming dimension This configuration Design rationale
    Language backbone depth Truncated to 13 layers Preserves the full attention and MoE structure while reducing per-step time
    Expert scale 16 routed experts, Top-8 activation Activation ratio close to large-scale settings, retaining routing pressure
    Multimodal structure Full 27-layer vision tower and cross-modal projection module preserved Ensures the vision branch participates in parameter updates and validates the multimodal gradient path
    Data and initialization Image-text QA dataset, random initialization Eliminates pretraining-weight interference and isolates the convergence behavior of the training pipeline itself

    Two details are worth noting:

    • Expert activation ratio close to full scale: A 16-choose-8 activation ratio of 1/2 is on par with the activation configuration common in large-scale MoE, making the routing load and All-to-All communication characteristics representative;
    • Vision tower fully preserved: With trimming concentrated on the language backbone, the vision encoder and projection layer’s memory usage and backward computation all genuinely occur, so whether the gradient path is intact can be observed directly.

    3.2 The Boundary of Validation Goals

    Trimmed validation answers “can it run, is it learning, is it stable”—not “how good is the model.” It typically involves four checks:

    1. Functional correctness: The forward, backward, and optimizer-update paths run without errors, and every modality branch produces valid gradients;
    2. Numerical stability: No loss overflow and no gradient anomalies under mixed-precision training, with no interruptions across many consecutive steps;
    3. Memory feasibility: Peak memory stays controlled, leaving headroom to adjust batch size and sequence length;
    4. Convergence trend: Training and validation loss drop in tandem, indicating the optimization objective and data pipeline are correctly wired together.

    3.3 How to Correctly Read the Validation Results

    Metric Result Notes
    Hardware scale Dual-node, 16 cards Covers the cross-node communication path
    Training loss 8.9365 (mean of steps 21–70) → 2.1802 (mean of final 50 steps) About a 76% drop, skipping the sharp early-initialization swings
    Validation loss 6.5297 → 4.6873 Drops about 28% in tandem, with no obvious degradation in generalization
    Peak memory 44.80 GiB/card Real per-card usage of the trimmed model
    Stability 400 steps with no numerical overflow and no abnormal interruption The mixed-precision path is essentially trustworthy
    Parameter updates Vision branch participates in updates The multimodal joint-training path is complete

    The conclusion first: all the above figures come from the vendor lab’s public disclosure and show only that “the pipeline is connected.” For a randomly initialized model, the loss dropping from near the initial-entropy level of a language model mainly reflects the model fitting the data distribution; it cannot be equated directly with final model capability. The validation loss remains noticeably higher than the training loss, more likely due to insufficient trimmed capacity and training steps, and needs to be observed further in larger-scale training.

    As for method, the vendor reported loss using “segment means” rather than single-point values—a practice worth borrowing. Single-step loss fluctuates widely in the early stages of large-model training, and comparing several interval means to show a trend is more reliable than taking just the first and last points. Teams are advised to adopt a similar convention in internal experiments—for example, using the mean of steps 21 to N as the baseline and the mean of the final K steps as the convergence value, and recording the statistical windows in the experiment log.

    4. Engineering Implementation Points: A Five-Layer Breakdown from Operators to Clusters

    4.1 Operator Layer: Forward and Gradient Must Ship as a Pair

    Adapting MoE and hybrid attention to new hardware means advancing from “forward works” to “backward is correct”:

    • Routing operators: Top-k selection, weight normalization, capacity truncation, and token reordering must be implemented in both the forward and backward directions, with the gradient handling of dropped tokens behaving as expected;
    • Grouped matrix multiplication: Batched matrix multiplication grouped by expert must account for load imbalance caused by differing group sizes;
    • Sparse attention: Index gathering and window masking must be reimplemented on the target hardware and checked layer by layer against a reference implementation.

    A practical approach is to build a “three-layer check” for each new operator:

    1. Compare forward error against a CPU reference implementation;
    2. Compare backward gradients against numerical-gradient or automatic-differentiation results;
    3. Observe on a small-scale configuration of the real model whether gradient norms fall within a reasonable range.
    1. # Illustrative code: gradient sanity check commonly used when adapting to new hardware (pseudocode)
    2. def sanity_check(model, batch, ref_model):
    3. loss = model(batch).loss
    4. loss.backward()
    5. total_sq, bad_params = 0.0, []
    6. for name, p in model.named_parameters():
    7. if p.grad is None:
    8. bad_params.append(name) # parameter not involved in computation or backward chain broken
    9. continue
    10. if not is_finite(p.grad).all():
    11. bad_params.append(name) # NaN/Inf found in gradient
    12. total_sq += p.grad.float().pow(2).sum().item()
    13. # compare cosine similarity of gradients against a small-batch reference
    14. ref_grads = flat_grads(ref_model(batch).backward())
    15. cos = cosine(flat_grads(model), ref_grads)
    16. assert not bad_params, f"gradient anomalies in parameters: {bad_params}"
    17. assert cos > 0.999, f"gradient inconsistent with reference: {cos}"
    18. return total_sq ** 0.5

    4.2 Memory Layer: Sharded Parallelism Is a Prerequisite for Training Trillion-Parameter Models

    As the vendor disclosed, this validation relied on a fully-sharded data parallel strategy to manage parameters, gradients, and optimizer states in a sharded manner. Taking the memory cost of “parameters + gradients + optimizer states” as an example (mixed-precision training with an Adam-class optimizer):

    • Unsharded, each parameter requires roughly 16 bytes: 2 bytes for BF16 parameters, 2 bytes for BF16 gradients, and 4 bytes each for the FP32 parameter, first moment, and second moment;
    • Split evenly across N cards, each card needs only about 16/N bytes.
    1. per-card static memory ≈ parameter count × 16 bytes / number of cards

    By this estimate, a trillion-parameter model fully sharded across 512 cards costs roughly 31 GB of static memory per card; at thousand-card scale it is about 16 GB. This does not yet account for activations, communication buffers, or transient memory.

    In practice, two points need attention:

    • Forward and backward recomputation: Trading compute for memory is a common technique for memory-sensitive modules like the vision tower;
    • Shard granularity and communication frequency: Finer sharding saves more memory but increases the number of communication rounds for parameter gathering (All-Gather) and gradient reduction (Reduce-Scatter).

    The recommendation is to use “per-card static cost + peak activations” as a budget, first estimate a feasible combination of parallelism, then measure actual peak memory on real hardware. The roughly 44.80 GiB peak memory in this validation is an effective data point for calibrating this model.

    4.3 Communication Layer: Cross-Node Communication Determines Scaling Efficiency

    In the 16-card validation, inter-card communication took place mainly within a single node. Moving to full scale, inter-node bandwidth is typically far lower than intra-node interconnect bandwidth, and communication becomes a bottleneck. Optimization usually starts from three angles:

    1. Topology awareness: Keep collectives such as All-to-All and All-Gather within a node as much as possible, reducing cross-node traffic;
    2. Compute-communication overlap: Overlap gradient reduction and parameter gathering with backward computation in time to hide communication latency;
    3. Communication-library tuning: Tune algorithm selection and buffer sizes in the target hardware’s collective communication library, and pay attention to congestion control.
    1. # Illustrative code: config skeleton for fully-sharded data parallel training (pseudocode)
    2. parallel = ParallelConfig(
    3. shard="full", # shard parameters, gradients, and optimizer states
    4. data_parallel=world_size, # data parallel dimension
    5. expert_parallel=ep_size, # expert parallel dimension
    6. mixed_precision="bf16", # mixed-precision training
    7. overlap_comm=True, # overlap communication with computation
    8. )
    9. trainer = Trainer(model, parallel=parallel,
    10. grad_clip_norm=1.0, # gradient clipping
    11. checkpoint_interval=500) # periodic checkpointing
    12. trainer.fit(train_loader, max_steps=400) # training steps matching this validation run

    4.4 Precision and Numerical Stability: The Mechanisms Behind 400 Overflow-Free Steps

    “400 steps with no overflow and no interruption” is not a matter of chance but the combined effect of several mechanisms:

    • BF16 as the primary compute precision: BF16 has the same number of exponent bits as FP32 and thus a large dynamic range, making overflow markedly less likely than with FP16; it has become a common choice for large-model training;
    • Gradient clipping: Suppresses gradient spikes caused by individual batches;
    • Overflow detection and step skipping: When the loss or gradient produces non-finite values, that step’s parameter update is skipped;
    • Periodic checks of gradient and parameter norms: Locates problems before they spread into a training collapse.

    4.5 Multimodal Joint Training: Data and Loss Ratios Matter Just as Much

    Whether the vision branch keeps updating depends on whether the data and loss design give the vision path “something to do”:

    • Interleaved image-text data must support variable-length packing and correctly handle attention masks;
    • The data pipeline must keep pace with compute so accelerator cards do not idle while waiting for data;
    • The training objective can include both a language-modeling loss and image-text alignment losses, combined in sensible proportions to avoid one branch’s gradient being suppressed.

    5. From Validation to Full Scale: Four Hurdles That Still Remain

    5.1 Cluster Scaling

    Going from 16 cards to hundreds or even thousands changes the communication pattern qualitatively. All-to-All traffic under expert parallelism grows with scale, and pipeline parallelism introduces bubbles. On domestic compute, it is also necessary to validate the stability of collective communication under large-scale interconnect and elastic fault tolerance.

    5.2 Long-Running Stability

    A full pretraining run often lasts weeks or even months, so stability matters more than peak performance. The industry typically measures cluster efficiency with the “effective training rate”—the share of effective compute—which jointly reflects losses from fault recovery, slow nodes, and communication waits. An all-domestic cluster achieving a high effective training rate in training an important model version suggests this metric is improving, but it still needs continued validation at larger scales and longer time spans.

    5.3 Precision Alignment and Reproducibility

    The real bar for adaptation on the training side is “consistent convergence behavior.” Loss curves must be compared across scales to confirm that numerical-error accumulation on the new hardware does not produce convergence drift, and to ensure checkpoints can be restored across nodes and that training results are reproducible.

    5.4 From “Runs” to “Runs Efficiently”

    Trimmed validation does not focus on throughput, whereas full-scale training must optimize simultaneously:

    • Per-card throughput and scaling efficiency;
    • Operator fusion and compute-communication overlap;
    • Data-supply capability.

    All of these require benchmarking on a configuration close to the target scale.

    6. Deployment Recommendations: Embedding Adaptation Validation into the Standard Engineering Workflow

    For teams preparing to train large models on domestic compute, the following path can be followed:

    1. Layered validation: Scale up step by step—operator-level (forward and backward error), model-level (trimmed configuration), then cluster-level (target scale);
    2. Reproducible experiment records: Fix random seeds, data versions, parallel configuration, and checkpoints so every validation run can be reproduced;
    3. Stability monitoring: Set up monitoring and alerts for loss, gradient norms, memory, and throughput, automatically saving checkpoints and notifying on anomalies;
    4. Progressive scale-up: First validate networking and scheduling on a small subset of the target cluster, then scale up gradually.

    This work relies on underlying infrastructure. Baidu AI Cloud has continued to invest in AI infrastructure and offers several general-purpose capabilities around large-model training that can serve as a reference:

    • Container platform: Orchestration, scheduling, and elastic scaling for distributed training jobs;
    • Object storage: Storing training data, checkpoints, and logs;
    • Monitoring, alerting, and logging services: Tracking training metrics and detecting anomalies promptly;
    • Message queue: Decoupling data preprocessing from training jobs.

    Taking this validation as an example, metrics such as loss, memory, and gradient norms can be unified into the logging and monitoring system, with segment means computed and trends compared. Checkpoints can be written periodically to object storage to support long-running stability and fault recovery. With standardized infrastructure, teams can focus more on the model and algorithms themselves.

    7. Conclusion

    The 400-step continuous training and gradient-check results disclosed by the domestic GPU vendor’s lab provide a referenceable engineering milestone for the reproducibility of training trillion-parameter MoE multimodal models on domestic compute. What it proves is not that “domestic GPUs can already train trillion-parameter models,” but that “for this class of complex architecture, the training pipeline has been connected under a small-scale configuration and now has a basis for being examined and reproduced.”

    Between a trimmed configuration and a full-scale trillion-parameter pretraining run still lie the tests of cluster scaling and long-running stability. Yet for the industry as a whole, these public, fine-grained engineering data are exactly the accumulation most needed as the domestic compute ecosystem matures.