Training a 2.8-Trillion-Parameter Model on Domestic GPUs: A Technical Deep Dive

    A domestic GPU vendor has completed training adaptation for a 2.8-trillion-parameter multimodal model using its flagship AI accelerator and self-developed MUSA software stack. This article breaks down the system-level challenges of trillion-scale training—memory, communication, reliability, and ecosystem gaps—and explains the engineering solution: a native PyTorch FSDP2 parallelism path, multimodal pipeline optimizations, fine-grained gradient synchronization, and end-to-end checkpointing and observability. It concludes with reusable best practices for large-scale AI training teams.

    Background: System-Level Challenges of Large-Model Training

    In recent years, the parameter counts of large language models and multimodal models have climbed steadily, from hundreds of billions to trillions and beyond. Take the recently open-sourced 2.8-trillion-parameter flagship model as an example: training models at this scale imposes systemic demands on the underlying compute infrastructure far beyond traditional deep learning workloads. Four core bottlenecks form the “hard constraints” of training at scale:

    • The Memory Wall: Even with BF16 mixed-precision training, a single copy of 2.8 trillion parameters occupies more than 5.6 TB of storage—far exceeding the tens of gigabytes of memory available on any single accelerator. Optimizer states and gradient storage widen the memory gap even further.
    • The Communication Wall: Large-scale parallel training relies on collective operations such as AllReduce and AllGather to synchronize data at high frequency across thousands of accelerators. Communication latency and bandwidth overhead often become the primary limiters of scaling efficiency.
    • The Reliability Wall: Training jobs run across multiple nodes and cards for weeks or even months. Any single-point failure—such as PCIe link jitter or memory soft errors—can interrupt the entire job, requiring frequent checkpoint saving and recovery.
    • The Ecosystem Gap: Mainstream training frameworks (such as PyTorch) and distributed parallelism strategies (such as FSDP and tensor parallelism) are deeply optimized for the dominant international accelerator ecosystem. Domestic hardware must close the software-stack compatibility gap and build a complete toolchain from the framework layer down to cluster scheduling.

    1. Overall Adaptation Design

    To address these challenges, a domestic GPU vendor completed training adaptation for this 2.8-trillion-parameter multimodal model using its flagship training-and-inference AI accelerator and its self-developed MUSA software stack. The overall approach follows three core principles:

    1. Minimal-intrusion modification: The adaptation does not alter the model’s network architecture. Deployment on the heterogeneous compute cluster is achieved entirely through upgrades to the underlying software stack’s parallelism strategies and memory management.
    2. A native FSDP2 path: The solution directly integrates the new Fully Sharded Data Parallel (FSDP2) implementation in PyTorch 2.x, rather than the legacy FSDP1 interface, ensuring alignment with the upstream framework’s evolution.
    3. End-to-end observability: Monitoring probes are placed at every stage—from model loading and shard scheduling to gradient synchronization—providing a data foundation for tuning and fault diagnosis.

    2. Selecting and Balancing Distributed Parallelism Strategies

    Given the specific demands of 2.8 trillion parameters, the team conducted a systematic evaluation of parallelism strategies:

    Parallelism Dimension Core Mechanism Best For Role in This Solution
    Data Parallelism (DP) Replicates model weights; each replica processes a different mini-batch Models that fit in single-card memory Baseline
    Tensor Parallelism (TP) Splits weights along matrix dimensions; multiple cards cooperate on a single layer Extremely heavy per-layer compute; communication-intensive Auxiliary; reduces peak memory
    Pipeline Parallelism (PP) Splits the model by network layers; cards execute different stages sequentially Deep networks with evenly distributed parameters Fallback; suffers from pipeline bubbles
    FSDP2 (Fully Sharded Data Parallel) All parameters are sharded across cards; full parameters are gathered on demand via AllGather during the forward pass Unified pre-training and fine-tuning of large models Core solution; combines memory optimization with ease of use

    FSDP2’s key improvement over FSDP1 is moving the sharding logic from the module level down to the parameter/tensor level, enabling finer-grained and more efficient sharding and memory lifecycle management. For a 2.8-trillion-parameter model, this is critical: it makes each parameter’s storage location and gather timing precisely controllable, significantly reducing peak memory usage.

    How FSDP2 Shard Scheduling Works

    Under FSDP2, the full training loop operates as follows:

    1. # Pseudocode: memory and communication scheduling per iteration in FSDP2
    2. for micro_batch in dataloader:
    3. # Forward pass: gather the full copy of each layer's parameters on demand
    4. for layer in model.layers:
    5. param_full = all_gather(layer.weight_shard) # communication cost
    6. output = layer.compute(param_full, micro_batch)
    7. # Release the gathered copy immediately after the forward pass
    8. # to free memory for layers whose parameters haven't been gathered yet
    9. free_buffer(param_full)
    10. # Backward pass: re-gather parameters involved in backpropagation
    11. for layer in reversed(model.layers):
    12. param_full = all_gather(layer.weight_shard) # reuse temporary buffers
    13. grad = layer.compute_grad(output_grad, param_full)
    14. layer.apply_grad_to_shard(grad) # accumulate gradients in place on the shard
    15. # Gradient sync and parameter update (communication only along the shard dimension)
    16. sharded_optimizer.update(model.param_shards) # each card updates only its own shard

    The core advantages of this path:

    • A minimal balance of memory and communication: No matter how large the model, each card holds only one parameter shard plus the current layer’s gathered copy at any moment—never a full replica—reducing peak memory by an order of magnitude.
    • Non-blocking gradient accumulation: With parameter sharding, gradient computation and ReduceScatter across shards are fully pipelined, eliminating the gradient-sync waits of classic data parallelism.
    • Autonomous scheduling for multimodal input streams: Text, image, and speech encoders have different structures. FSDP2 allows shards to be packed independently per encoder module, so compute and communication streams overlap heavily and no single modality slows the overall pipeline.

    3. Engineering the Multimodal Training Path

    After establishing general FSDP2 parallelism, the team solved several engineering problems specific to the model’s multimodal nature:

    1. Balanced Data Loading and Preprocessing for Heterogeneous Inputs

    Sample size and processing complexity vary enormously across modalities—processing a high-resolution image can take tens of times longer than a text sequence. The team designed an adaptive length bucketing mechanism in the data pipeline that dynamically adjusts the proportion of each modality’s samples in a batch based on available GPU memory and current batch compute time, preventing idle compute.

    2. Communication Optimization for Cross-Modal Feature Alignment

    Multimodal models typically exchange high-level features across experts or modules during fusion. At the 2.8-trillion-parameter scale, these exchanges place extreme demands on intra-node and inter-node network bandwidth. The solution adopts a multi-level hybrid communication strategy: high-bandwidth NVLink-like direct interconnects within a node, RDMA NICs with the RoCE protocol across nodes, and independent CUDA communication streams configured for different communication patterns to avoid mutual blocking.

    3. Co-Designing Shard Scheduling and Gradient Synchronization

    To prevent gradient synchronization from becoming a bottleneck, the team split it into a fine-grained pipeline: as soon as a shard finishes backpropagation, its ReduceScatter is triggered immediately, without waiting for the entire model’s backward pass to complete. This “compute-while-communicating” approach keeps compute and communication units continuously busy and significantly reduces time to convergence.

    4. Closing the Loop from Model Loading to Gradient Sync

    Building a complete training pipeline from model loading to gradient synchronization involves more than parallelism itself—it also requires maturing the surrounding infrastructure:

    Model loading: For TB-scale weight files, sharded concurrent loading is used. A distributed file system prefetches different shards in parallel to each node’s local NVMe cache, avoiding the I/O bottleneck of centralized reads. Weight integrity verification is also introduced, with shard-level CRC checks to ensure data loads correctly.

    Fault tolerance during training: An automatic checkpointing mechanism asynchronously saves the model state to a parallel file system at fixed step intervals. Thanks to FSDP2’s sharded nature, checkpoint saving requires no full-weight aggregation—each node writes only its own shard. On recovery from an interruption, each node reloads only its local data, avoiding cluster-wide synchronization waits.

    Gradient sync quality monitoring: During gradient accumulation, distribution metrics of gradient tensors (mean, variance, NaN ratio) are sampled periodically to detect gradient anomalies or floating-point overflow early, reducing wasted training steps.

    The completion of this adaptation marks a key step forward for domestic GPU compute in supporting ultra-large model training. From a technical-value perspective, it validates several industry observations:

    • Software-stack depth determines the compute ceiling: Hardware performance is the foundation, but the decisive factor for large-scale adoption is whether the latest frameworks (such as FSDP2) and model architectures can run quickly.
    • Native framework compatibility beats driver-level adaptation: Rather than making private modifications for each model, it is better to engage deeply with the upstream open-source ecosystem and stay aligned with the evolution of PyTorch, FSDP, Megatron, and other mainstream projects—dramatically lowering users’ migration costs.
    • “Training-inference in one” emphasizes resource reuse: Once a flagship accelerator meets training requirements, its high-throughput characteristics also suit large-scale online inference serving, achieving a better balance between cluster utilization and per-unit compute cost.

    6. Conclusion and Best Practices

    Reflecting on this 2.8-trillion-parameter adaptation, the team distilled three reusable best practices for large AI R&D teams:

    1. Focus memory optimization on parameter-gather timing, not just compression. FSDP2’s implicit “gather on demand, release immediately” logic solves peak-memory problems far more effectively than gradient compression or quantization alone.
    2. Decouple parallelism dimensions orthogonally. At trillion-parameter scale, nearly every single parallelism strategy has its own bottleneck. The key is to tune data, tensor, and pipeline parallelism independently in a layered manner, setting communication granularity and buffer sizes separately at each layer.
    3. Build an end-to-end observability and tracing system. From data loading and shard scheduling to network communication and GPU compute, latency jitter in any single stage can be amplified into efficiency loss for the entire job. Comprehensive instrumentation provides a fast lane for problem diagnosis.

    For enterprise users looking to quickly reproduce such capabilities in their own environments, choosing cloud infrastructure with a mature distributed training platform and standardized AI acceleration services can significantly shorten environment setup and framework adaptation cycles—helping R&D teams focus their energy on model quality itself.