Training Trillion-Parameter LLMs on Domestic AI Accelerator Cards: A Practical Analysis

    This article examines what it takes for domestic AI accelerator cards to support full training adaptation for trillion-parameter open-source LLMs. It distinguishes training adaptation from inference-only Day 0 support, then covers the main engineering challenges: memory walls and parameter sharding with FSDP-style methods, communication and gradient synchronization, expert parallelism for MoE models, and multimodal training pipelines. It also discusses the value of continuous stable runs, numerical consistency, fault tolerance, monitoring, performance tuning, and offers practical recommendations for teams evaluating heterogeneous compute platforms.

    1. Background: From “Inference-Capable” to “Training-Capable”

    In recent years, the parameter scale of open-source large models has continued to rise, and trillion-parameter models have become a standard configuration for leading teams. For domestic AI accelerator chips, completing training adaptation for such advanced open-source large models is an important indicator of the maturity of their software stacks.

    It is first necessary to clarify a common industry confusion: “training adaptation” means that the chip and its software stack can support the complete training process of the model, from model loading, parameter sharding, and gradient computation to synchronous updates, with the entire pipeline running stably. This is fundamentally different from “Day 0 integration/adaptation of the latest open-source model.” The latter usually refers only to quickly completing inference-side operator integration and deployment validation after the model is released; the model itself may not have been pretrained on that chip.

    For example, in publicly available technical reports, when a large-model team validates a new architecture, it often validates the correctness and performance of inference operators in parallel across multiple hardware routes, such as general-purpose GPUs and dedicated NPUs. This kind of validation is inference-level adaptation confirmation and does not represent the source of compute for the model’s base pretraining. Therefore, the real capability of a training chip should be judged by whether it can support continuous, stable, and scalable full-pipeline training.

    2. Core Technical Challenges of Training Adaptation

    1. Memory Wall and Parameter Sharding

    The parameter count, optimizer states, and gradient memory footprint of trillion-parameter models far exceed single-card capacity. Taking mixed-precision training as an example, a single parameter in training mode typically requires more than 16 bytes of memory: the parameter itself plus gradients plus first- and second-order momentum. Three trillion parameters means that state storage alone requires tens of terabytes of memory, making multi-dimensional sharding strategies necessary.

    The mainstream approach is an evolved version of Fully Sharded Data Parallel (FSDP). Its core idea is:

    • Partition model parameters, gradients, and optimizer states across all devices;
    • During forward and backward computation, temporarily aggregate required shards on demand through all-gather;
    • Immediately release non-local shards after computation, trading communication for memory.

    On this basis, second-generation schemes further introduce memory-aware scheduling, communication-computation overlap, and CPU offloading, significantly improving sharding granularity and recovery efficiency for trillion-scale models. For domestic accelerator cards to support such training, their software stacks must natively support this sharding semantics rather than simply porting an inference framework.

    2. Communication and Gradient Synchronization

    The efficiency bottleneck in multi-card training is often not computation but communication. Taking a typical two-node, 16-card configuration as an example, gradient synchronization involves:

    • Intra-node communication: relies on high-bandwidth inter-card interconnect, executing all-reduce or a reduce-scatter + all-gather combination;
    • Inter-node communication: relies on network interface cards and collective communication libraries, requiring topology-aware communication orchestration to minimize cross-node traffic.

    The software stack needs to implement overlapped scheduling of communication and computation, executing reduction of ready shards during backpropagation in parallel with computation of subsequent layers. Illustrative pipeline logic is as follows:

    1. # Pseudocode: sharded gradient synchronization overlapped with computation
    2. for layer in reversed(model.layers):
    3. grad = backward(layer, activations)
    4. comm.async_all_reduce(grad.shard) # Launch reduction asynchronously
    5. compute_next_backward_step() # Overlap computation with communication
    6. comm.wait(grad.shard)

    3. Parallel Strategies for Mixture-of-Experts Models

    Current advanced open-source models widely adopt mixture-of-experts architectures. Expert parameters are large but activation is sparse, making them naturally suitable for expert parallelism: distributing different experts across different devices and using all-to-all communication to complete token routing, dispatch, and result collection.

    Fine-grained expert parallelism schemes that have been validated in the industry further divide experts into smaller granularities to improve load balancing and communication efficiency. This requires the training framework to have dynamic routing awareness, adjusting the dispatch strategy according to the actual expert load of each batch to avoid some devices sitting idle.

    4. Multimodal Training Pipeline

    If the target model supports multimodal inputs such as image and text, the training pipeline also needs to connect the data pipeline between the vision encoder and the language backbone, including heterogeneous sampling, data packing, and loss masking. A complete pipeline means that every link, from the data loader to the tokenizer and then to the sharding scheduler, must be validated on the target hardware and software stack.

    3. Engineering Value of “Continuous Stable Operation”

    The validation standard for training adaptation is not merely “it can run,” but continuous stable operation for hundreds or even thousands of steps with a normal loss curve. This is supported by a complete engineering system:

    1. Numerical consistency validation: compare the outputs of key operators with reference implementations to ensure that precision errors remain within tolerance;
    2. Fault tolerance and checkpoint resume: after a training interruption, quickly recover from the latest checkpoint; sharded saving and loading must be consistent with the sharding strategy;
    3. Stability monitoring: monitor metrics such as loss spikes, gradient norms, and communication time in real time to locate anomalies promptly;
    4. Performance tuning: gradually improve MFU (model compute utilization) through operator fusion, automatic kernel tuning, and other means.

    A flagship domestic training-and-inference integrated card quickly completed training adaptation for a nearly 3-trillion-parameter model based on its own software stack and achieved continuous stable operation for hundreds of steps on a two-node, 16-card configuration. This shows that it already has full-stack capabilities ranging from operator coverage and distributed framework adaptation to cluster stability. The significance of this capability is that domestic compute is moving from “inference-usable” to “training-usable,” laying a technical foundation for subsequent large-scale pretraining on self-owned clusters.

    4. Implications for the Industry and Developers

    For teams planning to conduct large-model training on heterogeneous compute, the following practical recommendations are worth considering:

    • Prioritize validating training rather than inference: inference integration is far easier than training; when evaluating a compute platform, require suppliers to provide measured data for full-pipeline training;
    • Focus on the level of native support for FSDP-style frameworks: sharding strategies, communication overlap, and offloading capabilities directly determine whether large models can run successfully;
    • Establish numerical baselines: first run on a small-scale configuration and compare loss curves with reference hardware before scaling up;
    • Value stability engineering: checkpoint resume and monitoring/alerting systems are indispensable in long-cycle training.

    Conclusion

    Training adaptation for trillion-parameter models is a comprehensive test of the combined capabilities of AI accelerator hardware and software stacks. From model loading and sharding scheduling to gradient synchronization, connecting every link represents the maturity of the engineering system. As more domestic compute platforms complete such validation, the path for heterogeneous compute to support large-scale pretraining is becoming increasingly clear.