Trillion-Parameter Multimodal Training with Native FSDP2: Adaptation Practices
This article explains how trillion-parameter multimodal models can be trained efficiently on diverse AI compute hardware using a standardized FSDP2 path. It reviews the core memory, communication, and engineering challenges; describes a completed adaptation of a 2.8-trillion-parameter multimodal model on unified training-and-inference accelerator cards; and details practical work across model loading, module-level sharding, gradient synchronization, checkpointing, and observability. It also discusses the value of hardware adaptation and likely future directions for large-model training systems.
As the open-source community continues to release flagship multimodal models with trillion-level parameters, adapting such models for training on general-purpose AI compute hardware has become one of the central engineering problems in large-model deployment. Recently, a research institution open-sourced a multimodal flagship model with 2.8 trillion parameters. In parallel, training adaptation based on unified training-and-inference AI accelerator cards and a supporting software stack was completed, and a native FSDP2 multimodal training path was built. The work covers the full training链路 from model loading and sharding调度 to gradient synchronization, providing a practical reference model for the industry: trillion-parameter training does not have to depend on a single hardware ecosystem. With a standardized software stack and parallel strategy, such models can run efficiently on diverse compute foundations. This article systematically breaks down the key steps and best practices in this training adaptation.
1. Core Challenges in Trillion-Parameter Model Training
When model parameter count enters the trillion level, the pressure on the training system is no longer just a question of whether there is enough compute. It becomes a systemic challenge across memory, communication, and scheduling.
The first issue is the memory wall. For a trillion-parameter model, even with BF16 half-precision storage, model weights alone require roughly 2 TB of memory. Adding optimizer states—Adam-family optimizers typically keep both momentum and second-moment floating-point states—gradients, and activations generated during forward propagation, the overall memory requirement is often more than ten times the size of the weights themselves. Since a single card usually has only tens of GB of memory, large-scale multi-card parallelism is required to hold the complete training state.
The second issue is the communication bottleneck. In distributed training, gradient synchronization, parameter aggregation, and cross-device activation transfer all generate substantial communication overhead. When the number of participating cards scales to hundreds or even thousands, communication time can account for a significant share of each training step. The communication topology design and the choice of synchronization algorithm directly determine overall cluster throughput.
The third issue is engineering complexity. Multimodal models usually contain multiple heterogeneous submodules, such as a vision encoder, a cross-modal alignment module, and a large language model backbone. These submodules differ significantly in compute density, memory footprint, and update frequency. A single uniform parallel partitioning strategy is difficult to apply directly, so fine-grained sharding and scheduling design is required.
2. FSDP2: A Sharded Training Paradigm for Very Large Models
FSDP, or Fully Sharded Data Parallel, is one of the mainstream paradigms for training very large models. Its core idea is to stop storing a complete model replica on every card. Instead, model parameters, gradients, and optimizer states are all sharded across every device in the data-parallel group, with each card holding only 1/N of the state. During computation, full parameters are temporarily aggregated on demand through collective communication such as AllGather, and immediately released after computation through resharding. This reduces memory usage to a level inversely proportional to cluster size.
Compared with earlier implementations, the new-generation FSDP2 approach has several key improvements, which are also why this training adaptation chose to build a native FSDP2 path.
First, it replaces concatenated flattened parameters with a per-device, per-shard tensor abstraction. Early implementations often flattened and concatenated large numbers of parameters before sharding. Although this simplified communication management, it introduced inconvenience for in-place parameter operations, checkpoint saving, and loading. Under the new paradigm, each shard is an independent tensor, making parameter initialization, state-dict management, and per-parameter optimizer configuration more natural.
Second, communication and computation are explicitly overlapped and scheduled. During forward propagation, parameters for the next layer can be prefetched. During backward propagation, gradient reduction through ReduceScatter can run in parallel with backward computation for subsequent layers. With reasonable scheduling, communication can be hidden beneath computation, significantly reducing the impact of communication on end-to-end throughput.
Third, it supports more flexible hybrid sharding strategies. Within a cluster, high-bandwidth intra-node devices can form a sharding group to carry parameter partitioning, while cross-node communication uses replication. This “sharding plus replication” hybrid parallelism balances memory savings against communication overhead.
3. Key Build Points for a Native FSDP2 Multimodal Training Path
Building a complete training link from model loading to gradient synchronization requires solid engineering work in four areas.
1. Model Loading and Parameter Initialization
Weight files for trillion-parameter models are usually measured in TB, so the loading stage itself is a performance hotspot. In practice, lazy initialization should be used—for example, building the model structure with meta tensors first without occupying real memory—together with distributed sharded loading. Each process reads only the shard data it is responsible for from storage, avoiding the waste of “read the full model on every card and then trim it.” After loading, the FSDP2 sharding interface partitions parameters in place across devices. Checkpoint saving should also use sharded writes: each process writes only the shards it holds to disk and maintains global metadata to support elastic recovery and re-sharding after changes in parallelism.
2. Sharding and Scheduling of Multimodal Submodules
The heterogeneity of multimodal models requires a divide-and-conquer scheduling strategy. Modules with fewer parameters but high compute intensity, such as the vision encoder, can use replication instead of sharding to reduce unnecessary communication. The language model backbone, by contrast, should follow FSDP2 full sharding strictly. At the same time, different precision strategies and activation checkpointing switches can be configured at module granularity. For backbone layers under heavy memory pressure, activation checkpointing can be enabled to trade a small amount of extra computation for a substantial reduction in activation memory. For small compute-intensive modules, recomputation can be disabled to maintain throughput. In addition, batch preprocessing and augmentation should be pipelined on the data-loading side as much as possible to avoid blocking the main training loop.
3. Gradient Synchronization and Optimizer Updates
Under the FSDP2 path, gradients are reduced and sharded within the shard group through ReduceScatter, and each card aggregates only the gradients corresponding to its own parameter shard. Two engineering details deserve attention. The first is the timing of gradient reduction: it should overlap with backward computation as much as possible, usually by launching communication in batches organized as buckets. The second is numerical stability under mixed precision. Gradient communication can use lower precision to compress bandwidth, but the optimizer’s master weight update should be performed on a high-precision copy, together with dynamic loss scaling to prevent underflow. Optimizer states are also stored with the parameter shards, so each card maintains only 1/N of the momentum and second-moment states. This is a key reason memory usage can be compressed.
4. Training Stability and Observability
Training very large models often takes weeks or even months, and any interruption is costly. In practice, checkpoints should be saved periodically and asynchronously so that disk writes do not block training. A monitoring and alerting system should cover memory, communication time, gradient norm, and loss curves. Automatic circuit-breaker and rollback mechanisms should be set up for anomalies such as gradient spikes and loss divergence. Complete random states—including data order and dropout seeds—should be recorded so that training can resume precisely after failure recovery.
4. Adaptation Value of a Unified Training-and-Inference Compute Foundation
The value of unified training-and-inference AI accelerator cards lies in unifying the hardware and software stacks for both training and inference. Combined with a self-developed compatibility-layer software stack, this can greatly reduce the cost of ecosystem migration. For developers, the key to adaptation is not rewriting model code. Instead, it is ensuring that framework-level distributed primitives—collective communication and tensor sharding—have high-performance implementations on the target hardware; verifying the numerical correctness and performance of key operators such as attention, normalization, and mixed-precision matrix multiplication; and adjusting sharding strategies and batch sizes for hardware characteristics such as memory bandwidth, interconnect topology, and compute-unit ratios. Once these foundational capabilities are in place, standardized parallel paradigms such as FSDP2 can be deployed smoothly, with almost no changes to upper-layer training scripts.
From a broader perspective, this also confirms an industry trend: the coupling between models and hardware is being decoupled through standard software stacks. For teams that want to build their own compute systems, a training platform can be built on general container platforms, object storage, and monitoring and alerting capabilities. Model code, parallel strategy, and the hardware adaptation layer can be clearly layered, preserving full flexibility in compute selection.
5. Conclusion and Outlook
Training adaptation for trillion-parameter multimodal models is essentially a coordinated battle across memory, communication, and engineering complexity. The native FSDP2 training path provides a mature paradigm for efficient training of very large models on diverse compute foundations through full sharding of parameters, gradients, and optimizer states, combined with communication-compute overlap, module-level scheduling, and sharded checkpoint management. The completed link from model loading and sharding scheduling to gradient synchronization validates the feasibility and generality of this paradigm. In the future, as model scale continues to grow and multimodal capabilities become more deeply integrated, training systems will evolve further toward automated parallel strategy search, elastic fault-tolerant training, and hardware-software co-optimization. Developers who understand these core principles will retain the underlying ability to migrate and adapt across changing systems.
