Training Adaptation Practice for a 2.8-Trillion-Parameter Open-Source Model on Domestic AI Accelerators
This article walks through a real-world adaptation project that enabled continued pre-training and supervised fine-tuning of a 2.8-trillion-parameter open-source MoE model on a domestically developed AI accelerator. It covers the memory, communication, and software-stack challenges of trillion-parameter training, the role of a native FSDP2 multimodal training path, and practical engineering lessons including memory budgeting, communication profiling, and fault tolerance.
Training Adaptation Practice for a 2.8-Trillion-Parameter Open-Source Model on Domestic AI Accelerators
1. Background: Training Challenges in the Trillion-Parameter Era
Recently, an open-source community released a flagship large model with 2.8 trillion parameters and made the model weights publicly available. Models at this scale typically adopt a Mixture of Experts (MoE) architecture: the total parameter count is enormous, but each forward pass activates only a subset of expert networks, significantly increasing model capacity and expressiveness while keeping training and inference compute under control.
However, there is a huge engineering gap between “open weights” and “trainable.” For most teams, obtaining the weights is only the first step. The real challenge is how to get such a behemoth running in your own compute environment and complete continued pre-training or supervised fine-tuning. Specifically, the challenges concentrate on several levels:
- Memory pressure: Even with low-precision storage, 2.8 trillion parameters alone far exceed the capacity of a single GPU or even a single node, not to mention the additional overhead of optimizer states and gradients.
- Communication bottlenecks: Cross-node gradient synchronization and the routing communication introduced by expert parallelism place extremely high demands on cluster interconnect bandwidth.
- Software-stack adaptation: Mainstream training frameworks are natively built for specific hardware ecosystems. On domestic AI accelerators, the full chain—operators, communication libraries, and distributed strategies—must be adapted.
- Complex multimodal pipelines: Such flagship models often support multimodal inputs such as text and images, and the training data pipeline differs significantly from single-modality scenarios.
Drawing on a recent, typical adaptation project on domestic compute, this article breaks down how these problems were solved.
2. Hardware and Software Stack: The Role of a Train-and-Infer AI Accelerator
This adaptation was carried out on a flagship train-and-infer AI accelerator together with its full-featured software stack. “Train-and-infer” means the same accelerator card can both handle large-scale distributed training and efficiently serve inference. For enterprise users, this means flexibility in compute investment—idle training capacity can be seamlessly converted into inference serving capability.
At the software-stack level, domestic AI computing platforms typically provide a programming model, operator libraries, collective communication libraries, and a training-framework adaptation layer that mirror mainstream ecosystems. The core of the adaptation work is to make the distributed primitives widely used by upper-layer training frameworks—such as tensor sharding, collective communication, and memory-pool management—map correctly and efficiently onto the underlying hardware capabilities. This is not a simple matter of interface alignment; it involves:
- Operator coverage verification: Every operator used by the model must have a correct implementation on the target hardware; missing operators must be implemented or rewritten through fusion.
- Numerical alignment: The numerical precision of forward and backward computation must match the reference implementation to avoid training divergence.
- Performance tuning: Approaching the hardware’s theoretical performance through operator fusion, memory reuse, and communication-computation overlap.
3. Core Technology: A Native FSDP2 Multimodal Training Path
3.1 Fundamentals of FSDP
Fully Sharded Data Parallel (FSDP) is the mainstream approach for training extremely large models today. The idea is to shard model parameters, gradients, and optimizer states across all cards in the data-parallel group, so that each card holds only 1/N of the state. When full parameters are needed during the forward and backward passes, they are temporarily gathered via collective communication (all-gather) and released immediately after computation.
The evolution of FSDP (commonly called FSDP2 in the industry) refactors the API, shifting sharding semantics from “module wrapping” to “tensor-level sharded representation,” which brings cleaner composability:
- Sharded tensors can participate in the computation graph as first-class citizens, making it easy to combine freely with other parallel strategies such as tensor parallelism and expert parallelism.
- Memory management is more fine-grained, with on-demand prefetching and layer-by-layer release to reduce peak memory usage.
- It provides a more natural way to express expert sharding for MoE models.
3.2 Building a Native Multimodal Training Path
For the multimodal flagship model, the adaptation team built a native FSDP2 training path. The word “native” is worth emphasizing: rather than “translating” an existing parallel scheme over, the training configuration was reimplemented directly on top of the new sharding abstraction to fully leverage its composability. A typical configuration looks like this (illustrative code):
# Illustration: applying differentiated sharding strategies to different submodulesfor layer in model.vision_encoder.layers:fully_shard(layer) # Shard the vision encoder layer by layerfor expert_group in model.moe_blocks:fully_shard(expert_group) # Shard the MoE expert groupsfully_shard(model) # Top-level fallback sharding
This per-module, fine-grained way of declaring sharding allows the vision tower, language backbone, and expert networks to each adopt the parallel strategy that best matches their computational characteristics, while sharing a unified optimizer and gradient synchronization mechanism.
3.3 Connecting the Full Training Pipeline
The ultimate goal of the adaptation is to close the loop across three stages:
1. Model loading: The weight files for 2.8 trillion parameters are massive, so sharded direct loading is essential—each card reads and materializes only the parameter shards it is responsible for, avoiding the memory spike and long loading times caused by “load everything, then shard.” Initialization on a meta device combined with shard-by-shard materialization is a common practice.
2. Shard scheduling: During training, the timing of shard gathering and release directly affects peak memory usage and communication efficiency. A sensible prefetch strategy—pulling the next layer’s parameters in advance while the current layer is computing—enables communication-computation overlap and hides gathering latency.
3. Gradient synchronization: After backpropagation, gradients are reduced and written back to each card in sharded form via reduce-scatter, connecting with the optimizer state update. For MoE models, the additional communication introduced by expert routing must also be handled, typically through all-to-all communication for expert parallelism combined with gradient bucketing to control overhead.
4. Key Lessons from Engineering Practice
Projects of this kind yield several general lessons:
- Correctness first, performance second: First verify with small batches and short sequences that the loss curve matches the reference implementation, then gradually scale up and tune performance.
- Memory budget modeling: Estimate the footprint of parameters, gradients, optimizer states, and activations in advance to decide whether activation checkpointing is needed.
- Communication profiling: Use profiling tools to identify the time share of all-gather, reduce-scatter, and all-to-all, and optimize accordingly.
- Elasticity and fault tolerance: Ultra-large-scale training spans many cards, so failures are the norm; checkpoint-based resumption and health-check mechanisms are essential.
5. Conclusion
The emergence of trillion-parameter open-source models is turning “the ability to train extremely large models” from an exclusive capability of a few leading institutions into an engineering goal within reach of many more teams. Completing the adaptation of a native FSDP2 multimodal training path on a domestic train-and-infer accelerator validates the feasibility of running frontier-model training on a domestic hardware-software stack. For enterprise users, combining general-purpose cloud capabilities such as object storage, container platforms, and monitoring and alerting makes it possible to further build a stable, observable, and elastically scalable large-model training environment—and to carry out model fine-tuning and continual training on a self-controlled compute foundation.
