Running Multi-Node Multi-Card Training on Domestic AI Accelerators: A Practical Walkthrough
As AI compute diversifies, more teams are running large-model training on domestic AI accelerators. This article explains why getting a training pipeline to actually run—not just launch—is a milestone in its own right. It walks through the seven-step closed loop that a genuine distributed run must satisfy (data loading, forward pass, backpropagation, parameter update, gradient synchronization, checkpointing, and monitoring), then examines the core challenges of multi-node, multi-card parallelism and communication, the key hardware-software co-adaptation steps, and practical methods for verifying convergence and stability. It closes with production-oriented recommendations on layered benchmarking, observability, fault tolerance, and version management, using a 400-step run across two nodes and 16 cards as the reference case.
1. Background: Why “Getting the Pipeline Working” Is a Milestone of Its Own
Under the trend toward diversified AI compute, a growing number of teams are attempting to run large-model training on domestic AI accelerator hardware. On the surface, “getting the training script running” seems like no more than setting a few runtime parameters. In engineering practice, however, an entire system of hardware-software co-adaptation stands between letting the processes start and getting the training pipeline to actually run and converge stably.
Take, as an example, a team that validated a 400-step training run of a large model on domestic accelerators using a two-node, 16-card configuration (8 cards per node). The significance of this milestone is that it demonstrates the whole chain has been connected—from device drivers, operator libraries, and communication libraries, through the distributed training framework, mixed-precision strategy, and checkpointing mechanism—and that it stays numerically stable with loss decreasing normally across many iterations. It is both a reflection of hardware ecosystem maturity and a key criterion for judging “whether this hardware can be used for longer training cycles.”
It is worth emphasizing that 400 steps is not a “performance result” in itself, but rather an observation window that is both long enough and short enough: long enough to surface hidden problems such as numerical divergence, communication deadlock, and memory leaks, yet short enough to expose faults early and avoid wasting compute over long, unproductive runs.
2. What “Working” Really Means: The Full Loop from Launch to Convergence
Many teams equate “training started successfully” with “the pipeline works,” and this is a common misconception. A genuinely successful distributed training run should at least complete the loop below and verify correctness at every step:
- Data loading: The data pipeline correctly shards, shuffles, and batches, with no duplication or omission.
- Forward pass: The model runs forward correctly on the accelerator, with output tensors free of NaN/Inf.
- Backpropagation: Gradients are computed correctly, with numerical error against a CPU or reference implementation within an acceptable range.
- Parameter update: The optimizer updates weights correctly, and the learning-rate schedule advances as planned.
- Gradient synchronization: all-reduce / reduce-scatter communication among cards is correct, and parameters stay consistent across cards.
- Checkpoint saving and recovery: Checkpoints are written to disk correctly and support resuming from an interruption.
- Monitoring and logging: Metrics such as loss, throughput, memory, and communication time are observable.
Only when all seven points run stably for hundreds of steps can we call it “working.” The following illustrative training loop sketches the core skeleton of this closed loop:
for step, batch in enumerate(dataloader):with autocast(): # mixed-precision contextloss = model(batch).lossloss.backward() # backpropagationoptimizer.step() # parameter update (with gradient clipping)scheduler.step() # learning-rate schedulingoptimizer.zero_grad()# gradient communication is handled automatically by the communication library during backward / stepif step % log_interval == 0:log_metrics(step, loss, throughput, mem)if step % ckpt_interval == 0:save_checkpoint(step) # checkpoint to disk
3. Core Challenges of Multi-Node, Multi-Card Distributed Training
Two nodes with 16 cards may seem like a small scale, but it is enough to expose the most typical classes of engineering problems in distributed training.
Choosing combinations of parallelism. Large-model training usually mixes several parallelism strategies: data parallelism (DP) to scale throughput; tensor parallelism (TP) to split a single layer’s parameters across cards; pipeline parallelism (PP) to partition the model by layer; and memory-optimization strategies (such as parameter sharding) to relieve per-card memory pressure. On domestic hardware, the difficulty is not “whether it can be used” but whether these strategies are compatible with the accelerator’s interconnect topology and operator implementations. For instance, a given sharding scheme may be efficient on reference hardware but, after moving to new hardware, cause the communication share to spike because the operators are not optimized.
Interconnect topology and communication overhead. Within a node there is usually high-bandwidth interconnect (for fast inter-card communication), while between nodes the network is used. Communication-intensive parallelism like TP is generally confined within a node, while PP/DP spread across nodes. Poor topology planning leads to large volumes of small cross-node messages, which become a throughput bottleneck.
Adapting and tuning the communication library. The quality of collective communication primitives (all-reduce, all-gather, reduce-scatter) on the accelerator directly determines multi-card scaling efficiency. Domestic hardware often needs a dedicated communication-library adaptation layer and requires tuning of parameters for algorithms such as ring and tree.
4. Key Steps in Hardware-Software Co-Adaptation
Whether the pipeline runs is essentially determined by how completely the following layers are adapted:
- Device drivers and runtime: Ensure the accelerator is correctly recognized by the framework, and that device management and memory allocation work normally.
- Operator library: Operators needed for forward/backward passes must have corresponding implementations; missing operators must be worked around with fallbacks or composite operators. This is the most common source of “it won’t run.”
- Framework adaptation layer: The distributed framework must plug in new device and communication backends, ensuring parallelism strategies and gradient-synchronization logic are correctly routed to the new hardware.
- Mixed precision: Confirm that half-precision computation and loss scaling behave numerically stably on the hardware, avoiding overflow or precision loss.
- Communication-computation overlap: Overlapping communication with forward/backward computation is a key optimization for squeezing out throughput.
A pragmatic adaptation strategy is “layered validation, layer-by-layer convergence“: first verify correct single-step forward/backward numerics on one card, then scale to multiple cards on one node to verify communication correctness, and finally verify topology and stability across nodes. Problems at each layer are localized in the smallest possible scope, avoiding blind debugging at the 16-card scale.
5. Verifying Convergence and Stability
Once it runs, one question must be answered: is it training correctly? Common verification methods include:
- Loss-curve comparison: Under the same data and hyperparameters, compare the loss curve on the accelerator against a reference implementation. Consistent trends and comparable magnitudes are strong evidence that the pipeline is correct.
- Numerical divergence investigation: If loss spikes or NaN appear, first investigate the loss scaling of mixed precision, the learning rate, gradient clipping, and the numerical boundary behavior of individual operators.
- Checkpoint round-trip consistency: After saving a checkpoint, reload it and resume training, verifying that loss continues seamlessly and weights show no deviation.
- Reproducibility: With a fixed random seed, repeated runs should produce identical or highly similar results.
6. Production Engineering Recommendations
- Establish layered benchmarks: Set throughput and numerical baselines for single-card, single-node, and multi-node respectively, so that a regression at any layer can be detected quickly.
- Strengthen observability: Use monitoring/alerting and logging services to continuously collect throughput, memory, communication time, and loss, with automatic alerts on anomalies.
- Complete fault tolerance and resume-from-checkpoint: Write checkpoints to disk regularly and persist them to object storage, supporting recovery from the latest checkpoint after a failure to reduce the sunk cost of long training cycles.
- Manage operators and versions: Record the version matrix of hardware drivers, operator libraries, communication libraries, and frameworks, ensuring problems are traceable and environments are reproducible.
Conclusion
Getting a large-model training pipeline running on domestic AI accelerators, and completing 400 iterations across two nodes and 16 cards, derives its value not from any single number but from validating that a complete technical stack—from hardware to framework—can be engineered for real use. For teams that want to run training tasks in a diversified-compute environment, understanding the seven-step closed loop behind “working,” the parallelism and communication challenges of multi-node, multi-card setups, the layered adaptation methodology, and the means of verifying convergence is the key to turning a one-time successful validation into sustainable production capability.
