Training a 2.8 Trillion Parameter Model on a Domestic AI Compute Platform: A Technical Deep Dive

    A Chinese AI compute vendor has completed training adaptation for an open-source flagship multimodal model with 2.8 trillion parameters, using its training-inference accelerator and proprietary software stack. This article breaks down the key engineering work behind that milestone: a native FSDP2 multimodal training path, sharding-aware model loading, communication optimization for MoE architectures, gradient synchronization with numerical validation, and the fault-tolerance mechanisms required for multi-week training runs. The methodology applies to any large-scale distributed training scenario.

    Training a 2.8 Trillion Parameter Model on a Domestic AI Compute Platform: A Technical Deep Dive

    Background: Training Challenges in the Era of Ultra-Large Models

    A research institute recently open-sourced a flagship multimodal model with 2.8 trillion parameters, drawing widespread attention from the developer community. This parameter scale marks the arrival of the “trillion-parameter sparse model” era for open-source models, and it places unprecedented demands on the underlying compute platforms and training software stacks. Around the same time, a domestic AI accelerator vendor announced that it had completed training adaptation for the model on its flagship training-and-inference accelerator card with its self-developed software stack, establishing an end-to-end training pipeline covering model loading, parameter sharding and scheduling, and gradient synchronization.

    The technical significance of this milestone is worth unpacking. At 2.8 trillion parameters, even with mixed-precision storage, the model weights alone require several terabytes of memory—far beyond what a single machine can hold—making large-scale distributed parallelism mandatory. If the model uses a Mixture-of-Experts (MoE) architecture, its sparse activation characteristics further complicate communication scheduling. Training adaptation is far more than “getting the code to run”: numerical correctness, throughput efficiency, and long-run training stability must all be achieved simultaneously.

    The Core of Training Adaptation: A Native FSDP2 Multimodal Training Path

    The key technical highlight of this adaptation is a native Fully Sharded Data Parallel (FSDP2) multimodal training path. Understanding this choice starts with the limitations of traditional approaches.

    Why FSDP2

    Common parallelism strategies for large-model distributed training include data parallelism (DP), tensor parallelism (TP), pipeline parallelism (PP), and expert parallelism (EP). The idea behind fully sharded data parallelism is to shard model parameters, gradients, and optimizer states across devices: parameters are gathered on demand (all-gather) during the forward pass, then released and re-sharded via reduce-scatter after backpropagation. This compresses per-device memory usage to roughly 1/N, where N is the number of devices.

    Compared with earlier implementations, the new-generation FSDP brings several important engineering improvements:

    • Finer-grained parameter management: Parameters are managed as “sharded tensors” as the basic unit, avoiding coarse-grained transfers of entire layers and producing smoother memory peaks.
    • More thorough compute-communication overlap: Through stream-based scheduling, parameter prefetching, gradient reduction, and forward/backward computation run in parallel, hiding communication overhead.
    • Better compatibility with hybrid parallelism: It can be combined with tensor parallelism and expert parallelism to form multi-dimensional parallel topologies suited to the structure of trillion-scale MoE models.

    Special Handling for Multimodal Scenarios

    Multimodal models typically consist of a vision encoder, a language backbone, and cross-modal alignment modules, whose compute density and parameter counts differ dramatically. Building a multimodal training path therefore requires differentiated sharding strategies for heterogeneous modules: the language backbone, with its large but regular structure, suits fine-grained full sharding, while the vision encoder—relatively small in parameter count—can use more conservative replication or partial sharding to reduce unnecessary communication. In addition, the multimodal data preprocessing pipeline (image decoding, tokenization, feature normalization) must be decoupled from the main training loop so that the data side never becomes a throughput bottleneck.

    Three Key Stages of the End-to-End Training Pipeline

    Model Loading and Initialization

    Loading a trillion-parameter model is an engineering challenge in itself. Complete checkpoints are typically stored in sharded form, and the loading process must:

    1. Load lazily: Allocate memory for the target shards on each device first, then read the corresponding shards from storage in parallel, avoiding the memory spike of “load everything, then shard.”
    2. Process metadata first: Parse the model structure and shard mapping table before scheduling actual weight reads, ensuring the loading order matches the parallel topology.
    3. Keep random initialization consistent: For training from scratch or newly added parameters, initialization seeds must be managed correctly across devices so that logically complete parameters remain numerically consistent across shards.

    An illustrative loading flow can be abstracted as:

    1. # Pseudocode: shard-aware model loading
    2. meta = load_checkpoint_metadata(ckpt_dir) # Parse structure and shard mapping
    3. model = build_model_on_meta_device(config) # Build on meta device; no memory allocated
    4. shard_plan = plan_sharding(model, world_size) # Generate the sharding plan
    5. load_weights_sharded(model, meta, shard_plan) # Each device reads its own shards in parallel
    6. model = wrap_with_fsdp2(model, shard_plan) # Apply the fully sharded parallelism strategy

    Sharding Scheduling and Communication Optimization

    The core goal of sharding scheduling is to maximize device utilization under memory constraints. In practice, this typically involves:

    • Choosing shard granularity: Too fine a granularity increases communication frequency; too coarse sacrifices memory savings. The trade-off must balance per-layer parameter counts against network bandwidth.
    • Parallel placement of MoE experts: For Mixture-of-Experts structures, expert parameters are typically placed independently via expert parallelism. The cross-device exchange of routed tokens (all-to-all communication) is the main bottleneck, so topology-aware placement is needed to keep high-frequency communication pairs within high-speed interconnect domains.
    • Communication grouping and overlap: The parameter prefetch stream, gradient reduction stream, and compute stream are separated, with event-based synchronization enabling fine-grained overlap.

    Gradient Synchronization and Numerical Correctness

    Gradient synchronization determines convergence quality. The adaptation work must verify that:

    • The gradient reduction order under mixed precision is numerically aligned with the reference implementation—typically validated using loss curves and per-layer gradient norms.
    • Gradient accumulation and gradient clipping are correctly implemented in the sharded setting. Gradient clipping requires first aggregating the global gradient norm, then uniformly scaling all shards; any omission leads to convergence anomalies.
    • The sharded storage and update logic for optimizer states (e.g., momentum, second moments) stays consistent with parameter sharding.

    Ensuring Stability in Long-Running Training

    Training runs for trillion-parameter models often last weeks or even months, so stability matters as much as efficiency. Typical engineering requirements include:

    • Fault tolerance and checkpoint resumption: Periodically save sharded checkpoints so training can resume from the latest checkpoint after hardware failures, with the training state (data ordering, random seeds, optimizer states) fully reproducible.
    • Hardware health monitoring: Continuously track device temperature, interconnect link error rates, and memory usage trends to detect failing nodes early.
    • Performance baseline management: Record throughput (tokens/s/GPU), peak memory, and the share of time spent on communication, so any regression can be quickly traced to a specific change.

    For teams planning to run similar training workloads in the cloud, mainstream cloud providers offer foundational capabilities such as container platforms, object storage, logging services, and monitoring/alerting that can be used to build elastic distributed training environments with observability, reducing the operational cost of self-managed infrastructure.

    Conclusion and Takeaways

    The successful training adaptation of a 2.8 trillion parameter model on domestic training-and-inference hardware illustrates a clear technical playbook: use new-generation fully sharded data parallelism as the backbone, apply differentiated parallel designs for multimodal and MoE structures, complete the pipeline with sharding-aware loading, communication overlap, and rigorous numerical validation, and finally secure long-running training with fault tolerance and monitoring. For developers, this methodology is not tied to any specific hardware. Its core principles—shard, overlap, validate, and tolerate failures—apply to any large-scale distributed training scenario, and they are essential skills for every deep learning engineer in the era of large models.