Chinese-Made GPU Adaptation for Two-Node Multi-GPU LLM Training: Compatibility and Stability Practices
This article explains how to adapt Chinese-made GPUs for LLM training across two nodes with multiple GPUs each, and how to verify that such training runs stay stable. It covers why training adaptation is harder than inference deployment, the four stages of a training pipeline, the communication risks between nodes, the metrics for checking numerical and process consistency, and a practical checklist.
1. Why Training Adaptation Is Harder Than Inference Deployment
Inference deployment mainly focuses on whether a model can be loaded, whether its operators can run, and the latency and throughput of a single forward pass. Training requires every step to stay correct across a large number of consecutive iterations. The forward outputs, backward gradients, and parameter updates must all be correct at each step. An accuracy deviation or communication misalignment at any stage grows as iterations continue. It may eventually appear as a sudden non-finite loss value, or as training that quietly drifts from expected behavior after several steps. For this reason, training adaptation should be verified across numerical correctness, consistency between processes, and stability over long runs.
2. Adaptation Verification Versus Pretraining From Scratch
“Adaptation” means that a model can complete the full training workflow on a given hardware and software stack. “Pretraining” means that model parameters start from random initialization and the entire training run is completed on that hardware. The two have different verification goals. Adaptation verification focuses on whether operator coverage, memory management, parallelism strategies, and gradient synchronization work. Pretraining from scratch also has to account for data scale, training duration, convergence quality, and cost. When reading a technical article or report, first determine which of these two categories its conclusions belong to. Results from an intermediate adaptation stage cannot be directly treated as proof of full training capability.
3. Four Key Stages of the Training Pipeline
A complete LLM training pipeline typically includes the following four steps.
1. Model Loading
A very large model cannot fit entirely into the memory of a single accelerator card, so the loading stage must distribute parameters across devices according to a sharding strategy. During loading, verify the shape, data type, and random seed of each shard. This ensures that every process sees the same logical model.
2. Shard Scheduling
Fully sharded data parallelism splits parameters, gradients, and optimizer states across multiple processes. During the forward pass, parameters are gathered on demand and released after computation, which reduces the memory footprint on each card. The scheduling strategy must balance communication volume against peak memory usage. Shards that are too fine increase the number of communication operations. Shards that are too coarse can cause out-of-memory errors.
3. Gradient Synchronization
After backpropagation, the processes must reduce their gradients so that each shard holds a globally consistent gradient. This step relies on collective communication operations. Its correctness can be verified by comparing checksums of the same parameter across different processes.
4. Optimizer Update
The optimizer reads the global gradient and updates the local parameter shard. After the update, confirm that the parameter versions match across all processes, and record monitoring metrics such as the gradient norm. The pseudocode below shows the basic flow of a single training step. The function names are for illustration only and do not correspond to the interface of any specific framework.
# Pseudocode: single training stepfor step in range(total_steps):batch = loader.next_batch()loss = model.forward(batch) # Forward passmodel.backward(loss) # Backward pass; gradients are aggregated across shardsgrad_norm = compute_global_grad_norm(model) # Global gradient normif not is_finite(loss) or not is_finite(grad_norm):save_snapshot(step) # Save the current state for debuggingraise NumericalError(f"step {step}") # Numerical anomaly, abort immediatelyoptimizer.step()optimizer.zero_grad()
4. Communication and Consistency in Two-Node Multi-GPU Training
The main risks in cross-node training come from the network. Bandwidth between devices within a node is usually higher than the bandwidth between nodes, and cross-node latency is also higher. In practice, these risks can be managed in three areas.
- Communication topology: Keep high-frequency collective communication within a node whenever possible to reduce cross-node traffic.
- Overlapping communication with computation: Start gradient communication while backward computation is still running. This hides part of the communication latency.
- Timeouts and fault localization: Set reasonable timeouts for collective operations. When a single process fails, the system should quickly report the specific location of the failure instead of waiting indefinitely.
5. Metrics for Stability Verification
Validating a long training run should not rely only on whether the job finishes. At least the following four categories of metrics should be recorded.
- Finiteness: The loss and gradient norm at every step should be finite values. If NaN or Inf appears, stop immediately and save the current state.
- Completeness: All participating processes complete every optimizer update, with no process exiting early or hanging.
- Continuity: No unexpected interruptions occur within the target number of steps, and the recovery procedure after an interruption can be reproduced.
- Consistency: Periodically compare checksums of key parameters to confirm that all shards are at the same version.
Consecutive tests of several hundred steps can verify that the basic workflow runs smoothly, but they cannot demonstrate long-term convergence quality. When reporting test results, note the number of steps, the model size, the number of nodes, and the software versions. This prevents short-duration validation from being generalized into long-term conclusions.
6. Three Layers of an Engineering System
Training capability is typically organized into three layers. The bottom layer, operator adaptation, ensures that each computation produces correct results on the target hardware. The middle layer, multi-GPU coordination, handles parallelism strategies, communication scheduling, and fault tolerance. The top layer, the automation toolchain, handles job submission, log collection, fault diagnosis, and metrics dashboards. If any one of these layers is missing, training falls back to depending on manual intervention, which makes sustained stable operation difficult.
7. Practical Checklist
- Confirm the operator coverage required by the target model. Missing operators need alternative implementations or a clearly defined fallback plan.
- Compare results against a reference using a small-scale model, and verify that forward outputs and gradients fall within the tolerance range.
- Run continuous training for at least several hundred steps in a two-node, multi-GPU environment, and record loss, gradient norm, and throughput.
- Set automatic abort conditions for numerical anomalies, and save checkpoints regularly so training can resume from the most recent stable state.
- Record adaptation verification results separately from pretraining conclusions, and state the number of steps, the scale, and the runtime environment for each verification.
