Training a Trillion-Parameter Multimodal LLM on Domestic AI Accelerators: A Practical Adaptation Case
A domestic flagship AI training-and-inference accelerator card and its software stack have completed a training adaptation for an open-weight, natively multimodal large model with roughly 2.8 trillion parameters and support for up to 1 million tokens of context. In a two-node, 16-GPU joint test, the system ran 400 consecutive training steps without numerical overflow or unexpected interruptions, with the vision branch receiving real gradient updates. This article breaks down the technical challenges and solutions behind the adaptation, including modular integration into a unified training pipeline, FSDP2 full sharding, custom collective communication, and the validation results.
Background: Why Trillion-Parameter Multimodal Models Stress Training Infrastructure
A significant engineering milestone was recently reported in the domestic AI compute ecosystem: a flagship domestic AI accelerator card and its accompanying software stack successfully completed a training adaptation for an open-weight, natively multimodal large model with a total of approximately 2.8 trillion parameters, supporting context lengths of up to 1 million tokens. In a two-node, 16-GPU joint test, the system completed 400 consecutive training steps with no numerical overflow or abnormal interruption, and the vision branch achieved actual gradient updates.
This case is noteworthy because it illustrates the engineering hurdles that large model training must clear to move from “can run” to “stably usable.” This article uses the practice as a lens to examine the key technical problems and solutions involved.
Target Model Characteristics and Adaptation Challenges
Three Architectural Challenges
The model adopts several cutting-edge architectural components:
- Hybrid attention mechanism: It combines gated dynamic sparse attention with a novel linear attention variant, reducing computational complexity in long-context scenarios. However, this places higher demands on operator numerical precision and memory access patterns.
- Mixture-of-Experts (MoE) architecture: Expert routing involves dynamic scheduling, with expert parameters distributed across devices and routing decisions dependent on the input data. This leads to load imbalance and communication hotspots.
- Natively multimodal design: The model includes a full vision encoder tower and cross-modal projection modules. Joint image-text training means gradients must flow back to both the language backbone and the vision branch.
Requirements on the Underlying System
The combination of dynamic sparse retrieval, expert routing, and joint image-text training implies that:
- Single-GPU memory must hold the sharded parameters and activations;
- Multi-GPU communication must support frequent All-to-All operations and gradient synchronization;
- The training framework must guarantee numerical stability, avoiding gradient variance amplification caused by sparse routing.
Core Design of the Adaptation Solution
Modular Integration into a Unified Training Flow
The adaptation was built around four core modules: attention computation, dynamic routing, vision encoding, and cross-modal projection. Rather than building separate bypass paths, these modules were integrated into the framework’s unified forward, backward, and parameter update flow. This approach:
- Guarantees a complete gradient chain, so vision branch parameters receive real updates rather than being formally mounted without training;
- Reuses the framework’s built-in automatic differentiation, checkpointing, and fault-tolerance mechanisms;
- Reduces migration costs when adapting other models later.
FSDP2 Sharding to Relieve Memory Pressure
The training setup preserved the model framework’s native workflow, using Fully Sharded Data Parallel (FSDP2) to distribute model parameters, gradients, and optimizer states across GPUs. The basic principle can be summarized as:
# FSDP2 sharding (pseudocode)# Full sharding: parameters, gradients, and optimizer states# are all split across the world sizesharded_model = fully_shard(model) # shard parameterssharded_optimizer = fully_shard(optimizer) # shard optimizer states# During forward pass, full parameters are re-materialized# on demand via all-gather, then released after backward
Compared with traditional approaches that shard only gradients, full three-state sharding significantly reduces per-GPU peak memory usage — a key factor in keeping peak memory within a reasonable range during this test.
A Custom Communication Library for Intra-Node and Inter-Node Traffic
Collective communication across GPUs and nodes is handled by the accompanying communication library, covering primitives such as All-Reduce, All-Gather, and All-to-All. For MoE workloads, All-to-All communication efficiency often determines overall throughput; for FSDP, All-Gather bandwidth utilization affects the overhead of forward-pass parameter re-materialization. Overlapping communication with computation is a common optimization lever in these systems.
Two-Node, 16-GPU Validation: Data and Findings
The actual test used two servers with a total of 16 accelerator cards, configured as follows:
- Model sharding: 13 layers of the language backbone with 16 routed experts (Top-8 routing), while keeping the full 27-layer vision tower and cross-modal projection modules;
- Data and hyperparameters: An image-text QA dataset, a global batch size of 16, and a sequence length of 1024.
Key results:
| Metric | Value |
|---|---|
| Consecutive optimizer update steps | 400 steps, no interruption |
| Training loss (steps 21–70 average) | 8.9365 |
| Training loss (last 50 steps average) | 2.1802 |
| Validation loss (step 100) | 6.5297 |
| Validation loss (step 400) | 4.6873 |
| Peak sampled device memory | 44.80 GiB |
Three takeaways emerge from the data:
- Training loss dropped by more than 6 natural units while validation loss decreased in sync, indicating genuine convergence rather than an overfitting artifact.
- Running 400 steps without interruption demonstrates the system’s numerical stability over sustained execution.
- The vision branch participated in gradient updates, confirming that the multimodal joint training path was fully intact.
Engineering Lessons
- The bar for a successful adaptation should be “convergence + stability + full-chain gradients”, not merely getting the forward pass to run.
- Full sharding is the foundational technique for memory management in ultra-large models; communication library efficiency and operator coverage together determine practical usability.
- Moving from single-module validation to end-to-end training requires complete loss curves and memory observation data as delivery evidence.
This practice shows that the domestic compute stack is rapidly closing the gap in training adaptation capability for trillion-parameter multimodal models, offering a valuable reference for building a more diverse, heterogeneous AI compute ecosystem.
