Training Trillion-Parameter Multimodal Models on Domestic AI Accelerators: A FSDP2 Deep Dive
As large language models scale into the trillion-parameter era, training them requires overcoming memory walls, complex parallelism strategies, and full-stack software integration. This article examines how a 2.8-trillion-parameter flagship multimodal model was adapted for training on domestically developed AI accelerators, with a native FSDP2 training path built on a full training and inference software stack. Written from a vendor-neutral perspective, it covers the fundamental requirements of trillion-parameter training systems, the construction of a native FSDP2 multimodal training pipeline—from model loading and sharding schedules to gradient synchronization—and the engineering methodology for adapting training frameworks to non-mainstream hardware ecosystems.
Training Trillion-Parameter Multimodal Models on Domestic AI Accelerators: A FSDP2 Deep Dive
Introduction: The Adaptation Challenge in the Trillion-Parameter Era
As model parameter counts reach the trillion scale, training imposes unprecedented demands on underlying compute hardware, software stacks, and distributed training frameworks. Recently, an industry organization open-sourced a flagship multimodal model with 2.8 trillion parameters, and a domestic chip vendor announced that it had completed training adaptation for this model using its own training-and-inference AI accelerator card and accompanying software stack, building a native FSDP2 multimodal training path in the process.
This progress highlights a broadly significant technical question: how do you enable the complete training pipeline of an ultra-large multimodal model—from model loading and sharding schedules to gradient synchronization—on a non-mainstream hardware ecosystem? This article strips away specific vendor and product details and examines the problem from a general technical perspective.
1. What Trillion-Parameter Models Demand from Training Systems
1.1 The Memory Wall and the Inevitability of Parallelism
A 2.8-trillion-parameter model, even stored in BF16 half precision, requires nearly 5.6 TB for parameters alone. Add optimizer states (for Adam-style optimizers, typically more than 2x the parameter footprint) and gradients, and total memory demand reaches tens of terabytes. No single card or single node can hold this, so multi-level parallelism is mandatory:
- Data Parallelism (DP): Splits data across devices, with each device holding a full model replica. At trillion-parameter scale, pure data parallelism is no longer feasible and must be combined with parameter sharding.
- Tensor Parallelism (TP): Splits individual weight matrices across cards to reduce per-layer memory usage, but demands extremely high interconnect bandwidth.
- Pipeline Parallelism (PP): Splits the model by layers into stages forming a pipeline, well suited to scaling across nodes.
- Expert Parallelism (EP): For MoE architectures, distributes different experts across devices—a key technique for ultra-large sparse models.
1.2 The Evolution of Sharded Data Parallelism
The ZeRO family of techniques reshaped data parallelism: optimizer states, gradients, and even parameters themselves are sharded across the data-parallel group and re-aggregated on demand during forward and backward passes. FSDP (Fully Sharded Data Parallel) is the engineering realization of this idea in mainstream training frameworks. FSDP2, the newer generation, manages sharded parameters at a finer granularity, with key improvements including:
- Per-parameter sharding replaces whole-module sharding, making it easier to overlap communication with computation;
- A distributed tensor abstraction makes sharding semantics more transparent to user code and easier to combine with compiler optimizations and checkpointing;
- More flexible hybrid sharding (HSDP), which balances full sharding within a node against replica duplication across nodes, reducing cross-node communication pressure.
2. Building a Native FSDP2 Multimodal Training Path
2.1 Why “Native” Matters
A native path means the training framework runs directly on the operator libraries, communication libraries, and tensor abstractions provided by the underlying software stack, rather than executing indirectly through a heavy compatibility layer. The value of a native path lies in:
- Controllable performance: Eliminating the extra copies and synchronization overhead introduced by adaptation layers leaves more room to schedule compute-communication overlap;
- Debuggability: Call stacks are clean, so numerical discrepancies or performance regressions can be traced directly to the operator level;
- Long-term maintainability: Upgrading alongside upstream framework evolution costs less.
2.2 Three Critical Stages of the Complete Training Pipeline
Model loading: A trillion-parameter model cannot be instantiated on a single card and then distributed. Instead, use a “meta-device initialization + distributed loading” pattern—build the model structure on the meta device first, then have each data-parallel rank read its own shard of weights directly from shared storage. In practice, lazy loading is commonly combined with a sharded checkpoint format:
# Illustrative code: core logic of sharded loadingwith torch.device("meta"):model = build_model(config) # Build structure only; no memory allocatedload_sharded_checkpoint(model, ckpt_dir) # Each rank reads only its local shardfsdp2_wrap(model, mesh=device_mesh) # Shard according to the device mesh
Sharding schedule: The core task is partitioning the device mesh sensibly. A typical approach assigns GPUs within a node, connected by high-bandwidth interconnects, to tensor-parallel/sharding groups, while data-parallel replica communication across nodes runs over RDMA networks. For multimodal models, the vision encoder and the language backbone differ significantly in compute density, so it may be worth configuring different parallel dimensions for the two module types to avoid a straggler bottleneck.
Gradient synchronization: FSDP2 by default triggers gradient reduction (reduce-scatter) during backpropagation in the order parameters become ready, overlapping it with the remaining backward computation. Key tuning points include: setting a reasonable minimum sharding unit to balance communication frequency against overlap benefits; running gradient communication on a stream separate from computation to avoid mutual blocking; and, in multimodal scenarios, watching for tail latency in communication caused by large differences in gradient magnitudes.
2.3 The Specifics of Multimodal Data
Compared with pure text training, multimodal training adds data pipeline challenges: image/video samples are expensive to decode, sample lengths vary widely, and token ratios across modalities require dynamic balancing. Common practices include offloading preprocessing to dedicated data nodes, or pairing object storage with asynchronous prefetching so GPUs never sit idle waiting on I/O; during sequence packing, group by modality to reduce padding waste.
3. Engineering Methodology for Domestic Hardware Adaptation
3.1 The Three-Layer Structure of Software Stack Coordination
Completing this kind of adaptation on domestic AI hardware generally relies on coordination across three layers:
- Operator layer: Covers the core operators required for training (matrix multiplication, attention, normalization, MoE routing, etc.) with numerical precision consistent with reference implementations;
- Communication layer: Implements collective communication primitives (all-gather, reduce-scatter, all-to-all) with scheduling optimizations tailored to the custom interconnect topology—all-to-all communication for MoE is especially critical;
- Framework adaptation layer: Connects upward to the distributed backends of mainstream training frameworks, allowing advanced features like FSDP2 to land directly.
3.2 Standard Validation Steps
Adaptation is not the same as production readiness—systematic validation is required. First, numerical alignment: compare loss curves against reference hardware at small-scale configurations. Second, performance benchmarks: measure model FLOPs utilization (MFU) and linear scaling ratios. Finally, stability stress testing: during long-duration runs, monitor memory fragmentation, communication timeouts, and hardware health, supported by logging services and monitoring/alerting systems to catch anomalies promptly.
Conclusion
Training adaptation for a 2.8-trillion-parameter model is, at its core, a full-scale test of vertical integration across “framework—software stack—hardware.” The successful establishment of a native FSDP2 path shows that the key technologies for ultra-large multimodal training are maturing across diverse compute ecosystems. For enterprises and developers, understanding the general principles of sharded parallelism, communication scheduling, and data pipelines delivers far more long-term value than binding to any single platform—these capabilities apply equally well on any compute foundation.
