Dual-Node, 16-GPU LLM Training Pipeline: End-to-End Bring-Up and Acceptance

    This article explains how to validate an end-to-end LLM training pipeline on two nodes with eight accelerators each, for 16 accelerators in total. It breaks the pipeline into six layers—hardware and drivers, network and communication, data loading, checkpoint save and restore, logging and monitoring, and job launch—and provides checks, pass criteria, and failure handling for each layer. It then describes a 400-step smoke test with checkpoint saves at steps 200 and 400, restore validation, and acceptance criteria such as no communication timeouts, finite loss, stable step time, and complete logs. The goal is to confirm that the environment can run continuously and reproducibly; model convergence and quality require longer training and a complete evaluation set.

    1. Why the Training Pipeline Matters

    Whether large-model training completes reliably depends on whether the entire pipeline can run continuously. A single operator running fast is only one part of the picture. A complete training run typically goes through runtime environment preparation, inter-node communication, job startup, data reading, forward and backward computation, gradient synchronization, checkpoint saving and restoration, and log and metric collection. If any link fails, the job may hang midway, results may not be reproducible, or compute resources may be wasted.

    Therefore, the standard for “getting the pipeline working” is much stricter than “the job can start.” It requires the job to run continuously in a multi-node environment, complete gradient synchronization, save checkpoints as planned, and have logs and metrics collected and traceable.

    This article uses a training task with two nodes, eight accelerators per node, and 16 accelerators in total. The “domestic GPU platform” in this article refers to an accelerator platform that has completed training-framework adaptation. Exact model, driver version, and software stack versions should be filled in according to the actual environment; angle-bracket placeholders are used below, and no fixed versions are assumed.

    This article uses 400 continuous steps as the scope of smoke validation. Four hundred steps are enough to verify whether the startup process, communication, data flow, and save logic close the loop, but they cannot indicate model quality or convergence quality. Convergence conclusions require longer training periods and a complete evaluation set.

    2. Breaking Down the Training Pipeline by Layer

    The training pipeline can be divided into six layers. When troubleshooting, confirm each layer step by step. Repeatedly adjusting upper-layer parameters before the lower layers are confirmed usually only wastes time. The thresholds in the table below are suggested values; teams can adjust them according to hardware specifications and business requirements.

    Layer Main checks Pass criteria Failure handling
    Hardware and drivers Card count, model, driver and runtime versions, memory, ECC mode Each node is fully consistent with the baseline node Stop startup, correct the node, and recheck
    Network and communication NIC status, MTU, bandwidth and latency, collective communication test Bandwidth reaches at least 90% of the nominal value; all nodes can communicate Test node pairs one by one and locate the faulty link
    Data loading Storage mount, data consistency, proportion of time waiting for data All nodes read the same data; waiting proportion does not exceed 5% Check mounts and permissions, fix them, and rerun
    Checkpoint save and restore Save path, write atomicity, continued training after restore Save succeeds; loss remains continuous after restore Keep the old checkpoint and investigate storage
    Logging and monitoring Per-card logs, loss, per-step time, memory Metrics have no gaps; timeout keywords are searchable Complete collection configuration and rerun
    Job launch Configuration file, process count, rank ID, random seed Rank parameters are consistent Generate configuration uniformly by script; prohibit manual parameter changes

    2.1 Hardware and Driver Layer

    The first task of the hardware layer is to confirm that each node has the same state. If the card count, driver version, or memory capacity of one node differs from other nodes, problems may appear in unexpected forms during runtime.

    • The number of accelerators detected by each node must match the configuration. When cards are missing, the total card count does not match, and process initialization usually fails.
    • Driver versions and runtime versions must be checked in pairs. When mixing old and new images or upgrading nodes in batches, version deviations are the easiest to overlook.
    • Cards in the same batch should have the same model, memory capacity, and ECC mode. Record card models and PCIe or interconnect topology to help locate hidden inconsistencies.

    The following function aggregates hardware information reported by each node and finds items that differ from the baseline node.

    1. REQUIRED_KEYS = (
    2. "device_count", "device_model", "driver_version",
    3. "runtime_version", "memory_gb", "ecc_mode", "topology",
    4. )
    5. def check_device_consistency(reports: list[dict]) -> dict:
    6. """Each element in reports must contain the node field and all fields in REQUIRED_KEYS.
    7. Returns {"ok": bool, "issues": list[str]}, which can be written directly to the launch log.
    8. """
    9. if not reports:
    10. return {"ok": False, "issues": ["No node reports were received; consistency check cannot be completed"]}
    11. missing = []
    12. for r in reports:
    13. for key in ("node",) + REQUIRED_KEYS:
    14. if key not in r:
    15. missing.append(f"Node {r.get('node', 'unknown')} is missing field {key}")
    16. if missing:
    17. return {"ok": False, "issues": missing}
    18. base = reports[0] # The base node is the reference node specified in the configuration; if unspecified, use the first entry
    19. issues = []
    20. for r in reports[1:]:
    21. for key in REQUIRED_KEYS:
    22. if r[key] != base[key]:
    23. issues.append(
    24. f"Node {r['node']} has {key}={r[key]}, "
    25. f"which does not match base node {base['node']} with {key}={base[key]}"
    26. )
    27. return {"ok": not issues, "issues": issues}

    When called for a single node, the list has only one element, and the function returns ok as True. The launch script should call this function before job submission. When ok is False, the script should terminate startup immediately and write each item in issues to the launch log. Before terminating, retain the raw reports from all nodes for later comparison.

    2.2 Network and Communication Layer

    The throughput and stability of multi-node training mainly depend on the network between nodes. If any of NIC selection, MTU, clock, or firewall is misconfigured, it may appear as initialization hanging or no response for a long time after a certain step.

    Check in the following order, and proceed to the next step only after each step passes.

    1. NIC and link status. On each node, run ip link show and confirm that the service NIC is UP. If InfiniBand is used, run ibstat; the port status should be Active. If RoCE is used, run ibv_devinfo and confirm that the port and GID are normal.
    2. MTU. On all nodes, run ip link show dev <NIC name>; the MTU values must be the same. If the link supports jumbo frames, a common configuration is 9000. When the two ends are inconsistent, small packets can pass, but large packets are lost or retransmitted repeatedly, showing throughput far below expectations.
    3. Bandwidth and latency. Run ib_write_bw and ib_write_lat between the two nodes; these two tools come from the perftest package. Bandwidth should reach at least 90% of the nominal link value. If pure Ethernet is used, use iperf3 -c <peer address> -P 8 for testing.
    4. Collective communication test. Use nccl-tests to run a 16-card all-reduce on the two nodes. An example command is shown below.
    1. mpirun -np 16 -H <node1>:8,<node2>:8 ./all_reduce_perf -b 8 -e 1G -f 2 -g 1

    The pass criteria are that the entire test has no errors and no hangs, and bus bandwidth stabilizes as the data size increases. If the platform does not use NCCL, use the equivalent test tool provided by that platform.

    1. Communication environment variables. Common configurations are as follows.
      • NCCL_DEBUG=INFO: prints the link-establishment process. Enable it during troubleshooting and reduce it to WARN after stabilization.
      • NCCL_SOCKET_IFNAME=<service NIC name>: specifies the NIC used for link establishment, avoiding accidental selection of the management network or Docker bridge.
      • NCCL_IB_HCA=<device list>: specifies InfiniBand devices. In multi-NIC environments, this must be configured explicitly.
      • NCCL_IB_GID_INDEX=<index>: specifies the GID in RoCE environments; the index must correspond to the switch configuration.
    2. Firewall and ports. The rendezvous port on the master node must be open to other nodes. On a worker node, run nc -zv <master address> <port>; the connection should succeed.
    3. Clock synchronization. On all nodes, run chronyc tracking; system clock skew should be kept within 10 milliseconds. If clock skew is too large, log timestamps from different nodes cannot be aligned, and timeout problems are also difficult to locate.

    If the collective communication test hangs, first rerun with NCCL_DEBUG=INFO and check which rank and which link-establishment stage it is stuck in. After confirming which pair of nodes fails, check only the NIC, MTU, and firewall on that link. Do not modify multiple configurations at the same time; otherwise, it is impossible to tell which one made a difference.

    2.3 Data Loading Layer

    Data loading problems often surface only at the first epoch. There are three main checks.

    • Storage reachability. All nodes mount the same data path and have the same read permissions.
    • Data consistency. Each node samples the same batch and computes hash values; the results should be identical. During sharded training, the file sets read by each rank should not overlap and should together cover the complete dataset.
    • Read throughput. Measure the time spent waiting for data in each step. If this time accounts for more than 5% of per-step time, data supply is the bottleneck, and num_workers, prefetch depth, or storage cache needs adjustment.

    The distributed sampler must set the correct shard index for each rank. If multiple ranks read duplicate data, the effective sample size for training will be much smaller than expected, and the sample count statistics in the logs will also fail to match.

    2.4 Checkpoint Save and Restore

    Checkpoints are the part with the highest risk of loss during training. A single incorrect overwrite can waste hours of computation.

    • The save path should be on shared storage accessible to all nodes. If only the master node saves, confirm before saving that other nodes have completed synchronization.
    • Writes must be atomic. Write to a temporary file first, and after writing and verification pass, rename it to the formal file name. This way, even if power is lost during writing, a seemingly complete but corrupted file is not left behind.
    • The saved content should include model parameters, optimizer state, learning rate scheduler state, random number state for each rank, and the current step. If any item is missing, the training curve after restore may jump.
    • Check remaining disk space before saving. If space is insufficient, clean up expired checkpoints first; do not overwrite the latest valid checkpoint.

    Restore validation is a necessary step in the smoke test. Save a checkpoint at step 200, stop the job, restore from that checkpoint, and continue running for 50 steps. The loss in the first few steps after restore should be consistent with the trend before interruption and should not jump or become NaN.

    2.5 Logging and Monitoring

    Logs are for post-event traceability. The key is that each rank has an independent log and that metrics are continuous in time.

    • Each rank writes logs independently, with file names containing the node number and rank number.
    • Record loss, gradient norm, per-step time, and memory usage every 10 steps. Denser sampling makes it easier to locate the step where a sudden change occurs, but it also increases log volume.
    • Communication timeout error messages must be searchable. Search uniformly for timeout and timeout keywords from the communication library, and confirm whether any node stops output after a certain step.
    • The log directory should be retained after the job ends and must not be automatically cleared on the next startup.

    2.6 Job Launch Layer

    The goal of the launch layer is to make the parameters of all ranks exactly consistent. All ranks should use the same configuration file, and launch parameters should be generated by a script rather than entered manually on each node. World size, rank ID, and master address need to be checked before launch. The random seed should be derived from the base seed plus the rank ID, so that each rank has different random behavior while results remain reproducible.

    3. How to Run the 400-Step Smoke Test

    The purpose of the smoke test is to confirm that the entire pipeline can run and close the loop; it does not pursue training quality. Within 400 steps, two saves can be scheduled (step 200 and step 400), and the duration of each save can be recorded. There are also enough samples of per-step time fluctuations to make a judgment.

    Using PyTorch as an example, each node runs the following command once, with only NODE_RANK differing. The master node uses 0, and worker nodes increment from 1. If the platform uses a different launcher, replace it with the corresponding command while keeping the parameter semantics consistent.

    1. export NODE_RANK=0 # Master node is 0; worker nodes increment from 1
    2. export MASTER_ADDR=<master address>
    3. torchrun --nnodes=2 --nproc_per_node=8 \
    4. --node_rank=$NODE_RANK --master_addr=$MASTER_ADDR --master_port=29500 \
    5. train.py --max_steps 400 --save_interval 200 --log_interval 10

    The test passes only when all the following conditions are met.

    • All 400 steps complete, and the process exits normally with exit code 0.
    • There is no communication timeout throughout, and there are no timeout or error records from the communication library in the logs.
    • Loss is always a finite value, with no NaN or Inf. Loss shows a downward trend within the first 50 steps; this only indicates that training has not diverged, not that it has converged.
    • Per-step time remains stable after warmup. In the last 300 steps, the ratio of P95 to median time does not exceed 1.3. This threshold is a suggested value.
    • After step 50, memory usage is basically flat and does not continue to grow.
    • Checkpoints at step 200 and step 400 are both written successfully and pass verification.
    • After restoring from the step 200 checkpoint, the loss for the next 50 steps is continuous and meets the requirements in Section 2.4.
    • Log sampling points are complete, with one record every 10 steps and no gaps.

    If the test fails, handle it as follows.

    1. Retain the complete log directory; do not delete or overwrite it. Also record the job ID, node list, code version, and configuration file hash.
    2. Troubleshoot by layer. First look at the results of pre-launch checks, then communication, then data, and finally training logic.
    3. Modify only one configuration item at a time, and rerun the complete 400 steps after modification. Running only a few steps cannot prove that the problem is solved.
    4. If the same failure occurs twice in a row, stop retrying first, organize the site, and then troubleshoot, to avoid repeatedly consuming compute resources.

    4. Acceptance Checklist

    Before acceptance, the responsible person fills in the result and owner for each item in the checklist. Only after all required items pass can the environment be marked as usable for formal training.

    • The card count, model, driver version, runtime version, memory, and ECC mode of all nodes are consistent with the baseline node.
    • The launch script calls the consistency check, and the check result has been written to the launch log.
    • Service NIC status is normal, and all nodes have the same MTU.
    • Bandwidth between the two nodes reaches at least 90% of the nominal value, and latency test results have been recorded.
    • The 16-card collective communication test has no errors throughout, and bandwidth stabilizes as data size increases.
    • Communication environment variables are explicitly set, and NICs and InfiniBand devices are not misselected.
    • The master node port is accessible from all worker nodes.
    • System clock skew on all nodes is within 10 milliseconds.
    • All nodes mount the same data path, and sampled hash values are consistent.
    • Data waiting time accounts for no more than 5% of per-step time.
    • The checkpoint save path is on shared storage, and writes use the temporary-file-plus-rename approach.
    • Checkpoint restore validation passes, and loss remains continuous after restore.
    • Logs for each rank are saved independently, with one metric record every 10 steps and no gaps.
    • Communication timeout keywords can be searched, and the log directory is retained after the job ends.
    • All ranks use the same configuration file, and random seeds are derived by rank.
    • The 400-step smoke test passes completely, and test records have been archived.

    Passing the smoke test only shows that the training environment can run stably. Whether the model converges and whether quality meets the target must be judged by separate long-cycle training and a complete evaluation set.