Training a Trillion-Parameter Multimodal Model on a Domestic AI Computing Platform
This article examines the engineering work required to adapt a 2.8-trillion-parameter open-source multimodal model to a domestic AI computing platform. It focuses on the native FSDP2 training path, distributed model loading, multidimensional parallelism, communication optimization, software-stack integration, and the stability practices required for long-running large-scale training. The implementation demonstrates a reusable approach for training trillion-parameter MoE models on alternative hardware platforms.
Training a Trillion-Parameter Multimodal Model on a Domestic AI Computing Platform
1. Background: Adaptation Challenges from Extremely Large Open-Source Models
Open-source large models have continued to grow in parameter count, and flagship models with trillions of parameters are now entering the public spotlight. These models commonly use a Mixture-of-Experts (MoE) architecture. Although the total number of parameters is enormous, only a subset of experts is activated during each forward pass. This approach increases model capacity while keeping inference costs under control.
A recently released flagship multimodal model from an open-source community has approximately 2.8 trillion total parameters, making it a major focus of industry attention.
This rapid increase in model scale places unprecedented demands on training infrastructure:
- Memory capacity: Even with low-precision training, model weights, optimizer states, and gradients for a trillion-parameter model require hundreds of accelerators to work together.
- Communication overhead: Expert parallelism introduces All-to-All communication, while data parallelism requires gradient synchronization. Both place significant demands on cluster bandwidth and topology awareness.
- Software-stack maturity: Whether a model can run efficiently and reliably on a target computing platform depends on the completeness of the entire software stack, from operator libraries to distributed training frameworks.
Against this background, a domestic GPU vendor announced that it had completed training adaptation for the trillion-parameter open-source model on its flagship integrated AI training and inference accelerator and proprietary software stack.
The engineering value of this achievement deserves close examination. It indicates that domestic computing hardware can support training at the scale of leading large models, while also providing a reference methodology for future domestic large-model training projects.
2. Core of the Adaptation: A Native FSDP2 Path for Multimodal Training
The most important technical result of the adaptation was the construction of a native FSDP2 path for multimodal training. This path connects the complete workflow, including model loading, shard scheduling, and gradient synchronization.
2.1 Why FSDP2?
Fully Sharded Data Parallel (FSDP) is one of the primary parallelism strategies for training extremely large models. Its core principle is to fully shard model parameters, gradients, and optimizer states across a data-parallel group. Each compute node stores only approximately 1/N of the complete state, and the parameters required for computation are temporarily gathered through collective communication.
Compared with conventional data parallelism, FSDP reduces memory usage from one complete copy of the model per accelerator to one shard per accelerator. This makes it essential for training very large models.
Compared with the first-generation approach, FSDP2 provides several important improvements:
- It uses per-parameter sharding instead of flattened parameter management. The finer granularity makes it easier to combine FSDP with tensor and expert parallelism.
- Its more flexible streaming scheduler improves the overlap between communication and computation.
- It provides more native support for mixed-precision training and activation checkpointing.
For MoE models, FSDP2’s fine-grained sharding is particularly valuable. Attention layers and feed-forward expert layers can use different sharding and parallelism strategies, avoiding the memory waste or communication amplification that can result from applying one strategy uniformly to the entire model.
2.2 Model Loading: Sharded Initialization and Memory Planning
A trillion-parameter model cannot be fully instantiated on a single accelerator. The first step in the training pipeline is therefore distributed model loading. Typical engineering practices include:
- Initialization on the meta device: Build the model structure on a virtual device without allocating accelerator memory, while determining parameter shapes and sharding strategies.
- Sharded loading: Each node reads only the weight shards assigned to it directly from persistent storage, such as a high-speed file system backed by object storage. This avoids the memory spike caused by loading the entire model before partitioning it.
- Deferred materialization and validation: After loading, perform cross-node consistency checks to verify that the shards can be assembled correctly.
This stage is also sensitive to storage I/O bandwidth. In practice, parallel file systems and multithreaded prefetching are typically used to keep model-loading time within an acceptable range.
2.3 Shard Scheduling: Combining Multiple Parallelism Dimensions
Data-parallel sharding alone is not sufficient for training an MoE model. Multiple parallelism dimensions generally need to be combined:
- Data parallelism with FSDP sharding: Handles the memory pressure from most model parameters.
- Expert parallelism (EP): Distributes different experts across nodes and exchanges tokens through All-to-All communication during the forward pass.
- Tensor parallelism (TP): Splits very large matrices by rows or columns within a single machine and uses high-speed intra-node interconnects.
- Pipeline parallelism (PP): Splits the model by layers to further reduce memory consumption on each node.
The main challenge is that these dimensions constrain one another. For example, expert-parallel All-to-All communication is sensitive to inter-node bandwidth and should preferably be coordinated with, rather than compete directly against, intra-node tensor parallelism. Pipeline-parallel bubble overhead must be controlled by adjusting the number of micro-batches.
The adaptation team must therefore tune the strategy against the target hardware topology, including intra-node interconnect bandwidth and the inter-node network architecture. Extensive parameter searches and measurements are required to find the best balance between throughput and memory usage.
2.4 Gradient Synchronization: Overlapping Communication and Computation
After backpropagation, FSDP synchronizes sharded gradients through Reduce-Scatter. At trillion-parameter scale, the communication volume is extremely large. Without optimization, communication can account for a significant portion of each training step.
Common optimization methods include:
- Bucketing: Group gradients by layer and start communication as soon as each bucket is ready, allowing communication to overlap with ongoing backward computation.
- Gradient compression: Use lower-precision gradient communication in bandwidth-constrained environments to balance communication cost against numerical accuracy.
- Topology-aware communication: Adjust communication groups according to the hierarchy of the cluster, keeping high-volume traffic on faster intra-node links whenever possible.
2.5 Additional Complexity in Multimodal Training
The adapted model is multimodal. In addition to the language backbone, it includes heterogeneous components such as a vision encoder. A multimodal training path must also address:
- Preprocessing pipelines for different modalities and dynamic batch construction;
- Gradient flow and freezing strategies between the vision encoder and the language backbone;
- Load imbalance caused by differences in compute density across components, requiring targeted compensation in sharding and scheduling.
3. Software-Stack Coordination: Full-Stack Support from Operators to Frameworks
Training adaptation is not merely a matter of configuring the distributed framework. It requires coordination across the entire software stack:
- Operator libraries: Key operators such as MoE routing, grouped GEMM, and attention require high-performance implementations for the target hardware. Their numerical behavior must also align with mainstream implementations to avoid differences in model convergence.
- Communication libraries: Collective operations such as AllGather, Reduce-Scatter, and All-to-All must be deeply optimized for the hardware interconnect topology.
- Compilation and graph optimization: Operator fusion and memory planning can reduce runtime overhead through compile-time optimization.
- Framework adaptation layers: Compatibility with the distributed APIs of mainstream training frameworks allows model code to be migrated at lower cost and is critical for reducing adaptation effort.
The native FSDP2 training path became practical because the stack formed a complete loop from low-level operators to high-level frameworks, rather than relying on a large number of temporary compatibility patches.
4. Stability and Efficiency in Production-Scale Training
Training an extremely large model can run for weeks, making stability just as important as performance. Based on common industry practices, the following areas require particular attention:
- Checkpoint and resume: Save sharded checkpoints periodically and support recovery when the size of a heterogeneous cluster changes.
- Failure monitoring and automatic removal: Combine logging and monitoring systems to detect hardware failures and automatically isolate and replace affected nodes.
- Performance profiling: Use profiling tools to identify communication bottlenecks, memory fragmentation, and operator hotspots, then optimize the system iteratively.
- Numerical stability validation: First verify that loss curves remain aligned on a small cluster before scaling to the full training configuration. This helps prevent accuracy problems from appearing only after large-scale training has already begun.
5. Conclusion
Adapting a trillion-parameter open-source model is a rigorous test of an AI computing platform’s combined hardware and software capabilities.
By building a native FSDP2 path for multimodal training and connecting model loading, shard scheduling, and gradient synchronization, the domestic integrated training and inference platform demonstrated the feasibility of using domestic computing resources for training models at the highest scale.
For developers and enterprise users, the value of this work goes beyond simply getting the model to run. It establishes a reusable methodology centered on fine-grained sharding, supported by multidimensional parallelism and reinforced by hardware-software coordination.
As open-source models continue to grow and domestic AI computing ecosystems mature, adaptation experience of this kind will become an important reference when organizations evaluate infrastructure for large-model training.
