LLM Training on Domestic Accelerator Cards: A 2-Node, 16-Card Pipeline Practice

    This article describes a practical, repeatable validation path for multi-node LLM training on domestic accelerator cards. Using a 2-node, 16-card setup and a 400-step run as the target, it covers environment consistency checks, communication configuration, launch strategy, data pipeline design, checkpoint recovery, monitoring, and troubleshooting. The focus is on connecting hardware, communication, training framework, data, and observability into a complete engineering workflow rather than tuning a single parameter. Readers can use the criteria and procedures to build a reproducible training chain and isolate common multi-node failures.

    I. Background and Objectives

    LLM training continues to raise requirements for compute, communication, and engineering stability. Single-node memory and throughput quickly become upper limits, and multi-node, multi-card training is already standard practice. When building training pipelines on heterogeneous accelerator cards, teams commonly encounter three types of problems: mismatched driver and runtime versions, unstable cross-node communication efficiency, and difficulty locating the root cause after a training interruption.

    This article uses “2 nodes, 16 cards, complete 400 training steps” as the validation goal and outlines a training pipeline that can be executed repeatedly and troubleshot systematically. The focus is not on a single parameter, but on how to connect hardware, communication, training framework, data, and monitoring into a complete engineering workflow.

    II. Validation Scenario and Completion Criteria

    The validation scenario consists of two compute nodes, each with 8 accelerator cards, for a total of 16 cards. The completion criteria are defined as follows:

    • All processes remain running normally before step 400, with no unexpected exits;
    • The loss value shows an overall downward trend, with no sustained divergence or NaN;
    • Checkpoints are saved as planned and can be successfully loaded to resume training;
    • After warm-up, per-step time remains relatively stable.

    Completion criteria must be defined before training starts. Otherwise, “successfully running” can easily become a subjective judgment, and the conclusion becomes difficult to reproduce.

    III. Overall Architecture

    The training pipeline can be divided into five layers:

    1. Hardware layer: compute nodes, accelerator cards, inter-node high-speed network, and shared storage;
    2. Driver and runtime layer: device drivers, low-level runtime libraries, and device visibility configuration;
    3. Communication layer: collective communication libraries and topology-aware device numbering;
    4. Training framework layer: parallelism strategy, optimizer, mixed precision, and checkpoint logic;
    5. Scheduling and observability layer: job scheduling, log collection, metric statistics, and alerting.

    Versions between adjacent layers need to be fixed together. After any layer is upgraded, baseline tests should be rerun before formal training.

    IV. Environment Preparation and Consistency Checks

    The first common failure point in multi-node training is environment inconsistency between nodes. Before launch, three types of checks are recommended:

    • Driver versions and runtime versions are exactly consistent across all nodes;
    • The number, index, and health status of accelerator cards on each node are consistent;
    • Nodes can communicate over the high-speed network, with normal hostname resolution and clock synchronization.

    The illustrative flow is as follows:

    1. for node in [node_a, node_b]:
    2. run_remote(node, "device-status --all") # Check accelerator card status
    3. run_remote(node, "runtime-version") # Verify runtime version
    4. assert device_count(node) == 8
    5. assert clock_offset(node) < threshold # Set threshold per cluster policy
    6. assert versions_equal(node_a, node_b)

    The command names above are only for illustrating the flow. In actual execution, replace them with the tools provided by the environment in use.

    V. Multi-Node Communication Configuration

    The efficiency of multi-node training depends mainly on communication. Three points require attention.

    1. Network selection and binding: inter-node communication should use the high-speed network rather than the management NIC. When launching training, explicitly specify the NIC used for communication to avoid the system automatically selecting the wrong interface.
    2. Topology awareness: communication bandwidth between cards on the same node is significantly higher than cross-node communication. When partitioning parallelism, tensor parallelism should be placed within a node as much as possible, while data parallelism should be performed across nodes.
    3. Timeout and diagnostics: the timeout during cross-node initialization should be relaxed appropriately, and the initialization time of each process should be recorded to help locate slow nodes.

    An illustrative configuration is as follows:

    1. cluster:
    2. nodes: 2
    3. devices_per_node: 8
    4. network_interface: <high-speed NIC name>
    5. init_timeout_s: 600
    6. parallel:
    7. tensor_parallel: 8 # Aligned with devices per node; intra-node communication
    8. data_parallel: 2 # Cross-node replication; total cards 2 x 8 = 16

    VI. Training Job Launch Strategy

    For the launch phase, follow a “small first, large later” order:

    • First run a small number of steps on a single node to verify data reading, forward and backward computation, and checkpoint saving;
    • Then scale to two nodes, use the same configuration to warm up for about 100 steps, and observe whether initialization and communication are stable;
    • After confirming correctness, execute the full 400-step training run.

    The random seed, data shard, and log path of each process must be unique and traceable. The seed can be derived from a global seed plus the process rank, ensuring that the random behavior of different processes is controllable while the entire experiment remains reproducible.

    Illustrative pseudocode is as follows:

    1. def launch(config):
    2. world_size = config.nodes * config.devices_per_node
    3. for rank in range(world_size):
    4. seed = config.base_seed + rank
    5. shard = dataset.shard(index=rank, total=world_size)
    6. start_worker(rank=rank, seed=seed, shard=shard, log_dir=config.log_dir)

    VII. Data Pipeline and Checkpoint Management

    The data pipeline should be decoupled from computation. A common practice is to split samples into shard files in advance and read them during training through shared storage or local cache. If read throughput is insufficient, accelerator cards will periodically wait idle, which appears as regular jitter in per-step time.

    Checkpoints are recommended every 50 steps, including model parameters, optimizer state, learning rate scheduler state, and the current data position. When saving, write to a temporary path first, then rename it to the formal file after writing is complete, to avoid a partially written file being used by mistake.

    A recovery test should be completed once before formal training. For example, resume from the checkpoint at step 100 and observe whether the loss value continues the original training trajectory. A recovery test is more likely than a full training run to expose engineering problems such as incomplete state saving and disordered data positions.

    VIII. Stability and Performance Monitoring

    During training, it is recommended to continuously collect the following metrics:

    Metric Meaning Anomaly signal
    Step time Wall-clock time per training step Periodic spikes or continuous increase
    Loss Training loss NaN, sudden jumps, or long-term no decrease
    Device utilization Accelerator compute utilization Near zero for an extended period
    Memory usage Peak and resident usage Continuous growth, suspected leak
    Communication wait ratio Collective communication time as a share of step time Significant increase
    Node heartbeat Process liveness Heartbeat interruption

    Alert thresholds should be set based on the measured baseline during the warm-up phase, not on fixed values. The baseline changes with model structure, batch size, and cluster state, and needs to be recalibrated for each experiment.

    IX. Common Issues and Troubleshooting

    1. Initialization hangs: in most cases, this is caused by incorrect network or initialization address configuration. Check the initialization address, firewall rules, and NIC binding, and confirm that processes on every node have entered the initialization phase.
    2. Training fails midway without a clear error: first compare the timestamps of the last log line on each node and find the process that stopped earliest. It is usually the root cause; other processes subsequently exit due to communication timeouts.
    3. NaN in loss: first check whether the learning rate is too high, whether mixed-precision overflow statistics are abnormal, and whether there are abnormal samples in the data.
    4. Throughput lower than expected: check data read speed, communication proportion, and whether the parallel partitioning crosses node boundaries, in that order.

    X. Conclusion and Implementation Recommendations

    Based on the 2-node, 16-card, 400-step validation scenario, the following practical lessons can be drawn:

    • Version consistency and network binding determine whether multi-node training can start smoothly;
    • Checkpoint recovery testing exposes engineering risks more effectively than a full training run.