Domestic AI Accelerator Cards Complete Training Adaptation for an Ultra-Large Multimodal Model

    A domestically developed AI accelerator card and its software stack have completed training adaptation for an open-weight native multimodal model. In a two-server, 16-accelerator-card environment, the training job completed 400 consecutive optimizer updates without numerical overflow or abnormal interruption, and the vision encoder, cross-modal projection layer, and language backbone all produced valid gradients. The results validate functional correctness and engineering stability rather than full-scale pretraining. This article reviews the training challenges, adaptation design, validation results, vision-branch verification, and engineering lessons for scaling ultra-large multimodal training on new compute platforms.

    1. From “Can Run” to “Can Train Continuously”

    The hard part of training adaptation for ultra-large multimodal models is not merely completing a single forward inference pass. The system must carry data through the full pipeline: vision encoding, cross-modal fusion, language modeling, backpropagation, and parameter updates. It must also maintain numerical stability and reliable communication across multiple cards and servers.

    Recently, a domestically developed AI accelerator card and its accompanying software stack completed training adaptation for an open-weight native multimodal model. In a joint environment with two servers and 16 accelerator cards in total, the training job completed 400 consecutive optimizer updates without numerical overflow or abnormal termination. The test also confirmed that the vision encoding branch, cross-modal projection layer, and language backbone all produced valid gradients. This indicates that the full image-text joint training path has reached a basic level of usability.

    It is important to clarify that this type of test is typically a validation of functional correctness and engineering stability, not equivalent to a full-scale pretraining result. Its main value is confirming that the model structure, operator implementations, memory management, and multi-card communication can work together. That provides a foundation for later expansion in model scale, training duration, and data volume.

    2. Training Challenges of Ultra-Large Multimodal Models

    The adapted model uses a native multimodal architecture with approximately 2.8 trillion total parameters. It supports a context length of up to 1 million tokens and adopts hybrid attention and a mixture-of-experts structure. The model must process text sequences as well as image features and tool-call-related information, so its compute path is significantly more complex than that of a traditional text-only model.

    The main challenges appear in the following areas.

    2.1 Memory Pressure from Parameter Scale

    When model parameters, gradients, and optimizer states all reside in device memory at the same time, a single card usually cannot hold the complete training state. This is especially true under mixed-precision training, where some parameters may still require higher-precision copies and the optimizer maintains additional statistics. Actual memory consumption is far higher than that of model weights alone.

    The training system therefore needs to shard parameters, gradients, and optimizer states, distributing different parts across multiple devices. Before executing a layer, devices fetch the required parameters on demand; after computation, they release or re-shard them promptly to reduce peak memory usage per card.

    2.2 Dynamic Expert Routing Increases Communication Complexity

    A mixture-of-experts model does not send every token through all experts. Instead, it selects a subset of experts based on routing results. This mechanism can expand model capacity while controlling computation, but it introduces dynamic data distribution problems.

    Tokens on different devices may need to be sent to different experts, and routing results change with the input. If communication scheduling is unreasonable, device load imbalance, communication waits, or local congestion may occur. Adaptation must verify expert selection, token reordering, cross-card sending, expert computation, and result collection. It must also ensure that data order and gradient relationships remain consistent before and after routing.

    2.3 Joint Image-Text Training Requires a Complete Vision Path

    A multimodal model cannot be validated only by checking whether the language part converges. Images are first encoded by the vision tower and then mapped through cross-modal projection into a representation space that the language model can process. If the vision branch is incorrectly frozen, gradients are truncated, or the computation graph is incompletely connected, the training job may still run, but it cannot be called true multimodal joint training.

    The test therefore must check whether image embeddings, key vision tower layers, the cross-modal projection, and the language backbone have non-zero gradients. It must further confirm that parameters actually change after optimizer updates.

    3. Overall Design of the Adaptation

    This adaptation uses a unified forward, backward, and parameter-update flow. It preserves the organization of the original training framework as much as possible, then replaces or optimizes low-level operators and parallelism strategies.

    3.1 Modular Model Partitioning

    The training system divides the model into the language backbone, vision encoder, cross-modal projection layer, attention modules, expert routing modules, and loss computation modules. The modular design makes it easier to verify separately:

    • whether attention computation supports long sequences and hybrid structures;
    • whether expert routing can complete dynamic distribution;
    • whether visual features correctly enter the language side;
    • whether backpropagation can cross the image-text connection;
    • whether the loss function supports chunked computation and gradient accumulation.

    The test configuration used a 13-layer language backbone, 16 routed experts, and Top-8 routing. The vision side retained the complete 27-layer vision tower and the cross-modal projection module. This truncation approach preserves the main compute paths under limited hardware resources and is suitable for functional validation.

    3.2 Sharding Parameters, Gradients, and Optimizer States

    Multi-card training uses a sharded data parallelism approach, distributing model parameters, gradients, and optimizer states across multiple devices. Compared with simple data replication, sharding can significantly reduce per-card memory pressure, but it also requires fine-grained management of the parameter lifecycle.

    A typical execution flow is as follows:

    1. Read input data
    2. → Fetch parameters required by the current layer
    3. → Execute forward computation
    4. → Save necessary backward information
    5. → Release parameters no longer needed temporarily
    6. → Compute backward pass and generate local gradients
    7. → Aggregate or shard gradients across devices
    8. → Update parameter states

    In actual implementations, parameter prefetching and communication scheduling must also be combined so that communication overlaps with computation as much as possible. If parameter fetching always starts only after computation begins, devices may sit idle waiting for communication. If prefetching happens too early, it may cause additional memory usage.

    3.3 Multi-Server Communication and Synchronization

    A two-server, 16-card environment must handle not only intra-server device communication but also data exchange between nodes. The communication system must ensure the correctness of several operation types:

    1. aggregation and distribution of parameters or gradients;
    2. cross-card token transfer generated by expert routing;
    3. result synchronization after multi-device computation;
    4. state consistency before and after optimizer updates;
    5. task termination and recovery under abnormal conditions.

    Communication correctness cannot be judged only by whether the task reports an error. It should also check whether tensor shapes, data layout, gradient values, and update steps remain consistent across devices. For dynamic routing models, particular attention should be paid to changes in token counts, empty expert branches, and extreme load distributions.

    4. Validation Results from 400 Consecutive Training Steps

    The test used an image-text question-answering dataset with a global batch size of 16 and a sequence length of 1024. Sixteen training processes on two servers continuously completed 400 optimizer updates, with no numerical overflow or abnormal stop during training.

    In terms of loss changes, the average loss from steps 21 to 70 in the early stage was approximately 8.9365, and it dropped to 2.1802 in the last 50 steps. This indicates that the model can learn normally under the current truncated configuration and random initialization. Validation loss decreased from 6.5297 at step 100 to 4.6873 at step 400. Although validation metrics are still affected by training steps, data scale, and initialization, the downward trend indicates that the training flow has basic optimization effectiveness.

    Device sampling data showed a peak memory usage of approximately 44.80 GiB. This figure can be used to evaluate resource headroom for later expansion of language layers, sequence length, or batch size. However, peak memory usage cannot be simply equated with the resources required for full training, because actual consumption is also affected by activation-saving strategies, communication buffers, data prefetching, and expert load distribution.

    5. How to Confirm That the Vision Branch Really Participates in Training

    A common misconception in multimodal training adaptation is that “the image was input” means the vision module has participated in training. A more reliable judgment should include at least three levels.

    First, check whether the vision tower output enters the cross-modal projection layer and confirm that the projected features are actually used by the language backbone. Second, observe whether gradients for image embeddings, the first and last layers of the vision tower, and the cross-modal projection layer are non-zero. Finally, compare parameter changes in these modules before and after one optimizer update.

    The test results showed that image embeddings, the first and last layers of the vision tower, and the cross-modal projection module all produced non-zero gradients and parameter updates. This means visual information participated not only in forward computation but also in backpropagation and parameter optimization. The image-text joint training path is essentially closed.

    In engineering practice, it is also advisable to add gradient anomaly detection. For example, continuously record gradient norms for each module, parameter update ratios, and loss components to promptly identify problems such as zero gradients, exploding gradients, or persistently small gradients.

    6. Further Optimizations for Large-Scale Training

    Beyond basic adaptation, the system also completed several capability preparations for scaled training.

    First, it supports coordination between sharded data parallelism and expert parallelism, allowing parameter sharding and expert distribution to work together and reducing resource bottlenecks caused by a single parallelism strategy.

    Second, it optimizes parameter prefetching and gradient communication scheduling, reducing device waiting time through computation-communication overlap. This strategy must consider network bandwidth, memory capacity, and inter-layer dependencies in the model. It cannot simply move all communication operations earlier.

    Third, it optimizes high-performance compute operators for hybrid attention structures, reducing intermediate tensor reads and writes and repeated computation. For long-context tasks, attention modules are often the focus of computation and memory overhead. Operator fusion, block processing, and reasonable caching strategies all play important roles.

    Fourth, it introduces chunked loss computation. This mechanism was enabled in the test, splitting a large loss computation process into multiple sub-blocks to reduce peak intermediate activation memory and improve memory efficiency while ensuring correct gradients.

    7. Engineering Lessons from the Test Results

    This validation shows that when migrating ultra-large multimodal models to a new compute environment, a phased approach should be used rather than starting directly with full-scale training.

    The first phase should verify operator correctness on a single card or a small multi-card setup, focusing on forward results, backward gradients, and parameter updates. The second phase should expand to a single server with multiple cards to verify memory sharding, gradient synchronization, and load balancing. The third phase should move to a multi-server environment, focusing on cross-node communication, long-duration stability, and abnormal recovery. Only after that is it appropriate to gradually expand model layers, batch size, sequence length, and training steps.

    In addition, a decrease in training loss does not mean that all modules are correct. For multimodal models, the vision branch must also be verified separately. For mixture-of-experts models, expert utilization and routing balance should be analyzed. For multi-server jobs, communication time, device utilization, and peak memory usage should be recorded.

    Overall, the result of 400 consecutive steps on two servers with 16 cards demonstrates that the training path has completed the key loop from model loading to parameter updates. Although this is not full-scale pretraining, it provides a reusable engineering foundation for larger model configurations, longer contexts, and longer training runs.