Trillion-Parameter Multimodal Model Training Adaptation on a Domestic AI Compute Platform
This article presents a practical case of adapting the training of an open-weight native multimodal model—with roughly 2.8 trillion total parameters and a 1-million-token context window—on a domestic Chinese GPU-based AI training and inference platform. It covers the model's architectural challenges (hybrid attention, MoE routing, vision-language joint training), the core adaptation work across operators, expert parallelism, and the FSDP2 distributed strategy, and the results of a 400-step run on 16 cards across two servers. Key lessons include a reproducible method for verifying that the vision branch truly participates in gradient updates, and engineering practices such as chunked loss computation that reduce memory pressure in large-scale training.
Introduction: The Practical Challenges of Training Trillion-Parameter Multimodal Models
As large models evolve from text-only toward natively multimodal architectures, both model scale and structural complexity continue to grow. Recently, a Chinese GPU vendor announced that its flagship all-in-one AI training and inference card, together with its software stack, has completed training adaptation for an open-weight native multimodal model with roughly 2.8 trillion total parameters and a context window of up to one million tokens. A native fully sharded (FSDP2) multimodal training path was built as part of this work. In joint testing on two servers with 16 cards, the system completed 400 consecutive training steps with no numerical overflow or unexpected interruption, and the vision branch achieved real gradient updates. This case is a useful reference for teams looking to validate the training capabilities of domestic compute platforms.
Target Model Architecture and Compute Requirements
The target model is an open-weight native multimodal LLM with approximately 2.8 trillion total parameters, a maximum context length of 1 million tokens, and capabilities for visual understanding and tool calling. Its architecture has three defining features:
- Hybrid attention mechanism: The model combines linear attention with gated sparse attention. Linear attention handles efficient compressed modeling of long sequences, while sparse attention dynamically retrieves key context segments. Together, they balance accuracy against compute cost at million-token context lengths.
- Mixture-of-Experts (MoE) architecture: Each layer contains multiple routed experts, with a subset activated via a Top-K strategy during both training and inference. This introduces training-side challenges including dynamic expert routing, load balancing, and expert sharding across cards.
- Joint vision-language training: The model includes a full vision encoder tower and a cross-modal projection module. Training must ensure the vision branch genuinely participates in backpropagation rather than acting only as a forward feature extractor.
Combined, these characteristics impose requirements on per-card compute, memory capacity management, multi-card communication bandwidth, and collective communication library stability that far exceed those of conventional dense model training.
Core Technical Path of the Training Adaptation
The adaptation focused on the model’s most compute- and communication-intensive modules, covering four areas:
- Attention computation adaptation: High-performance operators were implemented for the linear attention kernels and dynamic sparse retrieval logic in the hybrid attention design, and integrated into a unified forward, backward, and parameter update pipeline so that the gradient computation graph closes completely.
- Dynamic routing adaptation: MoE layers involve substantial cross-device data movement for gating, expert dispatch, and result aggregation. The adaptation aligned the routing logic with the expert parallelism (EP) strategy, allowing expert parameters to be sharded across device groups and reducing per-card memory usage.
- Vision encoding and cross-modal projection adaptation: The vision tower’s convolution/attention computation and the projection module were incorporated into the same training pipeline, ensuring image embeddings receive gradient signals from the language side.
- Training framework compatibility: The solution preserves the native AutoModel workflow of mainstream training frameworks, avoiding invasive modifications to model code and reducing the maintenance cost of tracking future model version updates.
For the distributed strategy, training uses FSDP2 to shard model parameters, gradients, and optimizer states across GPUs, significantly lowering peak per-card memory. Cross-card and cross-node communication is handled by the companion collective communication library, with communication scheduling optimizations for scenarios where expert parallelism and full parameter sharding coexist.
Test Configuration and Training Results
The validation environment consisted of two servers with a total of 16 all-in-one training and inference cards. A trimmed model configuration was used: a 13-layer language backbone, 16 routed experts (Top-8 routing), plus the complete 27-layer vision tower and cross-modal projection module. Training data came from a public medical visual question answering dataset, with a global batch size of 16 and a sequence length of 1024.
Key observations:
- All 16 training processes completed 400 consecutive optimizer updates. Training loss dropped from an average of 8.9365 (steps 21–70) to 2.1802 (final 50 steps).
- Validation loss decreased from 6.5297 at step 100 to 4.6873 at step 400.
- Sampled peak device memory was 44.80 GiB, within the safe range of the card’s memory capacity.
- There were no NaN/Inf numerical overflows, no communication timeouts, and no abnormal process exits throughout the run.
Particularly noteworthy is the verification of vision branch participation. The team inspected the gradient tensors of the vision tower’s image embedding layer, its first and last Transformer layers, and the cross-modal projection module, observing non-zero gradients and actual parameter updates in every case. This verification approach is worth adopting: in multimodal training, “data flowing through the vision branch” is not the same as “the vision branch being trained.” Only by confirming non-zero gradients and actual parameter updates can you prove the end-to-end training loop is truly closed. Developers building their own pipelines can perform a similar check as follows:
# Compare parameters before and after training to verify the vision branch is being updatedbefore = {n: p.detach().clone() for n, p in model.named_parameters()if "vision" in n or "projector" in n}# ... run several training steps ...for n, p in model.named_parameters():if n in before:assert p.grad is not None and p.grad.abs().sum() > 0assert not torch.equal(before[n], p.detach())
To be objective, this validation used a randomly initialized, trimmed configuration. It is a functional and stability verification rather than a full-scale pretraining of the complete model. Its significance lies in demonstrating that the entire training chain—from operators and communication to distributed strategy—functions correctly and runs stably on this compute platform.
Optimization Reserves for Larger-Scale Training
Beyond the basic training pipeline, the platform also completed four key optimizations: FSDP2–expert parallelism coordination, which resolves the communication topology issues that arise when parameter sharding and expert sharding overlap; parameter prefetching and gradient communication scheduling, which hides AllGather and ReduceScatter latency by overlapping computation and communication; a high-performance linear attention operator, supporting compute efficiency in long-context scenarios; and chunked loss computation, which executes the loss function in sequence chunks to prevent the logits tensor from exhausting memory under a large vocabulary. The 400-step test actually enabled chunked loss; the other three optimizations were also completed and can support larger training configurations.
Conclusion
Training adaptation for trillion-parameter multimodal models is fundamentally a comprehensive test of a compute platform’s operator completeness, communication stability, and distributed strategy maturity. The results here—400 consecutive fault-free steps on 16 cards across two servers, normally converging loss, and a closed gradient path through the vision branch—indicate that domestic all-in-one training and inference compute now has the foundational capability to support training validation for this class of model. For developers, when planning large-scale multimodal training jobs, it is worth combining general-purpose cloud capabilities such as container platforms, object storage, and monitoring/alerting to build an elastic training environment, while borrowing the engineering practices described here—gradient verification and chunked loss—to systematically reduce the validation cost and trial-and-error risk of the training pipeline.
