Two-Node, 16-Accelerator Training on Domestic Heterogeneous AI Hardware: An Implementation Guide

    This guide covers bringing up a large language model training pipeline on non-mainstream accelerator cards across two nodes with 16 domestic heterogeneous accelerators. It covers a 400-step smoke test, the measurement details needed to reproduce results, common operator, communication, and memory issues, parallelism trade-offs, failure modes to monitor, and the limits of short validation runs.

    1. Introduction

    As large language models keep growing in parameter count, training depends more and more on compute. Running a training pipeline on non-mainstream accelerator cards can reduce supply chain risk and widen the range of compute options. This article uses a 400-step smoke test on two nodes with 16 accelerators, with 8 domestic heterogeneous accelerator cards per node, as a thread to outline the key steps in adapting the pipeline.

    The scope of this test is narrow. 400 steps show that the pipeline can start, run, and complete training. They do not show convergence quality, and they do not represent the behavior of large clusters.

    2. Define the Validation Scope First

    Any performance number is only useful with the conditions under which it was measured. When reproducing or reporting results, record at least the following:

    • Hardware: accelerator model, intra-node interconnect type and bandwidth, and inter-node network type (RoCE v2 or InfiniBand) and bandwidth.
    • Software: driver and firmware versions, operator library version, and deep learning framework and communication library versions.
    • Model and training: parameter count, numerical precision, batch size, sequence length, optimizer, and ZeRO stage.
    • Parallelism: TP and DP values, and process placement.
    • Metrics: measurement window, collection tool, and sampling interval.

    Without this information, readers cannot judge whether the results apply to their own environments.

    3. Three Common Challenges and Troubleshooting Approaches

    1. Missing or underperforming operators. Typical symptoms include errors during operator lookup in the framework, or one layer taking noticeably longer than on a homogeneous platform. To troubleshoot, first run single-operator tests to compare numerical error against a reference implementation. Then use a profiling tool to confirm the hotspots. One option is to register a custom operator, but verify both accuracy and throughput. Write throughput targets as metrics to be measured rather than committing to a target value up front.

    2. Low communication efficiency. In multi-node training, communication waits lower overall throughput. Before training, use a collective communication benchmark tool to measure bandwidth and latency within a node and across nodes. Compare these results with per-step time during training. If communication and computation do not overlap, try gradient bucketing and observe how the share of communication time per step changes.

    3. Framework compatibility and memory issues. When the graph compiler and the memory allocator do not match, OOM errors or runtime crashes are likely. Record peak memory and fragmentation statistics for each step, and check whether they keep rising as training progresses.

    4. Parallelism Trade-offs

    This configuration uses two-dimensional hybrid parallelism with TP=8 and DP=2. Tensor parallelism runs within a node and depends on the intra-node interconnect. Data parallelism runs across nodes and depends on gradient synchronization between them.

    If the intra-node interconnect is only PCIe, TP communication overhead will be significantly higher than on a high-speed proprietary bus. In that case, consider reducing TP or adjusting the partitioning granularity. Verify the effect of any change with benchmark data.

    5. Monitoring Points During the 400-Step Run

    During the smoke test, focus on these failure modes:

    • Loss becomes NaN or suddenly spikes. This usually relates to numerical precision, gradient clipping, or operator errors.
    • Gradient norm keeps increasing. Check the learning rate and gradient clipping settings.
    • Memory allocation fails. Check peak usage and fragmentation rate.
    • Collective communication times out. This is often caused by network configuration or a faulty accelerator card.

    Logs should include fields such as step, loss, gradient norm, peak memory, per-step time, and communication time. Set alert thresholds based on your own baseline data. Do not copy thresholds directly from other setups.

    6. Scope Limits and Alternatives

    The conclusions here apply to short training runs on the specified hardware and software combination. For long pretraining runs or scaling to thousands of accelerators, validate convergence curves, fault recovery capability, and linear speedup separately.

    When compute is limited, you can first build a baseline comparison on homogeneous GPUs, or validate the pipeline on an elastic cloud cluster. You can also check whether the pipeline runs end to end with a small-scale LoRA fine-tune. Estimate the cost and risk of each option before committing to a project.