Adapting Domestic GPUs for Trillion-Parameter LLM Training: A Practical Guide
As open-source large language models scale into the trillion-parameter range, training them on domestic GPU infrastructure has become a central challenge in intelligent computing. This article examines how a domestic GPU vendor completed the training adaptation of a 2.8-trillion-parameter open-source flagship Mixture-of-Experts (MoE) model using its flagship training-and-inference AI accelerator card and proprietary software stack, establishing a native multimodal training pipeline. We analyze the effort from four dimensions: technical challenges, architectural design, training pipeline implementation, and engineering best practices.
Adapting Domestic GPUs for Trillion-Parameter LLM Training: A Practical Guide
As open-source large language models scale into the trillion-parameter range, a critical question has emerged in intelligent computing infrastructure: how can ultra-large-scale models be trained on domestic GPU platforms? Recently, a domestic GPU vendor completed the training adaptation of a 2.8-trillion-parameter open-source flagship Mixture-of-Experts (MoE) model using its flagship training-and-inference AI accelerator card and proprietary software stack, while also building a native multimodal training pipeline. This work provides a replicable engineering blueprint for running frontier model training on domestic compute. This article breaks it down across four dimensions: technical challenges, architectural design, training pipeline implementation, and best practices.
1. Common Challenges in Trillion-Parameter Model Training
Training ultra-large MoE models is far more complex than simply “fitting the model into memory.” The difficulty manifests at three levels.
The memory wall. A 2.8-trillion-parameter model stored in BF16 precision alone requires over 5 TB just for weights. Adding optimizer states (typically 2–3x the parameter size) and activations, no single GPU can hold the model—large-scale parameter sharding is mandatory. While MoE’s sparse activation reduces per-step compute, all expert weights must still reside in memory, so the memory pressure remains.
Communication and scheduling complexity. MoE models involve dynamic data exchange between experts at the routing layer (token dispatch and aggregation), generating substantial All-to-All traffic. Parameter sharding strategies add further collective operations such as AllGather and ReduceScatter. The combination of these two communication patterns imposes stringent demands on interconnect bandwidth, topology-aware scheduling, and compute-communication overlap.
Software stack maturity. Training adaptation is not merely a question of whether operators can run. The entire pipeline must be validated for usability and stability: operator library coverage, mixed-precision support, distributed parallelism framework compatibility, and fault-tolerance mechanisms. A gap in any link can cause training interruptions or precision anomalies.
2. Parameter-Sharded Training Architecture Based on FSDP2
Fully Sharded Data Parallel (FSDP) is the industry-standard approach for training ultra-large models, and its second-generation implementation delivers systematic improvements in sharding granularity, memory management, and communication scheduling. In this adaptation, the domestic software stack built a native FSDP2 multimodal training pipeline based on the following core ideas:
1. On-demand parameter sharding with lazy materialization. During initialization, the computational graph is constructed on a meta device, avoiding the memory spike caused by fully loading the model before sharding. Each parameter unit is sharded along the data-parallel dimension as a distributed tensor. Full copies are temporarily gathered via AllGather only before computation and released immediately afterward, so per-device memory usage scales inversely with device count.
2. Topology-aware shard scheduling. Expert parameters and dense parameters (attention layers, shared layers) in MoE models suit different parallelism strategies: experts typically use expert parallelism combined with data sharding, while dense parts use standard FSDP sharding. The shard scheduler must be aware of bandwidth differences between intra-node high-speed interconnects and inter-node networks, placing communication-intensive components within device groups that have stronger interconnect performance.
3. Compute-communication overlap. Through prefetching, the AllGather for the next layer’s parameters is issued while the current layer’s backward computation is still running, hiding communication latency behind computation. In practice, well-designed overlap scheduling compresses exposed communication time to a small fraction of total step time, significantly improving effective cluster utilization (MFU).
4. Numerical stability of gradient synchronization. Gradient ReduceScatter on large clusters requires attention to precision accumulation. A common practice is to perform gradient reduction in FP32 while storing and transmitting in BF16, balancing convergence stability against communication overhead.
3. Building and Validating the End-to-End Training Pipeline
The complete training adaptation pipeline consists of four stages, each requiring coordinated hardware-software validation:
Model loading: Support distributed loading of mainstream checkpoint formats, where each parallel group reads only the data blocks corresponding to its local shard, preventing the central node from becoming an I/O bottleneck. For multimodal models, additional handling is needed for mismatched weight naming and differing sharding strategies between the vision encoder and the language backbone.
Forward/backward computation: Validate the correctness and performance of core operators (attention, routing gating, grouped matrix multiplication, normalization, etc.) on domestic GPUs, with targeted optimization for MoE-specific token dispatch/aggregation operators. Selective activation checkpointing is enabled, trading roughly 30% additional compute for substantial memory savings.
Gradient synchronization and optimizer: Confirm that the distributed optimizer’s sharded state-update logic is correct, and that operations such as gradient clipping and weight decay behave consistently under sharding semantics.
Fault tolerance and elasticity: Large-scale training runs last for days, and hardware failures are inevitable. The system must support periodic distributed checkpointing, second-level failure detection, and fast recovery, so that a single-point failure does not roll back the entire job.
4. Engineering Best Practices
For teams planning to train large models on domestic compute, the following lessons are worth noting:
- Start small, scale gradually. Validate convergence correctness with a small-scale configuration first, then progressively expand the parallel scale. Never launch a full-scale run directly.
- Build fine-grained observability. Continuously track memory usage, communication time, and loss curves. General-purpose logging services and monitoring/alerting capabilities can deliver cluster-level observability.
- Use reliable storage for data and checkpoints. Host training data and checkpoints on highly reliable object storage, combined with tiered read/write strategies to reduce I/O overhead.
- Reserve elastic scaling capacity. Use container orchestration platforms to schedule training jobs and enable failure self-healing.
Conclusion
The successful adaptation of a trillion-parameter open-source model on a domestic training-and-inference AI accelerator demonstrates that domestic hardware-software stacks now possess the fundamental capability to support frontier LLM training. As distributed training frameworks, operator libraries, and cluster scheduling systems continue to mature, domestic compute will play an increasingly important role in the large-model industry.
