Validating Large Model Training Pipelines on Domestic AI Accelerators: A Practical Analysis

    This article analyzes the practice of running a complete large model training pipeline on domestic AI accelerators. It details the hardware topology, parallel strategy design, and key technical aspects such as operator adaptation, communication library optimization, and memory management within a dual-node, 16-card environment. The stable completion of a 400-step training run validates the feasibility of an end-to-end closed loop and offers developers critical insights into evaluating the practical application of heterogeneous computing for large-scale model training.

    1. Background: Why “Running the Training Pipeline” Matters

    As the parameter scale of large language models continues to climb, a complete training pipeline involves distributed parallelism, mixed precision, gradient synchronization, and fault tolerance. A failure in any of these links can lead to training interruptions or precision degradation. For a long time, the mainstream training ecosystem has been primarily built around a specific type of general-purpose GPU hardware. Whether domestic AI chips can support a complete training process has always been a focus of the industry.

    Recently, a team publicly demonstrated the validation of a large-parameter model training pipeline on 16 domestic AI accelerator cards across two servers, stably completing 400 training steps. The significance of this milestone is not the number of steps itself, but rather the proof that the entire pipeline—from operator adaptation and communication library integration to parallel strategy scheduling—can operate as an end-to-end closed loop.

    2. Typical Architecture of Dual-Node 16-Card Training

    1. Hardware Topology

    A common configuration for dual-node 16 cards is inserting 8 training accelerator cards into each server. Intra-node cards communicate via a high-speed interconnect bus (such as a private NVLink-like interconnect protocol) to achieve high bandwidth. The two servers are interconnected via multi-port high-speed network interface cards (e.g., 200Gbps level) to form a compute network.

    This topology dictates the basic parallel strategy:

    • Intra-node 8 cards: High interconnect bandwidth makes it suitable for placing Tensor Parallelism (TP) or Expert Parallelism groups to reduce communication overhead.
    • Inter-node 2 machines: Relatively limited bandwidth makes it suitable for placing Data Parallelism (DP) or Pipeline Parallelism (PP) groups to reduce the frequency of cross-node communication.

    2. Parallel Strategy Design

    Taking a dense model with tens to hundreds of billions of parameters as an example, the typical partitioning method is as follows:

    1. Total Parallelism = TP × PP × DP = 16
    2. Example Configuration: TP=2, PP=2, DP=4
    • Tensor Parallelism (TP=2): Splits the weight matrices of the Attention and FFN layers by column/row, placing them on intra-node cards with high-bandwidth interconnects.
    • Pipeline Parallelism (PP=2): Splits the layers by depth into two stages, deployed across nodes, combined with 1F1B scheduling to reduce bubbles.
    • Data Parallelism (DP=4): The remaining cards form data parallelism groups, combined with ZeRO to shard optimizer states and reduce memory redundancy.

    This mapping principle of “intra-node TP, inter-node PP/DP” is a universal best practice in heterogeneous computing environments.

    1. Operator and Framework Adaptation

    The first hurdle in the training pipeline is operator coverage. Transformer training involves matrix multiplication, LayerNorm, Softmax, Rotary Position Embedding (RoPE), and FlashAttention-like fusion operators. Domestic chips need to complete operator registration, precision alignment, and performance tuning through self-developed compiler stacks or plugin mechanisms integrated with mainstream training frameworks. Engineering teams typically use the following validation methods:

    • Build a single-operator precision test set, compare it with reference implementations, and control the relative error within 1e-3.
    • Perform numerical consistency validation on fusion operators to ensure the loss curve trend under mixed precision is consistent with the baseline hardware.

    2. Communication Library and Collective Communication Optimization

    The performance bottleneck of cross-node training is often communication. Key optimization areas include:

    • Gradient AllReduce/ReduceScatter: Overlapping with computation to hide communication time.
    • Pipeline Communication Scheduling: Using bucketed sending and bidirectional pipelining to improve cross-node bandwidth utilization.
    • Topology-Aware Routing: The communication library selects the optimal path based on bandwidth differences between intra-node and inter-node cards.

    3. Memory and Long Sequence Optimization

    The memory pressure in large model training comes from activations, optimizer states, and temporary buffers. Common methods include:

    • Activation checkpointing: Trading time for space.
    • Optimizer state sharding (ZeRO-1/2): Splitting momentum and variance parameters across data parallelism groups.
    • FlashAttention implementation: Reducing the memory footprint of the attention mechanism, lowering complexity from quadratic to linear.

    4. Stability and Fault Tolerance

    Stably running 400 steps is backed by a comprehensive stability guarantee mechanism:

    • Loss Monitoring and Anomaly Detection: Setting gradient norm thresholds to automatically detect loss spikes and roll back.
    • Checkpointing: Periodically saving checkpoints to allow training to resume after node failures.
    • Precision Inspection: Periodically comparing weight hashes across different ranks to detect silent data corruption.

    4. What the 400-Step Validation Indicates

    Training pipeline validation typically observes the following metrics:

    Observation Item Focus Point
    Loss Convergence Trend Whether the decline slope is consistent with the reference implementation
    Throughput Tokens processed per card per second (MFU)
    Memory Peak Whether there is a safety margin to handle long sequences
    Communication Ratio Proportion of AllReduce time to total step time
    Failure Rate Continuous operation without card hangs or silent errors

    Stable operation for 400 steps means that operator correctness, communication correctness, and parallel scheduling correctness have all passed preliminary tests. Of course, there is still a gap compared to large-scale, long-term training (thousands of cards running continuously for weeks). Subsequent polishing is needed in areas such as thousand-card scalability, cluster scheduling, and fault self-healing.

    5. Implications for Developers

    1. Software-hardware co-design is the core proposition for domestic compute. Hardware peak compute is just the starting point; the maturity of compilers, communication libraries, and framework plugins determines the actual achievable MFU.
    2. Migration cost controllability is a key selection factor. If the training framework layer is compatible with interfaces and scripts from mainstream ecosystems, the transformation cost on the business side will be significantly reduced.
    3. Cloud toolchain support is indispensable. General cloud capabilities such as containerized images, monitoring and alerting, logging services, and object storage checkpoint management are the foundation for stable large-scale training. Regardless of the underlying chip, support from these infrastructure components is essential.

    6. Conclusion

    Running 400 steps of training on dual-node 16 cards is a significant step for domestic AI compute moving from “usable for inference” to “usable for training.” Although there are still performance and ecosystem gaps compared to mature ecosystems, the successful connection of the end-to-end pipeline validates the feasibility of the technical path. For developers, rationally evaluating the practical value of heterogeneous compute requires focusing on operator ecosystem maturity, migration costs, and cluster-level stability. As the software stack continues to iterate, a landscape where diverse compute supports large model training is worth looking forward to.