Training a 2.8-Trillion-Parameter Model: Key Engineering Considerations for Infrastructure Adaptation

    This article estimates the memory, device-count, and network-bandwidth requirements for training a 2.8-trillion-parameter dense model, explains FSDP2 sharding mechanics and gradient-synchronization overlap constraints, and highlights engineering assumptions that should be validated on the target cluster.

    Background: Infrastructure Requirements for Ultra-Large Models

    As model parameters move from the hundreds of billions to the trillions, training infrastructure must be redesigned. The memory of a single accelerator card is far smaller than the model weights, so a training job must distribute parameters, gradients, and optimizer states across a large number of devices while preserving correctness and throughput for synchronous training.

    Recently, a China-based GPU vendor disclosed its training adaptation work on a 2.8-trillion-parameter dense open-source model, covering model loading, sharding scheduling, and gradient synchronization. This article does not repeat the vendor’s promotional framing. Instead, it uses the model scale to make engineering estimates, explains the main constraints in each stage, and provides methods that can be used directly to evaluate a training platform. Any performance conclusion in the original material for which test conditions are not given is treated as unverified.

    First, Calculate the Memory and Minimum GPU Count

    Estimating memory before training is necessary to determine whether a cluster size is feasible. Using a 2.8-trillion-parameter model as an example, this article adopts the following assumptions: weights and gradients are stored in FP8, Adam optimizer momentum and variance are stored in FP32, and master weights are stored in FP32. Using decimal units, 1 TB is 10^12 bytes.

    • Model weights (FP8): 2.8 trillion × 1 byte ≈ 2.8 TB
    • Gradients (FP8): approximately 2.8 TB
    • Adam momentum and variance (FP32): 2.8 trillion × 8 bytes ≈ 22.4 TB
    • Master weights (FP32): 2.8 trillion × 4 bytes ≈ 11.2 TB

    The total is about 39.2 TB, roughly 14 times the weight size. This number does not include activations, communication buffers, or framework overhead. The original material’s claim of “3 to 5 times expansion” is low because it does not account for FP32 optimizer states and master weights.

    If optimizer states and master weights are stored in BF16, momentum, variance, and master weights total about 16.8 TB. Together with weights and gradients, the total is about 22.4 TB.

    Based on these two configurations, the lower bounds for GPU count by static memory are:

    • 192 GB per GPU: about 204 GPUs (39.2 TB) or about 117 GPUs (22.4 TB)
    • 80 GB per GPU: about 490 GPUs (39.2 TB) or about 280 GPUs (22.4 TB)

    These are theoretical lower bounds. Activation recomputation, communication buffers, memory fragmentation, and pipeline bubbles will all further increase the actual GPU count. When selecting a configuration, reserve headroom above the static estimate and calibrate it against the peak memory of the actual training job.

    Communication Volume and Network Bandwidth

    Data-parallel training requires gradient synchronization at every step. With sharded gradient synchronization, each GPU sends approximately the full gradient size multiplied by (N−1)/N via ReduceScatter. In a large cluster, this value approaches 2.8 TB.

    Assuming each GPU uses only one 400 Gbps link, its bandwidth is about 50 GB/s. Ideally, transmitting 2.8 TB in a single step takes about 56 seconds, excluding protocol overhead and congestion. If communication cannot overlap with computation, the network will directly slow down every training step.

    Common mitigations include:

    1. Configure more NICs per node to increase aggregate bandwidth.
    2. Keep parallel groups within the same high-speed interconnect domain as much as possible to reduce cross-switch traffic.
    3. Increase gradient accumulation steps to reduce synchronization frequency per sample.
    4. Choose AllReduce or ReduceScatter algorithms based on topology rather than fixing on one approach.

    The benefits of these measures depend on the specific topology and model structure, and they need to be measured on the target cluster.

    FSDP2: What Is Sharded, and What Are the Tradeoffs

    FSDP2 is PyTorch’s second-generation fully sharded data parallel mechanism, available as the fully_shard interface starting in PyTorch 2.4. Compared with FSDP1, FSDP2 shards on a per-parameter basis and uses DTensor to represent sharded state. The sharding granularity is finer, and it is easier to combine with tensor parallelism and pipeline parallelism.

    A forward and backward pass with FSDP2 roughly proceeds as follows:

    Stage Main communication Memory impact
    Forward pass AllGather for the current layer to collect full parameters Released after computation; peak depends on the number of layers resident at the same time
    Backward pass Compute local gradients, then execute ReduceScatter Each GPU retains only the gradients and parameter shards it owns
    Parameter update No additional communication; update local shards only Optimizer states are also stored by shard

    The parameter forward retention policy (reshard_after_forward) and prefetch settings directly affect peak memory and the degree of communication overlap. These parameters have no universal optimum and need to be adjusted according to the number of model layers and memory headroom.

    Regarding multimodal training, the original material describes FSDP2 as a “native multimodal training path.” This is inaccurate. FSDP2 is a data-parallel sharding mechanism and does not itself handle modality alignment or the multimodal training workflow. In scenarios where a vision encoder and a text decoder are trained jointly, engineering work must specify the sharding scope, mixed precision, and communication groups for each submodule, and these boundaries must be explicitly declared in code.

    Gradient Synchronization and Communication Overlap

    Gradient synchronization is one of the most communication-intensive stages. A common approach is to launch ReduceScatter for a layer as soon as its gradients are ready during backpropagation, so that communication runs concurrently with backward computation for subsequent layers.

    Implementing this mechanism requires the following conditions:

    • Communication and computation use independent runtime streams.
    • Gradient bucket size is appropriate. Common configurations are on the order of 25 MB, and the best value needs tuning.
    • The memory bandwidth used by communication must not crowd out the bandwidth needed for computation.

    The upper bound of overlap is determined by compute time.