Dual-Node 16-Card Domestic General-Purpose GPU Training Pipeline: Validation and Reproduction Guide
This article documents an end-to-end validation of a large language model training pipeline on two servers with eight domestic general-purpose GPU accelerators each, for a total of 16 cards. The run covers data loading, forward and backward propagation, gradient synchronization, parameter updates, checkpoint saving, and checkpoint resume over 400 training steps with BF16 mixed precision. It uses a 3D parallelism layout of tensor parallelism 4, pipeline parallelism 2, and data parallelism 2. The article describes the hardware and network topology, parallel mapping, dense and sparse gradient synchronization modes, environment dependencies, launch commands, data pipeline, hyperparameters, monitoring metrics, fault tolerance, results, limitations, and a troubleshooting checklist. It focuses on general distributed-training engineering methods rather than vendor-specific proprietary interfaces, and it is intended to help teams reproduce and validate a small-scale training pipeline before scaling further.
Dual-Node 16-Card Domestic General-Purpose GPU Training Pipeline: Validation and Reproduction Guide
As large language model parameter counts continue to grow, the engineering complexity and compute cost of training also rise. Many research teams and small and medium-sized enterprises do not have large-scale clusters, so they can only validate training pipelines on a small number of nodes. This article records a validation process in a dual-node, 16-card domestic general-purpose GPU environment. The goal is to run the complete pipeline from data reading to checkpoint resume and to organize the configuration into a reproducible form.
This article does not rely on vendor-specific proprietary interfaces. It mainly discusses general engineering methods for distributed training. For any parameters related to hardware or driver versions, the platform vendor documentation should be treated as the authoritative reference.
1. Validation Goals and Scope
This validation focuses on three things: whether the pipeline can run end to end, whether the training process is stable, and whether the configuration can be reproduced by others. The validation does not pursue maximum throughput, and no performance comparison with other solutions is made in this article. Therefore, no speed conclusions are given.
The validation scope is as follows:
- Model: a large language model based on the Transformer architecture, at the ten-billion-parameter scale.
- Training steps: 400 steps.
- Hardware scale: 2 servers, each with 8 domestic general-purpose compute accelerator cards, 16 cards in total.
- Training precision: BF16 mixed precision.
The training pipeline must cover data loading, forward and backward propagation, gradient synchronization, parameter updates, and checkpoint saving and resume. There are three main engineering challenges. The first is cross-node communication. Bandwidth between two nodes is usually lower than intra-node card-to-card bandwidth, so gradient synchronization can easily become a bottleneck. The second is the choice of parallelism strategy. A single card cannot hold the full model in memory, so multiple parallelism methods need to be combined. The third is long-run stability. Network jitter, hardware failures, and numerical anomalies can all interrupt training.
2. Hardware, Network, and Storage Topology
The hardware topology of this environment is shown in the table below.
| Component | Configuration | Description |
|---|---|---|
| Compute nodes | 2 nodes, 8 accelerator cards per node | Intra-node cards are interconnected through a PCIe Switch |
| Data network | RDMA-capable high-speed Ethernet | Used for inter-node gradient synchronization and activation transfer; record switch model and bandwidth during deployment |
| Storage | Distributed file system mounted over RDMA | Stores datasets, checkpoints, and logs |
| Management network | Separate gigabit management ports | Handles monitoring, job scheduling, and system management; physically isolated from the data network |
Storage and training communication share the same RDMA network, so the two types of traffic contend for bandwidth. Peak data-reading periods may slow down gradient synchronization. Therefore, the concurrency level of data prefetching needs to be set according to the available network headroom rather than simply increased.
The management network and data network are deployed separately to prevent monitoring and scheduling traffic from interfering with training communication. During deployment, record the data network interface name and IP address of each node, because the launch command later needs this information.
3. Parallelism Strategy and Communication Configuration
This validation uses a three-dimensional combination of tensor parallelism, pipeline parallelism, and data parallelism. The 16 cards are partitioned as follows: tensor parallelism 4 ways, pipeline parallelism 2 stages, and data parallelism 2 replicas, satisfying 4 × 2 × 2 = 16.
The specific mapping is as follows. Each node hosts one complete model replica, and the replica is divided internally by node:
- Pipeline stage 1 uses cards 0 to 3 on the node and forms a 4-card tensor-parallel group.
- Pipeline stage 2 uses cards 4 to 7 on the node and also forms a 4-card tensor-parallel group.
- The two nodes each hold one replica, and data parallelism is performed between the replicas. Gradient synchronization takes place between the nodes.
The reason for this arrangement is that tensor-parallel activation aggregation and pipeline stage-to-stage transfer are frequent and carry large amounts of data, so they should be kept on the high-bandwidth intra-node interconnect as much as possible. Only gradients are transmitted across nodes, which keeps communication volume relatively manageable.
Data-parallel gradient synchronization uses all-reduce mode and does not use a parameter server. The key parameters in the configuration file are as follows.
config = {"tensor_parallel_size": 4, # Intra-node tensor parallelism degree"pipeline_parallel_size": 2, # Number of intra-node pipeline stages"data_parallel_size": 2, # Number of cross-node data-parallel replicas"global_batch_sequences": 512, # Global batch size in sequences"gradient_accumulation_steps": 8, # Gradient accumulation steps"pipeline_microbatch_size": 4, # Sequences per pipeline microbatch"gradient_sync_mode": "dense", # Baseline mode: dense synchronization"sync_interval": 1, # Synchronize every step"sparse_ratio": 0.01, # Retention ratio in sparse mode}
The global batch size is calculated as follows: each replica processes 512 ÷ (2 × 8) = 32 sequences per accumulation step, split into 8 microbatches of 4 sequences each.
There are two gradient synchronization modes.
The first is dense synchronization, where all gradients are all-reduced once at every iteration step. This is the recommended baseline mode in this article. Its results are the easiest to explain and to compare with other configurations.
The second is sparse synchronization, which was used in the run record for this validation. The specific approach is as follows: after gradients are computed at each step, they are accumulated into a local residual buffer. The top 1% of elements by absolute value are selected as sparse updates and subtracted from the residual. The selected sparse updates are first accumulated in a local buffer, and an all-reduce is performed every K steps. The buffer is cleared after synchronization. Gradients that are not selected remain in the local residual and participate in subsequent iterations.
There are two caveats for sparse mode. First, the synchronization interval K is a tunable parameter. The K value in the original run record needs to be confirmed from the job configuration, and this article does not compare different K values. Second, sparsification and delayed synchronization cause parameter updates to lag, so both convergence speed and final loss may differ from dense synchronization. Therefore, sparse mode must be compared with the loss curve of a dense baseline before its usability can be judged.
4. Environment Dependencies and Launch Command
Before reproduction, confirm the following software environment. Version numbers are subject to the compatibility matrix published by the platform vendor, and different components should not be mixed arbitrarily.
| Component | Version Requirement | Description |
|---|---|---|
| Accelerator card driver | Vendor-matched release | Driver versions on both nodes must be identical |
| Device runtime | Version paired one-to-one with the driver | Check the compatibility matrix before upgrading |
| Deep learning framework | Vendor-adapted PyTorch version | Do not mix with community versions |
| Collective communication library | Vendor release | Handles intra-node and cross-node all-reduce |
| Python | 3.10 or later | Must match the framework version |
After both nodes are deployed, first run a device self-check on each node to confirm that all cards are visible and that the driver and runtime versions match those on the other node.
The launch command must be executed separately on both nodes, with NODE_RANK set to 0 and 1 respectively.
# Specify the RDMA data network interface; variable names should follow the vendor communication library documentationexport DATA_NIC=<data NIC name># Run on node 0 and node 1 separately, with NODE_RANK set to 0 and 1 respectivelytorchrun --nnodes=2 --nproc_per_node=8 --node_rank=${NODE_RANK} \--master_addr=<data-network IP of node 0> --master_port=29500 \train.py --config configs/dual_node_16card.yaml
If the vendor framework uses another launch method, follow the vendor documentation. To resume training from a checkpoint, set resume to latest in the configuration, and the program will automatically read the latest checkpoint from storage.
5. Data, Hyperparameters, and Monitoring
5.1 Data Loading Pipeline
Training data is stored in TFRecord format in the distributed file system. Multiple data loader processes concurrently perform reading, decoding, tokenization, and shuffling. The processed batches are sent to a cache queue resident in GPU memory so that compute units can immediately fetch the next batch of data.
This cache queue consumes GPU memory, and its capacity limit needs to be set separately. If the cache is too large, there will not be enough memory left for computation.
5.2 Hyperparameter Settings
The main hyperparameters for this validation are as follows.
| Parameter | Setting | Description |
|---|---|---|
| Optimizer | AdamW | Standard weight decay setting |
| Peak learning rate | 3e-4 | Linear warmup after training starts |
| Warmup steps | 200 steps | Linear increase from 0 to peak to prevent early divergence |
| Learning rate schedule | Cosine annealing | Decay cycle aligned with the 400 total steps |
| Minimum learning rate | Set to 10% of peak (recommended) | The original record did not provide this value; set it explicitly when reproducing |
| Global batch size | 512 sequences | Achieved through data parallelism and gradient accumulation |
| Sequence length | 4096 tokens | Standard long-text training length |
| Precision strategy | BF16 mixed precision | Balances dynamic range and compute efficiency |
| Activation recomputation | Enabled | Trades extra compute for lower memory usage |
5.3 Monitoring Metrics
During training, key metrics are recorded every 10 steps, mainly in the following categories.
- Training metrics: loss value, global gradient norm, and current learning rate.
- Efficiency metrics: tokens processed per second.
- Hardware metrics: temperature, memory usage, and compute utilization of each card.
- Communication metrics: data network interface receive/transmit throughput, RDMA retransmission count, and communication timeout count.
Inter-card interconnect throughput and error counts should also be included in collection so that compute issues and communication issues can be distinguished.
Initial alarm thresholds are set as follows. Actual values need to be adjusted according to runtime conditions.
- Stop training immediately if the loss value becomes NaN or Inf.
- Send an alert when the global gradient norm exceeds 3 times the sliding average of the last 100 steps.
- Send an alert when card temperature exceeds the vendor-specified safe limit.
- Send an alert when the RDMA retransmission count rises significantly within a single collection period.
The measurement basis for efficiency metrics needs to be consistent. Throughput is taken as the average from step 21 to step 400, which removes the startup overhead of the first 20 steps. Compute efficiency can be measured by model FLOPs utilization (MFU), calculated as actual compute per second divided by the theoretical peak compute of the cluster. The training compute per token is estimated as 6N, where N is the number of model parameters.
6. Fault Tolerance and Checkpoint Resume
During training, checkpoints are saved asynchronously every 50 steps, and saving does not block the main training loop. Checkpoints are written to the storage system and include model parameters, optimizer state, and the current step.
If training is interrupted, the script resumes from the most recent checkpoint. Because the checkpoint interval is 50 steps, each resume recomputes at most 49 steps. After resuming, two things need to be confirmed: whether the data reading position is synchronized back to the position corresponding to the checkpoint, and whether the residual buffer in sparse mode has been saved. If the residual buffer is not saved, sparse gradients that have not yet been synchronized will be lost during resume, which causes a small loss jump.
7. Results and Limitations
This validation completed the planned 400 steps, and the entire process lasted several hours. The loss curve declined smoothly overall, with no obvious spikes or gradient explosion.
During training, network jitter caused 2 communication timeouts. Both timeouts were handled by the fault-tolerance mechanism, and the training script automatically resumed from the most recent checkpoint and eventually completed all 400 steps.
The conclusions of this article have the following limitations.
- There is no performance comparison experiment. No throughput or MFU values are reported, and it is not possible to judge whether this solution is faster or slower than other configurations.
- There is only one run record, and no run-to-run variation from repeated experiments is reported.
- No controlled experiment was performed between dense synchronization and sparse synchronization, and the impact of sparse mode on final convergence quality has not been quantified.
- Model performance on downstream tasks was not evaluated. This article only validates the training pipeline itself.
- The conclusions apply to the small-scale scenario of two nodes and 16 cards. When scaling to more nodes, communication overhead, storage pressure, and failure rate will all change, and re-measurement is required. Results cannot be directly extrapolated linearly by node count.
8. Troubleshooting Checklist
Common problems during reproduction and their troubleshooting directions are as follows.
- A node does not respond for a long time after launch: check whether the master node address between the two nodes is reachable, whether port 29500 is blocked by a firewall, and whether the data network interface binding is consistent.
- Timeout during initialization: confirm that the driver and runtime versions on both nodes are exactly the same.
- NaN loss value: check whether the learning rate is too high, whether the gradient norm has spiked, and whether abnormal samples have entered the data.
- Sudden throughput drop: check whether storage reads are saturating network bandwidth, whether the RDMA retransmission count is rising, and whether any card is throttling due to high temperature.
- Sparse mode loss significantly higher than the dense baseline: first set the synchronization interval K to 1 and fall back to dense synchronization, then confirm whether the residual buffer is correctly saved during checkpoint resume.
- Loss jump after resuming training: confirm whether the data iterator state is restored together with the checkpoint.
- Insufficient GPU memory: reduce the microbatch size or lower the capacity limit of the GPU data cache queue.
9. Next Steps
Future work can proceed in three directions. The first is to add performance comparison experiments, including throughput and convergence comparisons between dense and sparse synchronization, as well as the impact of different K values, with reproducible measurement results. The second is to improve fault tolerance for long-running training, for example by saving the residual buffer so that the training state after resume is more complete. The third is to repeat the validation on more nodes and observe how communication overhead and failure rate change with scale.
For teams preparing to conduct large model training in a similar environment, it is recommended to first reproduce the dense synchronization baseline using the configuration in this article. After confirming that the pipeline is stable, gradually introduce optimizations such as sparse synchronization, and compare each change against the baseline.
