A Domestic GPU Completes Trillion-Parameter Multimodal Training Adaptation

    This article examines how a domestic AI chip vendor adapted an open-weight, native multimodal model with roughly 2.8 trillion parameters on 16 flagship training cards. It explains why trillion-scale multimodal training is difficult, breaks down the key techniques used—FSDP2 parameter sharding, a custom mixed-attention kernel, chunked loss computation, and gradient verification for the vision branch—and interprets the stability metrics from a 400-step run. Readers will learn the difference between pipeline validation and full pre-training, along with reusable practices for running large-scale multimodal training on domestic compute platforms.

    1. Background: A Pipeline Correctness Test, Not Full Pre-Training

    A domestic AI chip vendor recently announced that it had completed training adaptation for an open-weight, native multimodal large model. The model has roughly 2.8 trillion parameters in total, supports a context length of up to 1 million tokens, and combines a hybrid attention mechanism with a Mixture-of-Experts (MoE) architecture. It also supports visual understanding and tool calling. The adaptation ran on 16 flagship training-and-inference cards across two nodes, completing 400 consecutive optimizer updates with no numerical overflow and no abnormal interruptions. The vision branch produced real gradient updates.

    The scope needs to be stated clearly first. The test used a randomly initialized, trimmed configuration: a 13-layer language backbone, 16 routed experts, Top-8 routing, and a full 27-layer vision tower with the cross-modal projection retained. This was not full-scale pre-training of the complete model. Its value lies in verifying the functional correctness and numerical stability of the training pipeline, not in topping model performance leaderboards. The distinction matters greatly in engineering practice: pipeline validation answers whether the software and hardware stack can compute gradients correctly and update parameters correctly, while model quality validation answers whether the data and hyperparameters can converge to the target capability. The two should not be conflated.

    2. Why Trillion-Scale Native Multimodal Models Are Hard to Train

    The difficulty of training multimodal large models is not a linear scaling of parameter count, but the stacking of three kinds of complexity:

    • Dynamic sparse retrieval and expert routing: Each token activates only a few experts, so the computation graph changes dynamically with the input. Load imbalance creates a “weakest link” effect, where individual devices become communication and computation bottlenecks.
    • Joint image-text training: The vision encoder and the language backbone differ significantly in learning-rate scale, gradient magnitude, and convergence pace. Treating them uniformly tends to let one side dominate while the other underfits.
    • The memory wall: Parameters, gradients, and optimizer states (Adam-family optimizers typically require more than twice the parameter size) plus activations add up to far more than a single card can hold for a full model replica.

    The core of the adaptation work, therefore, is not simply “getting it to run.” It is connecting four module types—attention computation, dynamic routing, vision encoding, and cross-modal projection—into the same forward, backward, and parameter-update flow, while keeping numerical semantics consistent with the reference implementation.

    3. Breakdown of the Key Techniques

    3.1 Parameter Sharding: Reducing Per-Card Memory Pressure with FSDP2

    The approach kept the model framework’s native auto-parallel flow and used FSDP2 to distribute parameters, gradients, and optimizer states across different GPUs. Each card holds only a shard and aggregates on demand during computation. Cross-card and cross-node collective communication was handled by the vendor’s in-house collective communication library. Device-side sampled peak memory in the test was 44.80 GiB, leaving headroom on a flagship card and indicating that the sharding strategy worked well together with recomputation.

    Three points deserve attention in practice. First, shard granularity and computation-communication overlap: overly fine granularity causes a sharp increase in communication calls. Second, prefetch depth: insufficient prefetching leaves aggregation communication exposed on the critical path. Third, coordination with expert parallelism: when expert-dimension splitting and parameter sharding coexist, communication groups easily cross, and poor scheduling can significantly lower utilization.

    3.2 A High-Performance Mixed-Attention Operator

    The hybrid attention mechanism introduces gating and sparse-selection logic that generic operators cannot cover, so a custom high-performance kernel was needed. The adaptation implemented the corresponding operator and ensured correct gradient semantics in backpropagation. The illustrative call logic is as follows (pseudocode, structure only):

    1. # Forward: gated, sparsely selected mixed attention
    2. scores, gate = mixed_attention_qkv(q, k, v, block_mask)
    3. out = scores * gate.unsqueeze(-1)
    4. # Backward is provided by the custom operator to ensure numerical stability
    5. loss = cross_entropy(head(out), labels)
    6. loss.backward() # gradients must cover gate and the projection layers

    For custom operators, it is advisable to establish a “reference implementation alignment” process: fix the random seed, compare forward outputs and gradient norms layer by layer, and locate the specific operator as soon as the error exceeds a threshold, rather than waiting for the overall loss to go wrong and tracing back.

    3.3 Chunked Loss Computation

    Cross-entropy over a large vocabulary produces enormous intermediate tensors. Chunked computation splits the loss along the sequence or class dimension and accumulates it chunk by chunk, substantially lowering peak memory. This optimization was enabled during the 400-step test. Its cost is an extra reduction step, and the order of numerical accumulation affects precision. The usual recommendation is to accumulate in higher precision while keeping master weights at the output layer in full precision.

    3.4 Verifying That the Vision Branch Truly Participates

    This is the most methodologically valuable part of the validation. The technical team inspected the image embedding layer, the first and last layers of the vision tower, and the cross-modal projection module, confirming that all of them produced non-zero gradients and parameter updates. The criterion can be summarized as:

    1. For each module m to verify:
    2. if ||grad(m)|| > eps and parameter delta ||Δθ_m|| > eps -> the module truly participates in training
    3. if grad is always 0 -> it may not be connected to the computation graph, or is detached/frozen
    4. if Δθ is always 0 -> it may be skipped by the optimizer, or the learning rate is 0

    This step catches the most common hidden defect in multimodal adaptation: the vision tower appears to produce output in the forward pass but is not actually connected to the backward graph, so training only takes effect on the language side.

    4. Reading the Stability Metrics

    • Training loss: Averaged 8.9365 from step 21 to step 70 and dropped to 2.1802 over the last 50 steps. The decline was smooth with no spikes, indicating that the loss-scaling and numerical-precision strategies were effective.
    • Validation loss: Fell from 6.5297 at step 100 to 4.6873 at step 400. The validation signal moved in the same direction as the training signal, ruling out the illusion of merely memorizing the training set.
    • 400 consecutive steps without interruption: This covered many collective-communication and optimizer-update cycles and is baseline evidence of pipeline stability.
    • Peak memory of 44.80 GiB: This leaves room to increase batch size or sequence length.

    5. Reusable Implementation Recommendations

    1. Align on a small configuration first, then scale up: Get the pipeline working with trimmed layers and a small batch, then gradually increase the number of experts, sequence length, and node count.
    2. Set up three monitoring signals: Gradient-norm distribution, expert load imbalance, and communication-wait ratio. These three expose most large-scale training failures in advance.
    3. Prioritize numerical stability: Unify the loss-scaling strategy and use a capacity factor to limit sparse routing, avoiding over-allocation to individual experts.
    4. Tune communication scheduling and prefetching: Overlap parameter aggregation with backward computation to reduce waiting on the critical path.
    5. Define the validation boundary clearly: Passing pipeline validation does not mean the model is usable; quality evaluation at full data and scale is still required.

    For teams using cloud container platforms, object storage, and monitoring and alerting services, the workflow above maps directly onto a standard engineering pattern of “containerized training jobs + sharded data reads + metric collection and alerting,” making it possible to complete adaptation and validation of large-scale multimodal training on domestic compute platforms at relatively low cost.