Trillion-Parameter Multimodal Training on Domestic AI Compute: Adaptation Practices
Training trillion-parameter multimodal models on heterogeneous compute, especially domestic AI chips, requires full-stack adaptation rather than simple model porting. Using a recent case in which a domestic GPU vendor adapted a 2.8-trillion-parameter flagship multimodal model, this article outlines a general methodology for training adaptation on domestic compute. It covers the memory and communication pressures of trillion-parameter training, the complexity of multimodal data flows, and software stack maturity; describes a native FSDP2 sharding path; examines model loading, sharding scheduling, and gradient synchronization; and discusses multimodal sequence management and numerical stability. It concludes with implications for the domestic AI compute ecosystem.
In recent years, as trillion-parameter multimodal large models have been open-sourced one after another, how to achieve efficient and stable training adaptation on heterogeneous compute, especially domestic AI chips, has become a focus of the industry. Using the recent case in which a domestic GPU vendor completed training adaptation for a 2.8-trillion-parameter flagship multimodal model as background, this article abstracts a general methodology for “training adaptation of ultra-large models on domestic compute” for engineers working on large-model training and infrastructure.
1. Background: Challenges of Trillion-Parameter Multimodal Training for the Compute Stack
Training a trillion-parameter model is far more than a matter of having enough GPU memory. It places systemic requirements on the entire compute stack:
- Dual pressure on memory and communication. A single card cannot hold full copies of model parameters, gradients, and optimizer states, so sharding and parallelism strategies are mandatory. At the same time, the high-frequency communication introduced by parameter sharding places strict demands on inter-card and inter-node interconnect bandwidth.
- Complexity of multimodal data flows. Compared with text-only training, multimodal training must handle the encoding and alignment of images, text, and other modalities at the same time. The complexity of data preprocessing, sequence packing, and variable-length batch scheduling rises significantly.
- Software stack maturity. The coordination among training frameworks, operator libraries, compilers, and drivers must be sufficiently complete. Otherwise, even if hardware specifications meet the requirements, actual training efficiency will be greatly reduced.
Therefore, the essence of “completing training adaptation” is to connect the full chain from low-level operators to high-level training strategies, rather than simply porting a model.
2. Core Technical Paths for Training Adaptation
1. Native FSDP2 sharded training strategy
Fully sharded data parallelism (FSDP) is one of the mainstream approaches for current ultra-large-scale model training. “Native FSDP2” generally refers to a training path built on the new-generation sharding interfaces of a training framework. Its core advantages include:
- Finer-grained sharding control: sharding granularity can be flexibly specified by module, such as attention layers, feed-forward layers, and embedding layers, balancing memory usage and communication overhead;
- Deep coordination with mixed-precision training: parameters participate in computation in low precision, while master weights are maintained in high precision, balancing efficiency and numerical stability;
- Support for offload strategies: when GPU memory is tight, optimizer states or parameters can be offloaded to host memory as an elastic fallback.
A simplified sharding configuration example is shown below:
from torch.distributed.fsdp import fully_shard, MixedPrecisionPolicymp_policy = MixedPrecisionPolicy(param_dtype=torch.bfloat16,reduce_dtype=torch.float32,)for block in model.transformer_blocks:fully_shard(block, mesh=sharding_mesh,mp_policy=mp_policy)fully_shard(model, mesh=sharding_mesh)
By applying sharding layer by layer, the training system can precisely control communication timing and recomputation strategies for each layer, which is essential at trillion-parameter scale.
2. Three key stages in the complete training chain
The complete training chain “from model loading and sharding scheduling to gradient synchronization” is exactly where adaptation work is most prone to problems:
(1) Model loading. Weight files for trillion-parameter models are usually measured in TB. The loading stage needs to support sharded loading, tensor-parallel mapping, and parallelized data type conversion; otherwise, loading alone may take hours. A common engineering practice is to read weights directly according to the sharding layout, combined with streaming loading and verification mechanisms, to avoid full intermediate materialization.
(2) Sharding scheduling. Multimodal models often consist of a vision encoder, a language model backbone, and alignment modules, and different modules differ greatly in parameter scale and computational characteristics. A reasonable scheduling strategy needs to use device mesh abstraction to orchestrate data parallelism, tensor parallelism, and pipeline parallelism in a unified way, ensuring load balance across devices.
(3) Gradient synchronization. In FSDP mode, gradients are reduced and sharded layer by layer during backpropagation. The degree of communication-computation overlap directly determines training throughput. Typical optimizations include gradient bucketing, communication-computation pipeline overlap, and compressed communication strategies for low-bandwidth links.
3. Data and compute characteristics of multimodal training
Multimodal training also needs to address two additional classes of problems:
- Heterogeneous sequence length management: after image tokens and text tokens are mixed, sequence lengths within a batch fluctuate widely. Sequence packing and dynamic batch scheduling can greatly reduce compute waste caused by padding;
- Numerical stability of modality alignment: gradient magnitudes across modalities may differ significantly, requiring gradient clipping, loss normalization, and other methods to ensure training convergence.
3. Implications for the Domestic AI Compute Ecosystem
From this type of adaptation practice, several conclusions of general significance to the industry can be drawn:
- The software stack is the moat. A unified heterogeneous-computing programming interface, comprehensive operator coverage, and mature training-framework adaptation are prerequisites for domestic chips to support large-model training. Any missing link will be amplified at trillion-parameter scale.
- Integrated training-and-inference architecture reduces migration cost. When training and inference share the same set of cards and software stack, the path from model development to deployment becomes smoother, reducing the engineering burden of cross-platform migration.
- Open-source models are a natural validation ground. Flagship open-source models impose extremely high compatibility requirements on software and hardware. Whether their training pipeline can run stably is the most direct test of the completeness of a domestic compute stack.
4. Conclusion
Training adaptation for trillion-parameter multimodal models is a systems engineering effort spanning models, frameworks, communication, operators, and hardware. Using the native FSDP2 sharding path as the main line and connecting model loading, sharding scheduling, and gradient synchronization into a complete chain is a key step toward enabling domestic compute to support ultra-large-scale training. As the software stack continues to mature and best practices for multimodal training accumulate, the usability and cost-effectiveness of domestic AI compute in large-model training will improve further, providing a more solid technical foundation for compute diversification in the industry.
