Domestic AI Chip Adaptation for Ultra-Large Multimodal Model Training: A Practice Analysis

    This article examines how a domestic AI chip vendor adapted its flagship training-and-inference compute card and software stack for a native multimodal model with about 2.8 trillion parameters and a 1-million-token context window. It covers the infrastructure pressures of trillion-scale multimodal training, four key adaptation modules—hybrid attention, dynamic expert routing, vision encoding and cross-modal projection, and unified training flow integration—FSDP2 and expert-parallel coordination, a 400-step two-server 16-card validation, and the implications for heterogeneous AI infrastructure.

    1. Background: Infrastructure Challenges of Ultra-Large Multimodal Models

    Recent open-weight native multimodal models have developed rapidly. Typical representatives now reach trillion-level total parameters and million-token context windows. These models often combine several distinctive technical features: mixture-of-experts (MoE) architectures to control per-forward compute, new attention mechanisms such as gated sparse attention, joint training of vision encoders and language backbones, and support for capabilities such as tool calling.

    These features create three pressures on training infrastructure:

    1. Compute pressure: Dynamic sparse retrieval and expert routing make compute loads highly uneven, placing greater demands on hardware compute scheduling.
    2. Memory pressure: Even with MoE, the total storage for parameters, gradients, and optimizer states in trillion-level models remains enormous; single-card memory is far from sufficient.
    3. Communication pressure: Image-text joint training involves cross-modal projection, expert routing involves cross-card token dispatch, and multi-card and multi-node communication traffic increases significantly.

    Against this backdrop, whether non-NVIDIA AI chips can complete training adaptation for such models is an important gauge of software stack maturity. Recently, a domestic AI chip vendor announced that its flagship training-and-inference integrated compute card and supporting software stack had completed training adaptation for a native multimodal model with about 2.8 trillion parameters and support for a 1-million-token context. In a two-server, 16-card environment, the system completed 400 consecutive training steps without numerical overflow or abnormal interruption. This article uses that practice as a sample and analyzes the adaptation approach from a technical perspective.

    2. Core Difficulties: End-to-End Integration of Four Modules

    This adaptation was not simple operator porting; it was systems engineering around four key modules.

    1. Hybrid Attention Mechanisms

    The model includes two hybrid attention mechanisms: KDA and Gated DSA. Compared with standard attention, hybrid attention introduces additional gating and sparse retrieval logic. The target hardware needs corresponding fused operators while keeping forward computation and backward gradients numerically stable. This usually requires the chip software stack to provide sufficiently flexible operator development capabilities, such as custom kernel authoring and precision validation workflows.

    2. Dynamic Expert Routing

    In MoE architectures, each token is routed to Top-K experts based on a routing function. Key issues during adaptation include the differentiability of routing computation during training, the communication implementation for token dispatch and aggregation, and long-tail waiting caused by load imbalance. In the test, the model used 16 routed experts with Top-8 routing, meaning each token activates half of the experts at once, so communication overhead cannot be ignored.

    3. Vision Encoding and Cross-Modal Projection

    Verifying that the vision branch “actually participates in training” was a highlight of this adaptation. The technical team checked that the vision tower’s image embedding, first and last layers, and cross-modal projection module all produced non-zero gradients and parameter updates. This is significant in engineering practice: in many multimodal adaptation efforts, the vision branch can easily be treated as a frozen input encoder. Only by confirming that gradient backpropagation and parameter updates actually occur can the full image-text joint training path be proven to work.

    4. Integration with a Unified Training Flow

    These modules ultimately need to connect to a unified forward, backward, and parameter update flow. This solution retained the framework’s native training flow and built the multimodal training path through native FSDP2, avoiding bypassing the framework or building a custom training loop just for adaptation. This helps maintainability when scaling to larger configurations later.

    3. Distributed Training: FSDP2 and Expert Parallelism

    Memory management was central to this adaptation. The solution uses FSDP2 to shard model parameters, gradients, and optimizer states across GPUs, significantly reducing per-card memory pressure. The principle can be simplified as follows:

    • Parameter sharding: Each card stores only a shard of the full parameters; during forward/backward computation, All-Gather temporarily aggregates them as needed and releases them after use.
    • Gradient sharding: After backward computation, Reduce-Scatter returns gradient shards.
    • Optimizer state sharding: Adam first- and second-order momenta are also sharded, and memory usage decreases approximately linearly with the number of cards.

    In MoE scenarios, FSDP2 also needs to coordinate with expert parallelism: expert parameters are distributed across cards, and routed tokens need cross-card transfer. Cross-card and cross-node communication is handled by a supporting collective communication library—a MUSA ecosystem communication library similar to NCCL—whose stability directly determines whether long-running training can continue.

    Supporting optimizations also include parameter prefetching and gradient communication scheduling—overlapping communication with computation to hide All-Gather/Reduce-Scatter waiting time—as well as high-performance KDA operators and Chunk Loss block computation. Chunk Loss divides cross-entropy computation over a large vocabulary into blocks, avoiding memory peaks caused by materializing huge Logits tensors at once. The 400-step test actually enabled Chunk Loss; the other three optimizations have also been adapted, reserving room for larger-scale training configurations.

    4. Validation Results: What 400 Consecutive Steps Show

    The test used two servers with 16 compute cards in total and a trimmed configuration: a 13-layer language backbone and 16 routed experts with Top-8 routing, while retaining the full 27-layer vision tower and cross-modal projection module. Training used an image-text QA dataset, with global batch size 16 and sequence length 1024.

    Key metrics:

    Metric Value
    Training loss (average of steps 21–70) 8.9365
    Training loss (average of last 50 steps) 2.1802
    Validation loss (step 100) 6.5297
    Validation loss (step 400) 4.6873
    Device-sampled peak memory 44.80 GiB

    How should these data be interpreted?

    First, the loss decrease is healthy. Training loss fell from about 8.94 to about 2.18, and validation loss fell from 6.53 to 4.69 in parallel. The trends were consistent with no sign of divergence, indicating that hyperparameters such as learning rate and gradient clipping were reasonably configured and that the model was converging normally.

    Second, 400 consecutive steps without interruption is a stability signal. For a new hardware platform, numerical overflow, NaN, and communication timeouts are among the most common failure modes. Completing 400 optimizer updates consecutively without anomalies indicates that numerical precision control—such as loss scaling under mixed precision—and communication links withstood the test.

    Third, the 44.80 GiB peak memory provides a capacity baseline. This figure can be used to estimate the number of cards and parallel strategy required for a full-scale model, and is an important input for subsequent scaling planning.

    It is important to note that this validation used a randomly initialized trimmed configuration, not full-scale pretraining of the complete model. Its purpose was to verify the functional correctness and stability of the training path. This engineering path—“validate with a trimmed configuration first, then scale to full size”—is also a common best practice for adapting new training hardware: first prove the end-to-end path with a small configuration and locate issues, then scale up step by step.

    5. Industry Implications

    This practice reveals several evolution paths for the domestic AI chip ecosystem:

    1. Software stack maturity matters more than peak compute. Whether a stack natively supports mainstream distributed schemes such as FSDP2 and can efficiently implement custom attention operators determines model migration cost.
    2. Coordination between the communication library and parallel strategy is the foundation of long-running training. Scheduling optimizations such as parameter prefetching and compute-communication overlap are necessary reserves before scaling up.
    3. Verifiability is essential. Non-zero gradient checks, validation loss tracking, and peak memory sampling provide quantifiable evidence for adaptation quality rather than stopping at “it runs.”

    For teams planning large-model training on heterogeneous compute, the methodology in this case—trimmed-configuration validation, a unified framework flow, and staged enablement of optimizations—has general reference value.