Ultra-Large Model Training Adaptation on Domestic Compute Platforms: Technical Paths
This article examines the technical requirements for adapting ultra-large model training to domestic compute platforms. It covers memory walls, communication overhead, numerical consistency, and software ecosystem compatibility; explains FSDP2 as a full-sharded data-parallel approach; reviews model loading, shard scheduling, and gradient synchronization; and discusses the value of unified training-inference hardware and practical lessons for large-model training adaptation.
I. Background: Why Training Adaptation Matters for Large Models
In recent years, the parameter scale of open-source large models has rapidly moved from tens of billions to trillions. Training such models places extremely high demands on the compute foundation. On one hand, model weights, optimizer states, and activations consume far more memory than a single card can provide. On the other hand, heterogeneous compute platforms need to deeply integrate with mainstream training frameworks on their own software ecosystems. “Training adaptation” does not simply mean “it can run.” It requires correct numerical precision, acceptable parallel efficiency, and long-term training stability.
Recently, a domestic GPU vendor announced that, based on its flagship training-and-inference integrated AI accelerator card and self-developed general-purpose compute software stack, it completed training adaptation for a 2.8-trillion-parameter multimodal flagship model. The work connected the full pipeline from model loading and shard scheduling to gradient synchronization. This case has general methodological value, so the following sections break it down from a general technical perspective.
II. Core Challenges of Large-Scale Training
Memory wall. For a trillion-parameter model, mixed-precision training alone may require tens of terabytes of memory for weights, gradients, and optimizer states, far exceeding the total capacity of an eight-GPU server. Multi-dimensional parallel partitioning is therefore mandatory.
Communication overhead. The more parallel partitioning is used, the more frequent data exchange becomes across devices and nodes. If communication cannot sufficiently overlap with computation, cluster compute utilization will drop significantly.
Numerical consistency. Different hardware platforms implement floating-point operations differently. Training adaptation must verify forward and backward numerical correctness to avoid loss divergence or precision regression.
Software ecosystem compatibility. Operators, communication primitives, and distributed strategies in training frameworks need equivalent support on heterogeneous hardware.
III. FSDP2: Evolution of Fully Sharded Data Parallel
The “native FSDP2 multimodal training path” mentioned in this case deserves closer attention. The core idea of FSDP (Fully Sharded Data Parallel) is to evenly shard model parameters, gradients, and optimizer states across all data-parallel processes, perform all-gather on demand before forward and backward computation, and release the gathered data immediately after use. This reduces peak memory close to the theoretical lower bound.
Compared with the first-generation implementation, FSDP2 mainly improves in the following ways:
- Per-parameter sharding replaces flattened tensor sharding, enabling finer parameter management and easier combination with features such as mixed precision and quantized training.
- Sharding granularity is decoupled from the device mesh, allowing flexible adaptation to different parallel topologies.
- It is more friendly to multimodal models: the vision encoder and language model can use different sharding and freezing strategies.
A conceptual pseudo-code example is as follows:
# Conceptual illustration: wrapping with fully sharded data parallelmodel = FullyShardedParallel(model,sharding_strategy="FULL_SHARD", # Fully shard parameters/gradients/optimizer statesmixed_precision=bf16, # Mixed precisionbackward_prefetch="BACKWARD_PRE", # Backward prefetch, overlap communication and computation)
“Native” adaptation means the parallel strategy is not simulated through a compatibility layer, but implemented directly on the communication library and runtime of the self-developed software stack. Communication primitives such as all-gather, reduce-scatter, and all-reduce are optimized for the hardware topology.
IV. Three Key Stages in the Training Pipeline
Model loading. The checkpoint of a trillion-parameter model can reach tens of terabytes. It must support direct loading of sharded formats and format conversion, avoiding aggregation of full weights on a single node. A common approach is pipeline loading that “reads by shard and writes in the target layout.”
Shard scheduling. Data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism need to be orchestrated together. Dense parts typically use tensor parallelism to split attention and MLP. MoE parts are split along the expert dimension. Pipeline stages must balance layer load and reduce bubbles.
Gradient synchronization. Gradients produced during backward computation are reduced in a sharded manner through reduce-scatter and overlapped with communication windows. For sparsely activated expert networks, imbalanced communication load caused by token routing also needs to be handled.
V. Hardware Value of Integrated Training and Inference
The advantage of an integrated training-and-inference architecture is that the same set of cards supports both large-scale training and inference deployment. This avoids model format and operator migration costs between two separate hardware stacks. For the software stack, this means the operator library must cover both backward operators required for training and high-throughput kernels required for inference. The communication library must also optimize both collective communication and point-to-point transmission.
VI. Practical Lessons
This case provides a methodology for large-model training adaptation on any compute platform: first validate numerical correctness with small and medium-sized models, then gradually scale up to validate parallel scaling efficiency; establish continuous monitoring of gradient norms, loss curves, and hardware utilization; profile communication and continuously tune overlap strategies. Only when every stage of the pipeline is native, stable, and scalable can trillion-parameter model training truly be deployed.
Overall, the completion of ultra-large model training adaptation on a domestic compute platform marks a shift in software-hardware co-design from “usable” to “easy to use.” For engineering teams, understanding the underlying parallel strategies and pipeline design has more long-term value than focusing on a single event.
