16-Card, Two-Node Training Validation on Domestic AI Accelerators

    This article explains how to validate a distributed large-model training pipeline across two servers equipped with 16 domestic AI accelerator cards. It covers topology planning, environment consistency checks, communication configuration, parallelism strategies, and the criteria for verifying that a 400-step training run can start and complete reliably. The commands and parameters are illustrative and should be adapted to the official documentation for the selected hardware and framework.

    1. Why Validate a Two-Node, 16-Card Training Pipeline?

    As the number of model parameters, optimizer states, and activation values continues to grow, the memory capacity and compute resources of a single server may no longer be sufficient for a complete training task. When a single node with multiple cards is not enough, the same training job must be distributed across multiple servers, with inter-node networking used for gradient synchronization and parameter updates.

    For teams using domestic AI accelerators, the challenge extends beyond the model itself. Driver versions, runtime libraries, collective communication components, network topology, and storage mounts must all be compatible. An inconsistency in any of these areas may appear as a startup failure, a stalled training job, a sharp drop in throughput, or numerical anomalies.

    As a result, “the job starts” and “the job completes reliably” are two different acceptance criteria.

    This article uses a two-node, 16-card setup—two nodes with eight accelerator cards each—to demonstrate a complete validation process for a 400-step training run. It covers environment preparation, stability verification, and troubleshooting methods. All parameters and commands are illustrative. Actual values should follow the official documentation for the hardware and framework in use.

    2. Topology and Planning

    A typical two-node, 16-card topology is as follows:

    • Node 0: Eight accelerator cards; the primary node containing rank 0
    • Node 1: Eight accelerator cards; the worker node
    • Inter-node network: A high-speed connection for gradient synchronization and parameter exchange
    • Shared storage: Used for datasets, configuration files, and checkpoints
    1. Node 0: [Card 0][Card 1]...[Card 7] <- High-bandwidth intra-node interconnect
    2. |
    3. High-speed network
    4. |
    5. Node 1: [Card 8][Card 9]...[Card 15] <- High-bandwidth intra-node interconnect

    Three planning issues require particular attention.

    First, the global process count equals the number of nodes multiplied by the number of processes per node. In this example:

    1. 2 nodes × 8 processes per node = 16 processes

    Each process should use one accelerator card. A one-to-one process-to-card mapping avoids contention and makes it easier to identify failures associated with a specific rank.

    Second, intra-node bandwidth is usually higher than inter-node bandwidth. The parallelization strategy should therefore keep the most communication-intensive operations within a node whenever possible, leaving only necessary synchronization traffic to cross the network.

    Third, checkpoints and logs must be written to shared storage or a unified collection path. Otherwise, it is difficult to reconstruct the failure context or resume training on another machine.

    3. Environment Preparation and Consistency Checks

    Environment inconsistency is one of the most common causes of multi-node training failures. Before starting the formal run, check the following items:

    1. Matching driver and runtime versions: The drivers, runtime libraries, deep learning framework, and dependency packages should be identical across all nodes. Record version information in the startup logs for later comparison.
    2. Device visibility: Each machine should enumerate eight accelerator cards. Device IDs should be continuous, and no cards should be occupied by other jobs.
    3. Network connectivity: The nodes must be reachable in both directions. Required ports must be open, and the maximum transmission unit (MTU) should be consistent on both ends.
    4. Time synchronization: Large clock differences can make log correlation difficult and may trigger certain timeout conditions. Connect all nodes to a common time synchronization service.
    5. Consistent code and configuration: Store training code, configuration files, and data indexes in shared storage, rather than maintaining separate copies on each machine.
    6. Centralized environment variables: Define all variables in a common startup script to avoid omissions caused by manual configuration on individual nodes.

    A preflight script can batch-check the status of all nodes before startup. The following is an example. Replace the device query command with the tool provided by the hardware vendor.

    1. #!/bin/bash
    2. # Node environment preflight check (illustrative; replace the device query command)
    3. NODES=("node0" "node1")
    4. for host in "${NODES[@]}"; do
    5. echo "== Checking node: ${host} =="
    6. # 1. Check host reachability and kernel version
    7. remote_exec "${host}" "hostname && cat /proc/version"
    8. # 2. Count visible accelerator cards; expected value is 8
    9. remote_exec "${host}" "<vendor-device-query-command> | wc -l"
    10. # 3. Record runtime and framework versions
    11. remote_exec "${host}" "python3 -c 'import sys; print(sys.version)'"
    12. done

    Here, remote_exec represents any available remote execution method. Save the preflight results together with the training logs for later analysis.

    4. Communication Configuration

    Collective communication is a critical path in distributed training. When inter-node communication fails, the most common symptom is a process that remains blocked for a long time rather than an immediate error.

    Pay particular attention to the following areas:

    1. Explicitly select the network interface used for training communication. Servers often have management, service, and high-speed network interfaces. If no interface is specified, the communication layer may select a slower or unreachable link.
    2. Set appropriate initialization and communication timeouts. The two nodes may take different amounts of time to start, so initialization must allow the peer to become ready. A timeout that is too short can cause false failures, while one that is too long may hide the underlying problem.
    3. Confirm that the high-speed network is actually being used. When high-speed transport is configured, inspect the logs to verify that communication follows the intended path instead of silently falling back to standard Ethernet.
    4. Preserve communication-layer logs. When a job hangs, communication logs often show the first abnormal event and may be more useful than the training script’s own output.

    The following environment variables illustrate the configuration structure. Names and values are examples only:

    1. export TRAIN_COMM_IFACE=<high-speed-interface-name> # Interface used for training communication
    2. export TRAIN_COMM_TIMEOUT_S=1800 # Collective communication timeout in seconds
    3. export TRAIN_LOG_LEVEL=INFO # Communication and training log level

    5. Parallelism Strategy and Partitioning

    Sixteen cards can be combined using several parallelism strategies. The choice involves trade-offs among memory usage, cross-node communication volume, and implementation complexity.

    Strategy Partitioning Memory Usage Cross-Node Communication Implementation Complexity Suitable Scenario
    Pure data parallelism DP=16 Each card stores the complete model; highest memory pressure Full gradient synchronization at every step; highest traffic Low The model is small enough and memory is sufficient
    Tensor parallelism + data parallelism TP=8 within each node, DP=2 across nodes Parameters are split across eight cards, significantly reducing per-card pressure Only gradient synchronization crosses nodes Medium The model does not fit on one node, but intra-node bandwidth is sufficient
    Tensor parallelism + pipeline parallelism TP=8 within each node, PP=2 across nodes Finer partitioning and lower per-card memory pressure Intermediate activations cross nodes between pipeline stages High The model has many layers and per-card memory usage must be reduced

    In many scenarios, intra-node tensor parallelism with inter-node data parallelism is a practical starting point. Tensor parallelism requires frequent and high-volume communication, so placing it within a node allows the job to use higher intra-node bandwidth. Data parallelism synchronizes gradients at the end of each training step, creating comparatively less pressure across nodes.

    The following example can be used to inspect the parallel groups for each rank:

    1. world_size = 16 # Global process count
    2. tp_size = 8 # Tensor parallel degree within each node
    3. dp_size = world_size // tp_size # Data parallel degree, which is 2
    4. for rank in range(world_size):
    5. tp_group_id = rank // tp_size # Tensor parallel group ID
    6. tp_local_rank = rank % tp_size # Rank within the tensor parallel group
    7. dp_group_id = rank % tp_size # Data parallel group ID
    8. print(
    9. f"rank={rank}, "
    10. f"tp_group_id={tp_group_id}, "
    11. f"tp_local_rank={tp_local_rank}, "
    12. f"dp_group_id={dp_group_id}"
    13. )

    This mapping helps verify whether each rank is assigned to the expected tensor-parallel and data-parallel groups before the full training run begins.