Validating LLM Training Pipelines on Domestic AI Accelerators: End-to-End Runs, Convergence, and Performance Baselines

    Before committing large-scale compute to pre-training, teams need to validate the full LLM training pipeline on their hardware. This article explains why validating end to end matters, and covers the three core goals: end-to-end execution, convergence, and performance baselines. It then walks through setting up and checking a multi-node, multi-GPU environment on domestically developed AI accelerators (China-based hardware), from hardware topology and software stack consistency to a collective communication self-check. It also covers choosing and combining data, tensor, pipeline, and hybrid parallelism, the key training metrics to monitor, and how to troubleshoot common issues such as a non-converging or NaN loss, out-of-memory errors, and training hangs. It closes with best practices: start small, keep versions consistent, build observability from day one, and document baselines before scaling up.

    Introduction: get the pipeline running before scaling up

    Training a large language model is a highly complex systems engineering effort. It involves huge numbers of parameters, massive datasets, distributed communication, and deep coupling between hardware and software ecosystems. Whether you are using domestically developed AI accelerators (China-based hardware) or general-purpose deep learning frameworks, you need to complete a full round of training pipeline validation before starting large-scale pre-training.

    The training pipeline is the entire workflow that runs from data loading, model construction, and the forward pass through backpropagation, gradient synchronization, and parameter updates, all the way to checkpoint saving. It has to run end to end and remain stable.

    The value of pipeline validation lies in surfacing problems as early and as cheaply as possible. Production training can run on thousands of accelerators for weeks at a time. By comparison, a validation run on two nodes with 16 accelerators for a few hundred steps can check within hours whether the environment is set up correctly, the parallelism strategy is sound, loss converges, and performance meets targets. Think of it as a full-pipeline rehearsal that helps the team flush out both obvious and hidden risks before committing a serious compute budget.

    Three core goals of training pipeline validation

    A rigorous validation exercise usually focuses on three goals:

    • End-to-end execution: Confirm that the code, framework, drivers, communication libraries, and datasets work together seamlessly across the full hardware and software stack, with no crashes, hangs, or data misalignment.
    • Convergence check: Watch whether the loss decreases steadily as training progresses. If the loss becomes NaN, swings sharply, or stays flat for a long time, numerical precision, initialization, or data preprocessing may be at fault.
    • Performance baseline measurement: Record throughput (e.g., tokens processed per second), per-step time, memory usage, and communication overhead. Together these form a baseline for comparison that guides later scaling and tuning.

    These goals build on one another, and none can be skipped. Training that runs but never converges is pointless. Training that converges but performs poorly cannot support the economics of large-scale runs.

    Setting up and validating a multi-node, multi-GPU environment

    The first step in building a multi-node, multi-GPU training environment on domestic AI accelerators is to map out the hardware topology. In a typical two-node, 16-accelerator setup, each server has eight accelerators. Within a node, high-speed interconnect links handle communication between accelerators. Across nodes, data is exchanged over a high-speed network such as RDMA.

    Understanding this topology matters because it shapes how you assign parallelism dimensions: some splits stay within a node, while others span nodes. Intra-node bandwidth is usually much higher than inter-node bandwidth, so communication-intensive parallelism dimensions should stay within a node whenever possible.

    The second step is to prepare the software stack. A typical training environment includes at least:

    • The accelerator drivers and runtime
    • A deep learning framework with its hardware-specific backend for the accelerators
    • A collective communication library that handles distributed operations such as all-reduce and all-gather
    • Data processing and scheduling components

    Once the environment is built, run a consistency check to confirm that driver, framework, and communication library versions are identical on every node. Version mismatches are one of the most common and hardest-to-spot sources of failure in distributed training.

    The sample code below performs a simple collective operation to check multi-node, multi-GPU connectivity:

    1. # Environment self-check: verify multi-node, multi-GPU collective communication
    2. # This is a logical illustration only; exact APIs depend on your framework and hardware backend
    3. # 1. Initialize the distributed process group (backend depends on the hardware backend)
    4. init_distributed(backend="<collective communication backend provided by the hardware vendor>")
    5. rank = get_rank() # ID of the current process
    6. world_size = get_world_size() # total number of accelerators participating in training
    7. # 2. Each accelerator builds a local value, then performs a sum reduction
    8. global_sum = all_reduce(rank + 1, op="sum")
    9. # 3. Check that the reduced result equals 1 + 2 + ... + world_size
    10. expected = world_size * (world_size + 1) // 2
    11. if global_sum == expected:
    12. print(f"[rank {rank}] Communication check passed, world_size={world_size}")
    13. else:
    14. print(f"[rank {rank}] Communication check failed: {global_sum} != {expected}")

    Once every rank prints a “passed” message, the communication paths across the multiple nodes and accelerators are working. You can then move on to validating model training.

    Choosing and combining parallelism strategies

    When a single machine cannot hold all of a large model’s parameters, gradients, and optimizer states, you need parallelism strategies to spread the workload across multiple accelerators and nodes. The main approaches can be combined:

    • Data parallelism: Each accelerator holds a full copy of the model, processes a different batch of data, and synchronizes parameters through gradient reduction. It is simple to implement and scales well, but duplicates model state on every accelerator, which uses a lot of memory.
    • Tensor parallelism: Splits the matrix operations within a single layer across multiple accelerators for parallel computation. It requires frequent communication, so it fits best where bandwidth is plentiful, such as within a node.
    • Pipeline parallelism: Splits the model into layers placed on different devices and passes activations and gradients between them like an assembly line. It can greatly reduce the memory pressure on each accelerator, but requires handling pipeline bubbles.
    • Hybrid parallelism: Combines several of the approaches above, such as tensor parallelism within a node plus data parallelism across nodes. This is the mainstream approach for training very large models today.

    Choosing a strategy means balancing memory usage, communication overhead, and compute efficiency. A key task during validation is to compare per-step time and memory usage under different parallelism combinations to find the best configuration for the current hardware.

    Monitoring training and key metrics

    Once training starts on the two nodes, put a monitoring system in place to track these metrics in real time:

    • Loss curve: The most direct signal of convergence. In healthy training, loss decreases smoothly. Sharp swings or NaN values call for immediate investigation.
    • Throughput (tokens/s): A key measure of training efficiency that directly determines training cost.
    • Memory usage: Watch for usage nearing the limit to avoid out-of-memory (OOM) errors.
    • Per-step time and communication share: Use these to determine whether the bottleneck is in compute, communication, or data loading.
    • Load balance across accelerators: If a few accelerators are consistently slower, the cause may be uneven data distribution or uneven pipeline splits.

    Combine logging, metrics collection, and alerting. Use a logging service to collect training output in one place. Use a monitoring and alerting system to notify the team as soon as a metric goes out of range.

    This kind of observability matters especially during long training runs. It helps the team shift from firefighting when problems occur to preventing them in the first place.

    Common problems and troubleshooting approaches

    Validation runs tend to hit a few recurring types of problems:

    1. Loss does not converge, or becomes NaN: This is often related to mixed-precision settings, a learning rate that is too high, or exploding gradients. Start by lowering the learning rate, enabling gradient clipping, or checking the data for abnormal samples.
    2. Out of memory (OOM): This means the batch size, sequence length, or degree of parallelism splitting is too high for the available memory. Reducing the micro-batch size, enabling gradient checkpointing, or adjusting the parallelism configuration can help.
    3. Training hangs or slows sharply: Common causes include communication timeouts, a rank dropping out, or uneven load across accelerators. Check network connectivity, the communication library logs, and the load on each accelerator.
    4. Results differ from mainstream hardware: Accuracy or outputs that do not match those on mainstream hardware may come from differences in operator implementations or in how numerical precision is handled. Compare intermediate outputs layer by layer to locate where the results start to diverge.

    The core approach is to narrow the scope and use bisection to isolate the problem. First verify that the model is correct on a single accelerator. Then extend to multiple accelerators on one node, and finally to multiple nodes. Eliminating possible causes layer by layer in this way makes complex distributed failures much easier to diagnose.

    Summary and best practices

    Bringing up an LLM training pipeline on domestic AI accelerators takes patience and a systematic approach. A few key practices go a long way:

    • Start small and iterate quickly: Use a small model, a small dataset, and a short run (e.g., a few hundred steps) to validate the entire pipeline. Then increase the scale step by step.
    • Prioritize consistency: Keeping hardware and software versions identical across all nodes eliminates many hidden failures.
    • Build observability first: Set up metrics collection and alerting before training starts, rather than patching things together after problems appear.
    • Build up a baseline record: Document performance baselines, configuration parameters, and failure cases. These become assets for future training runs and team collaboration.

    Cloud platforms can make organizing multi-node, multi-GPU training jobs more flexible through general-purpose capabilities such as elastic compute, object storage, and container orchestration. Teams can then allocate resources on demand and standardize how training runs are set up.

    Once the pipeline has been thoroughly validated, the team can move on to large-scale pre-training with greater confidence in both success and compute cost. For teams developing LLMs on hardware they control themselves, treating “validate first, then scale” as a firm rule is usually safer and more efficient than rushing into a one-time, large-scale commitment.