Trillion-Parameter Multimodal Model Training on a Homegrown AI Accelerator Cluster: A Practice Report
This article examines how a 2.8-trillion-parameter native multimodal model was adapted to run on a 16-card homegrown AI accelerator cluster across two nodes. It covers the main challenges posed by ultra-long context, hybrid attention, and MoE routing; the integration of attention computation, dynamic routing, visual encoding, and cross-modal projection into a complete training loop; FSDP2-based sharding and cross-node communication; and a 400-step validation run. The run completed without numerical overflow or abnormal interruption, showed clear loss reduction, and verified nonzero gradients and parameter updates in the vision branch. The article also summarizes four performance optimizations and a reusable engineering path that prioritizes pipeline correctness, then stability, then performance.
Trillion-Parameter Multimodal Model Training on a Homegrown AI Accelerator Cluster: A Practice Report
As open-weight large multimodal models continue to emerge, enabling a complete training pipeline on non-mainstream homegrown GPU compute platforms has become a core engineering problem for large-model infrastructure teams. A recent adaptation effort for a native multimodal model with approximately 2.8 trillion total parameters, trained on homegrown training-and-inference integrated AI accelerator cards, provides a useful reference point. On a two-node, 16-card cluster, the system completed 400 consecutive training steps with no numerical overflow or abnormal interruption, and the vision branch received real gradient updates. This article uses that practice as a thread to break down the key technical challenges and engineering implementation methods.
1. Why This Type of Model Places Higher Demands on the Training Platform
The target model for this adaptation has three notable characteristics, each of which directly increases pressure on the underlying compute platform.
First, ultra-large-scale parameters and ultra-long context. The model has approximately 2.8 trillion total parameters and supports context lengths of up to 1 million tokens. This means that even with a sparse activation architecture, memory usage, parameter sharding, and communication overhead in a single training step far exceed those of conventional dense models.
Second, hybrid attention mechanisms. The model combines linear attention with gated sparse attention, including a dynamic sparse retrieval process. These non-standard attention operators often do not have ready-made, deeply optimized kernels, so high-performance operators must be reimplemented for the hardware instruction set; otherwise, they become a bottleneck for overall throughput.
Third, MoE architecture and native multimodal capabilities. The model uses a mixture-of-experts architecture and has visual understanding and tool-calling capabilities. Training involves dynamic load balancing for expert routing, joint forward computation over image-text data, and parameter updates for the cross-modal projection module. This tests not only per-card compute, but also communication scheduling across multiple cards and the software stack’s ability to orchestrate complex training workflows.
Overall, the essence of the adaptation work is to enable a software stack designed for new hardware to correctly, stably, and efficiently carry a composite workload of “dynamic sparse retrieval + expert routing + joint image-text training.”
2. Overall Technical Path for Training Adaptation
2.1 Modular Integration into a Unified Training Pipeline
The adaptation work centers on four core modules: attention computation, dynamic routing, visual encoding, and cross-modal projection. From an engineering perspective, this is not simply a matter of replacing operators. Instead, these modules are integrated into a complete loop covering forward propagation, backward propagation, and parameter updates, ensuring that each part can be differentiated correctly under the automatic differentiation framework and remains compatible with distributed sharding strategies.
2.2 Memory Management Based on Fully Sharded Data Parallelism
The training scheme retains the native pipeline of a mainstream large-model training framework. Through a new-generation fully sharded data parallelism strategy (FSDP2), model parameters, gradients, and optimizer states are distributed across different GPUs. Compared with traditional data parallelism, the fully sharded strategy allows each card to hold only a 1/N shard of the parameters, fundamentally alleviating the “cannot fit on a single card” problem of trillion-parameter models. At the same time, FSDP2 offers more flexible sharding granularity and communication scheduling, making it easier to combine with strategies such as expert parallelism.
2.3 Cross-Card and Cross-Node Communication
Parameter aggregation and gradient synchronization across multiple cards and nodes are handled by a dedicated collective communication library. For MoE models, the All-to-All communication pattern introduced by expert routing places additional requirements on the communication library’s topology awareness and bandwidth utilization. Targeted optimization is needed at the communication scheduling level to avoid compute idle time caused by a lack of overlap between communication and computation.
3. Actual Configuration and Validation Results on Two Nodes with 16 Cards
3.1 Experimental Configuration
The actual validation environment consisted of two servers with a total of 16 training-and-inference integrated AI accelerator cards. The model used a trimmed configuration: a 13-layer language backbone, 16 routed experts (Top-8 routing), and a fully retained 27-layer vision tower and cross-modal projection module. The training data was a medical visual question answering image-text dataset, with a global batch size of 16 and a sequence length of 1024.
It is important to note that this validation used a randomly initialized trimmed model configuration. The goal was to verify the functional correctness and runtime stability of the training pipeline, not to pursue convergence results from full-scale pretraining. This is a standard practice in large-model engineering adaptation: first establish the pipeline at a controllable cost, then gradually scale it up.
3.2 Training Stability and Convergence Metrics
All 16 training processes completed 400 consecutive optimizer updates without any numerical overflow or abnormal interruption. Key metrics were as follows:
- Training loss: The average from steps 21 to 70 was 8.9365, and it dropped to 2.1802 over the last 50 steps, showing a clear convergence trend.
- Validation loss: It decreased from 6.5297 at step 100 to 4.6873 at step 400, consistent with the training loss trend and ruling out a false appearance of overfitting.
- Memory usage: The device-sampled peak memory was 44.80 GiB, within a reasonable range for single-card capacity, indicating that the sharding strategy and memory management were effective.
3.3 Evidence That the Vision Branch Participated in Training
A common hidden problem in multimodal training is that the vision branch appears to be in the data flow but does not actually participate in parameter updates because gradients are disconnected. To address this, the technical team checked the image embedding layer, the first and last layers of the vision tower, and the cross-modal projection module one by one, confirming that these modules produced nonzero gradients and completed parameter updates. This validation approach is worth adopting: for any multimodal training adaptation, gradient checks should be used—not merely observed loss decreases—to confirm the real participation of each branch.
4. Key Performance Optimizations
Beyond establishing the basic pipeline, this practice also completed four important optimizations:
- Coordination between FSDP2 and expert parallelism: The parameter sharding strategy was made to work correctly with MoE expert parallelism, resolving sharding conflicts and communication amplification when the two parallelism strategies are stacked.
- Parameter prefetching and gradient communication scheduling: By overlapping computation and communication in a pipeline, cross-card synchronization latency is hidden and overall training throughput is improved.
- High-performance linear attention operator: The core operator in the hybrid attention mechanism was optimized at a low level to eliminate operator-level performance bottlenecks.
- Chunk Loss: Loss computation under a large vocabulary was executed in chunks, significantly reducing the instantaneous memory peak of the output layer. This optimization was actually enabled in the 400-step test, and the other three were also adapted and can be used directly in larger-scale training configurations.
5. Implications for Industry Practice
This adaptation work reveals a reusable engineering path: when facing the “double new” of a new hardware platform and a new model architecture, teams should follow a progressive strategy of “pipeline correctness first, stability second, performance optimization last.” First, use a trimmed configuration to verify the numerical correctness of the full forward and backward pipeline and the gradient connectivity of each branch. Then, verify stability through long continuous runs. Finally, add parallel strategy coordination, communication scheduling, and operator optimization to improve efficiency.
For teams that want to conduct large-model training on diverse compute bases, the maturity of the homegrown AI computing software and hardware ecosystem is improving rapidly. Whether building a self-managed cluster or using general cloud GPU compute, object storage, container platforms, and monitoring and alerting services to set up a training environment, the methodology above applies equally. Training trillion-parameter multimodal models is moving from a capability exclusive to a few leading teams toward a regular technical practice that more engineering teams can plan and implement.
