Estimating VRAM and Selecting Parallel Strategies for 10-Trillion Parameter Model Training

    Training a 10-trillion parameter (10T) large model requires rigorous resource estimation and carefully selected parallel strategies. This article introduces an engineering approach to estimating VRAM for model states, activations, and communication buffers, and then outlines how to select and combine strategies such as data parallelism, tensor parallelism, pipeline parallelism, expert parallelism, and context parallelism. It also covers execution details for FSDP and context parallelism, communication bottleneck troubleshooting for thousand-GPU scale training, common errors, and practical implementation advice.

    Introduction

    Recently, discussions around training 10-trillion parameter (10T) large models have increased in the industry. Unofficial rumors suggest that a certain team completed parallel deployments at 550B, 1.6T, and 10T scales on alternative compute platforms, providing the number of accelerator cards required for a single replica. Since this information is unverified and unofficial, this article does not judge any specific team’s configuration. Instead, it uses general engineering methods to explain how to estimate the resources required for such training and how to choose parallel strategies.

    1. Estimate VRAM Before Deciding on Parallelism

    Under mixed-precision training (bf16 weights and gradients, fp32 master weights and Adam’s first and second moments), the model states occupy approximately 16 bytes per parameter:

    • bf16 weights: 2 bytes
    • bf16 gradients: 2 bytes
    • fp32 master weights: 4 bytes
    • Adam first moment: 4 bytes
    • Adam second moment: 4 bytes

    The VRAM per card can be roughly estimated using the following formula:

    Per-card VRAM ≈ Model States ÷ Number of Shards + Activations + Communication Buffers + Fragmentation Overhead

    Here, activations are proportional to sequence length, micro-batch size, and the number of layers. Enabling recomputation can reduce activation memory usage but increases the computation volume by about one-third. Fragmentation overhead is empirically set to 10% to 20%.

    Using this formula to check a 10T model: the total model states amount to approximately 10T × 16 bytes = 160 TB.

    • If only sharding is used without offloading: To fit all model states, you need at least about 2,000 80GB accelerator cards (160 TB ÷ 80 GB), not counting activations.
    • If the optimizer states (master weights and two moments, totaling 12 bytes) are offloaded to host memory, the GPU retains only the 4 bytes of weights and gradients, totaling about 40 TB. 1,024 80GB cards provide roughly 82 TB, leaving about 42 TB for activations and buffers. For host memory, 128 nodes (8 cards per node) with 1 TB of memory each provide a total of 128 TB, which can accommodate the 120 TB of offloaded states, though the margin is very small.

    Therefore, whether a thousand-GPU scale can train a 10T model depends on the offloading scheme, numerical precision, and host memory configuration; a thousand GPUs alone is not a sufficient condition. In Mixture of Experts (MoE) architectures, inactive experts still occupy storage. Sparse activation only reduces computation, not storage.

    2. How to Choose Parallel Strategies

    The basic order for strategy selection is: first ensure a single layer can fit into a device and control intra-node communication, then use sharding to split states, and finally handle long sequences, experts, and inter-node issues. The table below lists common strategies, their applicable scenarios, main costs, and ideal communication scopes.

    Strategy Applicable Scenario Main Cost Communication Scope
    Data Parallelism / FSDP Model states too large, require sharding Parameter gathering and gradient reduction; traffic grows with parameter count Intra-node or inter-node
    Tensor Parallelism (TP) Single-layer computation or parameters too large Requires synchronization at every layer; frequent communication Intra-node, relies on high-speed interconnect, typically ≤ 8
    Pipeline Parallelism (PP) Many layers, requires cross-node splitting Pipeline bubbles, reduced device utilization Inter-node
    Expert Parallelism (EP) Only for MoE models All-to-all communication, potential uneven expert load Try to restrict to intra-node
    Context Parallelism (CP) Very long sequences, activations cannot fit Attention computation requires K/V exchange; traffic grows with sequence length Intra-node or inter-node
    CPU Offloading Still insufficient VRAM Limited by PCIe bandwidth, throughput drops Between host and device

    Below is an example configuration for illustration purposes only; it does not represent any actual deployment. 1,024 cards are divided into 128 nodes, with 8 cards per node. Tensor Parallelism is set to 8 (intra-node); Pipeline Parallelism is set to 8 (cross-node splitting); Data Parallelism is set to 16, with FSDP applied to shard the states. 8 × 8 × 16 = 1,024, matching the total number of cards. For MoE models, the Expert Parallelism group size must be divisible by the number of experts, and all-to-all communication should ideally be kept within the node.

    CPU offloading should be considered last. It trades for VRAM capacity at the cost of PCIe bandwidth and host memory copies. Prefetching (asynchronously pulling weights for the next stage ahead of time) can hide some latency, provided that the computation time is sufficient to cover the copy time.

    3. Execution Details of FSDP and Context Parallelism

    The sharding process of FSDP can be divided into several steps. During the forward pass, an All-Gather is performed layer by layer to obtain the full parameters of the current layer; after the layer’s computation is complete, the non-local parameter shards are released. During the backward pass, parameters are All-Gathered again; after computing gradients, a Reduce-Scatter is performed, so each card retains only the gradient shard it is responsible for. This approach has higher communication volume than standard data parallelism, but significantly reduces per-card VRAM usage.

    Context Parallelism splits the sequence across multiple cards, and attention computation requires the exchange of Keys and Values (K/V) between cards. A common practice is to use Ring Attention, which overlaps communication with computation. The communication overhead can be minimized but not eliminated; the longer the sequence, the more noticeable this overhead becomes.

    4. Troubleshooting Communication for Thousand-GPU Training

    When troubleshooting communication bottlenecks, follow this sequence:

    1. Record baseline metrics: Throughput (tokens/s), Model FLOPs Utilization (MFU), the fluctuation range of single-step time, and the proportion of communication time per step.
    2. Scale up in stages: Run on a single node first, then expand to 2 nodes, 16 nodes, and full scale. Identify the scale point where performance significantly drops; the problem usually lies on the newly added communication path at that point.
    3. Verify topology: Check the mapping between processes and accelerator cards. Ensure the Tensor Parallelism group is on the same node, and verify that network interface bindings match the design.
    4. Inspect network counters: Check for packet loss, retransmissions, and port errors. Compare measured bandwidth against design values.
    5. Check collective communication libraries: Confirm versions and timeout settings. Check logs for timeouts or fallbacks to slow paths.
    6. Conduct control experiments: Change only one variable at a time (e.g., disable prefetching, reduce micro-batch size, or disable offloading) and observe changes in single-step time.

    5. Common Error Checklist

    • OOM on the first step: Estimation omitted master weights or optimizer states, or the actual sequence length exceeded expectations.
    • OOM after hundreds of steps: Accumulation of memory fragmentation, or certain batches have exceptionally long sequences.
    • Collective communication timeout: A node slows down or hangs; a single stuck process will stall the entire job.
    • NaN loss: Low-precision overflow, learning rate too high, or gradient clipping not enabled.
    • Loss jumps after checkpoint recovery: Incomplete checkpoint missing optimizer states, random seeds, or data reading positions.
    • Uneven MoE expert load: Some experts receive too many tokens, resulting in token dropping. The load balancing loss or capacity factor needs adjustment.
    • Throughput plummets after enabling offloading: PCIe or host copies become the bottleneck; prefetching is not effective.

    6. Implementation Advice

    First, use a small model on the same parallel topology to validate the configuration, ensuring that VRAM and throughput align with estimates before gradually scaling up. Save checkpoints at each stage and retain the previous stable version for rollback in case of issues.

    Alternative compute platforms exhibit significant differences in operator coverage and single-card performance. Capacity planning should be based on vendor documentation and empirical testing rather than directly applying numbers from other platforms. Large-scale training is highly costly; before officially launching, calculate the compute budget based on VRAM estimates and single-step time, and set abort conditions (e.g., pause the job if loss is abnormal for consecutive steps, or if throughput falls below a certain percentage of the baseline).

    7. Further Reading

    It is recommended to read the original papers directly rather than relying on secondary interpretations: ZeRO (2020), the Megatron-LM series (starting from 2019), Switch Transformer (2021), PyTorch FSDP (2023), and Ring Attention (2023). The specific team configurations mentioned online are only found in unverified, unofficial accounts and should not be used as a basis for capacity planning or procurement until official materials are available.