Trillion-Parameter Model Training Adaptation: Engineering Practices and Checklist
Training trillion-parameter multimodal models requires coordinated decisions across version compatibility, sharding strategy, data pipelines, communication, optimizer state, checkpointing, and scheduling. This article distills engineering practices from an accelerator-card adaptation exercise, with emphasis on FSDP2 sharding, communication-volume estimation, multimodal batching, optimizer-state reduction, asynchronous checkpointing, and overlap validation. It explains which hardware and software-stack metrics to verify before scaling up so teams can transfer the method to their own environments after completing the relevant checks.
Before Adaptation: What to Confirm
Training an open-source multimodal model at trillion-parameter scale cannot be solved by simply adding more cards. Doing so does not simultaneously address memory, communication, and stability issues. Adaptation usually proceeds in three steps: confirm model and framework versions, select a sharding strategy, and then validate throughput and accuracy with small-scale experiments.
This article uses a practice on a training-and-inference accelerator card as an example, but it does not name the specific model, cluster size, or official model parameter count because the source material lacks verifiable references for those details. Readers can transfer the method to their own environments after completing the checks at the end of this article.
Division of Responsibilities Between Hardware and Software Stack
A training-and-inference accelerator card must satisfy three categories of metrics at the same time: dense compute, memory capacity and bandwidth, and inter-card interconnect bandwidth. Training primarily depends on memory and interconnect, while inference places more weight on latency. To judge whether a card is suitable for large-model training, list the following metrics in a table for item-by-item comparison: per-card BF16 compute, memory capacity, memory bandwidth, intra-node interconnect bandwidth, and inter-node network bandwidth. These figures should come from vendor specification documents and include test conditions.
The software stack sits between the training framework and the hardware and usually includes three parts: the compiler and runtime, operator libraries, and a collective communication library. The compiler maps operators to hardware instructions, and the runtime manages the memory pool and kernel scheduling. Operator libraries provide implementations for matrix multiplication, attention, normalization, and similar operations. The collective communication library handles operations such as All-Reduce, All-Gather, and Reduce-Scatter.
During adaptation, confirm that the versions of all three parts match the PyTorch version. When versions do not match, a common symptom is that some operators fall back to inefficient implementations. Training may still run, but throughput is noticeably low.
The parallel computing software stack used in this practice is referred to as MUSA in this article. The term compute stream refers to the stream mechanism provided by that software stack. CUDA is used only as an analogy here; both use streams to represent asynchronous execution queues.
FSDP2 Sharding and How It Differs from Pipeline Parallelism
FSDP2 is PyTorch’s second-generation fully sharded data parallel approach. It shards each parameter along dimension 0 across data-parallel processes. Each process holds only its own parameter shard, the corresponding gradients, and optimizer state. During forward computation, the required parameters are temporarily reconstructed into a full tensor via All-Gather. After backward computation, gradients are distributed via Reduce-Scatter, and each process keeps only its own shard.
The difference from pipeline parallelism lies in the dimension being split. Pipeline parallelism splits by layer: different devices handle different layers, and activations are passed between layers. FSDP2 splits by parameter tensor: each device participates in the computation of all layers, but fetches the required parameters before each computation. The two can be combined. For example, first split layers with pipeline parallelism, then use FSDP2 to shard parameters within each pipeline stage.
The communication volume after sharding can be estimated. Let the total number of model parameters be P, the number of bytes per parameter be b, and the number of data-parallel processes be N. With a ring algorithm, the communication volume per process is approximately as follows:
- Standard data parallel (DDP) All-Reduce per step: approximately 2·P·b·(N−1)/N
- FSDP2 per step, combining forward All-Gather, backward All-Gather, and gradient Reduce-Scatter: approximately 3·P·b·(N−1)/N
Therefore, without activation recomputation, FSDP2 communication bytes are about 1.5 times those of DDP. In exchange, memory for parameters, gradients, and optimizer state on each card drops substantially. With activation recomputation enabled, the backward phase adds another All-Gather, and communication volume increases accordingly.
This estimate shows one point: the communication bytes per process are only weakly related to the number of processes N and remain roughly stable as N increases. They do not decline logarithmically with the number of cards. Bytes are also not the same as time. Actual time also depends on bandwidth, latency, network topology, and whether communication can overlap with computation.
Design Points for Multimodal Data Pipelines
In multimodal input, samples such as text and images vary greatly in length and compute. If fixed batch sizes are used, the loads on the visual encoder and language decoder can become imbalanced, and some cards may wait for long periods. A common approach is to bucket by modality and length, placing samples with similar compute into the same batch.
A dynamic batch composer can adjust batch size according to the memory watermark. Before launch, configure three parameters: the target memory watermark (for example, keeping it below 85% of peak), the upper and lower bounds for batch size, and the fallback policy when memory exceeds the threshold (reduce batch size, or skip the current batch and log it). These thresholds should be determined in small-scale experiments and should not be copied directly from others’ values.
Declarative data configuration can put the modality list, bucketing rules, and sampling weights in the same configuration file for reproducibility. Each experiment should record the hash of the configuration file so that the data version can be traced later.
Gradient Synchronization and Optimizer States
Synchronous blocking gradient synchronization requires all processes to complete backward computation and then perform a single All-Reduce. Communication is concentrated at the same point in time and can easily cause congestion. FSDP2 splits gradient communication across layers during backward, completing Reduce-Scatter layer by layer so that communication can overlap with the computation of subsequent layers.
Optimizer state is one of the main consumers of memory. With Adam, for example, if parameters and states both use FP32, the optimizer state per parameter is about 8 bytes (4 bytes each for the first and second moments). Adam-mini and 8-bit optimizers can reduce this overhead. Adam-mini stores only one second-moment scalar per parameter block, significantly reducing state. 8-bit optimizers quantize state to 8-bit storage, using about 2 bytes per parameter plus a small number of scaling factors. Both methods may affect convergence speed and final accuracy, so they need to be compared step by step against the baseline loss curve.
In FSDP2, optimizer state and the corresponding parameter shard are placed on the same process by default. Each process updates only the parameters it holds and does not need to gather the full state during the optimizer step.
Checkpoints and Resume Training
The training cycle for trillion-scale models is often measured in weeks. Checkpoint design must satisfy two goals at the same time: minimize the number of training steps lost after a failure, and avoid slowing down training during normal saves.
The practice in this article uses two-level checkpointing. The first level periodically saves to persistent storage. The save interval is set according to training duration and node failure rate, for example, every few hours. The second level writes temporary checkpoints to local high-speed non-volatile storage at a higher frequency and keeps only the most recent copies. When a node fails, restore from the local checkpoint first; if no usable copy is found, fall back to persistent storage.
Asynchronous saving requires that the write process does not block training steps. Each save should write a checksum, and the checksum should be compared before restore to avoid using corrupted files for recovery.
The recovery flow needs to be rehearsed regularly. At minimum, run a complete “save, terminate process, restore, continue training” cycle on a small model, and confirm that the training step, learning rate, data read position, and random seed after recovery match those before the failure, and that the loss curve is continuous.
Overlapping Computation and Communication
Split communication operators into microbatches and execute them on a separate communication stream. The compute stream can then process the next microbatch while waiting for gradients.
To verify whether overlap actually takes effect, use profiling tools to inspect the timeline. Focus on whether the time periods of the compute stream and communication stream overlap, and on the share of communication wait time in a single step. If the wait share remains high, check the network topology configuration, communication bucket size, and parameter prefetch settings in that order.
Scheduling Heterogeneous Nodes
Even when the card model is the same, nodes may differ in cooling conditions and power consumption. When individual nodes slow down, the overall speed of synchronous training is dragged down by them.
A scheduler can continuously monitor each node’s temperature and power consumption.
