Adapting Trillion-Scale Multimodal Training to Domestic AI Accelerators: An Engineering Path
This article explains how to validate a trillion-scale mixture-of-experts multimodal model on domestic AI accelerators. It covers what a continuous training run can and cannot prove, including gradient flow across modules, communication for expert routing, memory management, and how to read loss curves. It also outlines a staged path from functional validation to large-scale training, along with acceptance dimensions for developers and enterprises.
1. Understanding Training Adaptation: From Running Successfully to Producing Complete Evidence
Adapting large language models to domestic AI accelerators cannot be judged only by whether the model loads or completes a single forward pass. Training runs data loading, forward propagation, loss computation, backward propagation, gradient synchronization, and parameter updates in sequence. A defect in any stage may only appear after the job has run for some time, as numerical anomalies, communication stalls, or out-of-memory errors.
For trillion-parameter mixture-of-experts (MoE) multimodal models, this complexity increases. The model includes a language backbone that processes text sequences, a vision encoder, and a cross-modal projection module. The MoE structure dynamically selects a subset of experts for each input. Different modules have different compute patterns, memory demands, and communication behavior. The core of the adaptation work is therefore to make the complete training loop work end to end, not to get individual operators running on the accelerator in isolation.
The reference material reports a continuous 400-step training run on two machines with 16 accelerator cards in total. This validation used a trimmed model configuration. It should not be read as proof that a full trillion-parameter model has completed pretraining. A more accurate framing is this: for trillion-scale model architectures, the work verified that key training paths can execute on domestic accelerators, and that they run continuously with basic numerical behavior.
2. What the Validation Configuration Kept and What It Omitted
The original model in the reference material uses a mixture-of-experts architecture with about 2.8 trillion parameters. The actual test did not use the full configuration. It reduced the language side:
- The language backbone kept 13 layers.
- The model had 16 routed experts, and each token selected 8 of them.
- The vision encoding branch kept the full 27 layers.
- The cross-modal projection module was retained.
- Training used randomly initialized weights and medical image-text question answering data.
- The run lasted 400 consecutive training steps on two machines with 16 cards.
These settings define the scope of the results.
First, the trimmed model still includes the language, vision, and cross-modal connection components. It can therefore check whether the multimodal training pipeline is connected end to end. Second, expert routing and multi-card coordination remain active, so the test can expose some distributed communication and dynamic load problems.
However, because the language depth and expert count were reduced, the parameter count, communication volume, and memory demand of this test cannot be read directly as those of the full model. In particular, the 2.8-trillion-parameter label for the full model should not describe the training load of this trimmed configuration.
The right role for this trimmed validation is to cover the key technical paths at lower cost. It provides a basis for scaling the model and the cluster later. It does not replace full-scale experiments.
3. Why Multimodal and Mixture-of-Experts Increase Adaptation Difficulty
1. Multimodal training requires gradients to cross multiple subsystems
A typical image-text training pipeline can be summarized as:
Image input → vision encoding → cross-modal projection → fusion with text representations → language backbone → loss computation
A forward pass that produces a loss does not mean every module took part in training. If gradients are cut off at an intermediate stage, or if vision parameters are not registered with the optimizer, the language side may still reduce the loss. That would hide the fact that the vision branch is not being updated.
When validating multimodal training, check gradients and parameter changes separately for the vision encoder, the projection module, and the language backbone. For each trainable branch, confirm at minimum that gradients exist, that their values are finite, and that parameter changes after each update match expectations.
The reference material reports that the vision branch took part in parameter updates. This is more specific evidence than a falling overall loss. It still needs to be combined with experiments such as input perturbation and modality ablation to judge whether the model actually uses visual information.
2. Expert routing introduces dynamic load and communication
A mixture-of-experts model does not call every expert for each input. Routing selects a subset of experts to process each input. This keeps per-step compute low while increasing total parameter count, but it adds engineering problems:
- Different experts may receive unequal numbers of tokens.
- When experts sit on different devices, token representations must be exchanged between them.
- Routing assignments, data rearrangement, and result aggregation must stay correctly matched.
- Backward propagation must return gradients along the correct paths.
Even when average communication bandwidth is sufficient, an overloaded device hosting a popular expert can slow the entire training step. Adaptation therefore cannot only check whether the communication interface works. It also needs to monitor expert load distribution, communication wait time, and slow devices.
3. Hybrid attention raises operator coverage requirements
A complex model may use different attention computation methods in different layers. Their masking rules, position handling, and tensor layouts may also differ. Operator adaptation must cover both forward and backward passes to keep semantics consistent.
For sparse or dynamically selected paths, check boundary cases as well: short sequences, irregular lengths, padding positions, and varied batch shapes. A single input that runs successfully does not mean every valid input is handled correctly.
4. Memory Management: More Than Fitting the Parameters
Training memory generally consists of model parameters, gradients, optimizer states, activations, and temporary workspace. Multimodal and expert computation can add overhead from intermediate image features, token rearrangement buffers, and communication buffers.
Fully sharded data parallelism is a common approach. It spreads parameters, gradients, and optimizer states across multiple devices, and gathers and frees them as the related computation runs. This reduces the persistent state each card holds. It also tightly couples computation, communication, and memory lifetimes.
During adaptation, focus on these checks:
- Whether parameters are correctly gathered before computation.
- Whether backward gradients are reduced and sharded as expected.
- Whether the optimizer updates the corresponding parameter shards.
- Whether temporary buffers are released promptly.
- Whether overlapping communication with computation causes extra memory peaks.
The reference material records a memory peak of 44.80 GiB. This number describes resource usage observed under one configuration. It cannot be compared across setups without accounting for batch size, sequence length, image size, numerical precision, and measurement method.
Reports should distinguish between memory actually used by devices and memory reserved by the runtime. They should also state whether the peak includes initialization, the first creation of optimizer states, and checkpoint saving.
5. Interpreting the 400-Step Training Run and Loss Changes
The reference material reports that training loss fell from an average of 8.9365 over steps 21 to 70 to an average of 2.1802 over the final 50 steps. Validation loss dropped from 6.5297 to 4.6873. No numerical overflow or abnormal interruption was reported during the 400 consecutive steps.
These results support two conclusions. Within the inputs and configuration tested, the training pipeline completed multiple iter
