Validation of Large Model Dual-Node Multi-GPU Training Link on a Domestic AI Accelerator

    This article details the successful validation of a dual-node, 16-GPU large model training link on a domestic AI accelerator platform. It explores why multi-node testing is critical, breaks down the layers of a complete training pipeline, outlines key preparation steps, and highlights the metrics to monitor during extended training runs. Additionally, it provides troubleshooting strategies for common issues and discusses the path from basic functional validation to production readiness.

    In large model training, “being able to start the program” does not equate to “the training link is fully functional.” A truly valuable validation must cover the entire pipeline, including device identification, operator execution, memory management, data loading, gradient synchronization, checkpoint saving, and multi-node communication. Recently, a domestic AI accelerator platform completed a validation of large model training across dual nodes with 16 GPUs, running continuously for hundreds of steps. This result demonstrates that its software stack possesses the foundational capabilities to support distributed training at a certain scale, providing an engineering starting point for future cluster expansion, extended training durations, and performance optimization.

    I. Why Focus on “Dual-Node 16-GPU” Validation

    Single-GPU or single-node multi-GPU training primarily validates whether device drivers, basic operators, and memory management are functioning correctly. However, when the task scales to a dual-node environment, the complexity increases significantly.

    First, training processes must establish stable connections across different nodes. Beyond the device itself being recognized, it is essential to ensure network connectivity between nodes, correct process address configurations, accessible ports, and that all processes initialize according to a consistent global topology.

    Second, gradient synchronization in distributed training occurs frequently. Taking data parallelism as an example, each GPU processes different data slices and must perform collective communication after backpropagation to aggregate gradients across all devices before updating model parameters consistently. If a timeout, data desynchronization, or premature process exit occurs during communication, the entire task typically halts.

    Third, a dual-node setup amplifies software environment discrepancies. Minor inconsistencies in driver versions, runtime components, dependency libraries, environment variables, or file paths across different nodes can lead to task startup failures or hard-to-reproduce anomalies after dozens of training steps.

    Therefore, completing hundreds of training steps on a dual-node 16-GPU setup validates not only computational power but also the collaborative capability of the entire distributed training infrastructure.

    A reusable large model training pipeline can generally be divided into the following layers.

    1. Device and Runtime Layer

    This layer is responsible for device enumeration, memory allocation, context creation, and basic computation execution. Validation focuses on:

    • Whether all devices are correctly recognized by the training framework;
    • Whether the device count matches the actual hardware topology;
    • Whether memory allocation and deallocation are stable;
    • Whether basic operators like matrix multiplication, normalization, and activation functions can execute;
    • Whether mixed-precision calculations suffer from overflow or precision anomalies;
    • Whether resource conflicts occur when multiple processes access the device simultaneously.

    At this stage, it is recommended to perform smoke tests using a smaller model and fixed inputs to avoid introducing complex data pipelines and long-running tasks prematurely. It is only appropriate to move to distributed debugging once basic operators and memory behaviors are stable.

    2. Model Execution Layer

    The model execution layer primarily validates forward propagation, backpropagation, and parameter updates. For models with attention mechanisms, positional encoding, gating structures, or large-scale embedding layers, it is crucial to check operator coverage and tensor shape transitions.

    The following sequence is recommended:

    1. Perform forward computation using a single small batch;
    2. Add the loss function and execute backpropagation;
    3. Check whether gradients exist and if there are any abnormal values;
    4. Execute several parameter updates;
    5. Compare the loss trends between single-GPU and multi-GPU setups.

    Here, you should not merely observe whether the program exits successfully. A more reliable approach is to log the loss, gradient norm, learning rate, throughput, and memory usage to confirm the continuity and interpretability of the training process.

    3. Distributed Communication Layer

    The stability of multi-node training heavily depends on the communication layer. Common collective communication operations include parameter broadcast, gradient reduction, all-gather, and state synchronization.

    Taking gradient reduction as an example, after each process completes local backpropagation, gradients must be aggregated across all devices. Insufficient communication bandwidth will reduce training throughput, while incorrectly configured communication protocols can lead to initialization failures, task hangs, or inconsistent step counts across processes.

    Communication layer validation should cover at least:

    • Whether the total number of processes matches the total number of devices;
    • Whether each process is bound to a unique device;
    • Whether inter-node communication is stable;
    • Whether collective communication can execute continuously;
    • Whether clear logs are output during communication errors;
    • Whether all processes can exit normally when training ends.

    For communication issues, relying solely on the final error message from the training script is insufficient. You should conduct a joint analysis using node logs, process states, network connections, and device runtime status.

    4. Data and Checkpoint Layer

    Data loading is often overlooked but directly impacts training stability and throughput. In dual-node multi-GPU scenarios, it is essential to ensure that data slices obtained by different processes meet expectations, avoiding duplicate reads or data omissions.

    The data pipeline should focus on checking:

    • Whether data files are accessible on all nodes;
    • Whether the distributed sampler splits data according to the global process count;
    • Whether the batch size for each process is consistent;
    • Whether data loading threads become a computational bottleneck;
    • Whether specific samples can be quickly identified when an exception occurs.

    The checkpointing mechanism is equally important. Running for hundreds of steps only proves basic short-term link stability; without the ability to save and restore states, long-term training cannot be supported. A complete checkpoint typically needs to include model parameters, optimizer state, learning rate scheduler state, current step count, and random number generator (RNG) state. After restoration, you should verify the continuity of the loss curve and training steps, rather than simply judging success by “the file was generated.”

    III. Key Preparations for Dual-Node 16-GPU Implementation

    1. Unified Software Environment

    All nodes should remain as consistent as possible, including OS versions, device drivers, runtime components, training framework versions, and dependency libraries. It is recommended to codify the environment configuration and use automated scripts for installation and verification to minimize human error.

    Before launching the task, output the following information:

    • Node identifier;
    • Device count and device IDs;
    • Driver and runtime versions;
    • Training framework version;
    • Key environment variables;
    • Available memory;
    • Inter-node network addresses.

    This information helps engineers quickly determine whether a task failure is due to environment differences, device anomalies, or training logic errors.

    2. Explicit Process and Device Mapping

    A dual-node 16-GPU setup typically means multiple training processes run on each machine. The mapping relationship between the global process rank, node rank, local process rank, and device ID must be explicit.

    A general mapping relationship can be represented as:

    1. Global process rank = Node rank * Processes per node + Local process rank
    2. Device ID = Local process rank

    During actual deployment, you must also ensure that processes do not bind to the same device repeatedly, and that devices are not left idle while processes wait. Startup logs should print the process-to-device binding results to facilitate troubleshooting of topology configuration errors.

    3. Network and Port Verification

    Before launching multi-node tasks, confirm inter-node network connectivity and port access permissions. Note that passing basic connectivity tests does not guarantee stability during prolonged, high-concurrency communication. Training involves continuous large-traffic transfers, so you should also monitor network packet loss, latency jitter, and bandwidth utilization.

    When conditions permit, conduct independent communication stress tests in advance to isolate network issues from model issues. This prevents repeated trial-and-error within the training script and shortens the troubleshooting cycle.

    IV. Key Metrics to Monitor During Hundreds of Steps

    The value of running hundreds of training steps lies in exposing issues that short startup tests cannot detect. It is recommended to log at least the following metrics.

    1. Loss and Gradients

    The loss value should show a reasonable trend, without remaining at zero, suddenly spiking to extreme values, or frequently fluctuating. The gradient norm helps determine if gradient explosion, vanishing gradients, or mixed-precision overflow has occurred.

    If gradient accumulation is used, distinguish between single micro-batches, accumulation cycles, and actual parameter update steps to avoid inconsistent meanings of “steps” in the logs.

    2. Throughput and Communication Ratio

    Training throughput can be measured in samples processed per second or tokens per second. When observing throughput variations, analyze it alongside communication time, data loading time, and computation time.

    If device utilization is low but the communication ratio is high, you may need to optimize gradient reduction, adjust batch sizes, or improve inter-node networking. If the communication ratio is low but throughput remains poor, check data loading, operator performance, and memory access efficiency.

    3. Memory and Host RAM

    Memory usage should remain relatively stable during continuous training. If memory grows incrementally, it may indicate unreleased caches, unexpectedly retained computation graphs, or improper checkpoint saving logic.

    Host RAM must also be monitored, especially when multiprocessing data loading, prefetching, and caching mechanisms are enabled. Resource leaks often do not manifest in the first few dozen steps but will cause task anomalies after prolonged running.

    4. Process Synchronization Status

    The training step count across all processes should remain consistent. If one process exits prematurely, other processes may wait indefinitely at communication operations. The logging system should record process startup, training steps, communication phases, and exit statuses, avoiding a scenario where only the main process output is retained.

    V. Common Issues and Troubleshooting Strategies

    1. Task Initialization Failure

    Prioritize checking inter-node networks, port configurations, global process counts, and device visibility. If all processes fail to enter the training phase, start troubleshooting from distributed initialization and environment consistency rather than immediately suspecting the model code.

    2. Execution Hangs After Several Steps

    These issues are commonly related to communication desynchronization, a process encountering an exception, blocked data loading, or device errors. When troubleshooting, compare the last log entry on each node to identify which process stopped outputting first, then use communication and device monitoring data to pinpoint the cause.

    3. Abnormal Loss Values

    It is necessary to distinguish between data, model, precision, and communication factors. Start by running a small-scale task on a single GPU with full precision, then incrementally enable mixed precision, gradient accumulation, and multi-node communication. By gradually increasing complexity, you can identify exactly where the anomaly first occurs.

    4. No Significant Speedup with Multi-GPU

    Multi-GPU does not guarantee linear speedup. When the model is small, batch sizes are too small, or communication overhead is high, adding more devices may yield limited benefits. In such cases, profile the computation time, communication time, and data waiting time rather than simply comparing total elapsed time.

    VI. Moving from “Working” to “Production-Ready”

    Completing hundreds of training steps on a dual-node 16-GPU setup is a significant milestone in distributed training link validation, but it is not the endpoint for production-grade delivery. Subsequent steps should include longer duration runs, testing different batch sizes, checkpoint recovery tests, node fault drills, and establishing performance baselines.

    In engineering practice, acceptance can be divided into three stages:

    • Functional Acceptance: Confirm that the model can complete forward, backward, parameter updates, and checkpoint saving;
    • Stability Acceptance: Confirm that tasks can run for extended periods without abnormal growth in resource usage;
    • Performance Acceptance: Confirm that throughput, communication efficiency, device utilization, and scaling efficiency meet expectations.

    Only when all three stages are passed can the training platform be considered to have the foundation to handle real workloads.

    Overall, the successful large model training validation on a domestic AI accelerator across dual-node multi-GPUs is significant not just as an isolated experiment, but as the connection of a complete link spanning devices, runtime, model frameworks, distributed communication, and operational monitoring. For R&D teams, the next step is to consolidate this one-time validation into standardized testing procedures, environment check scripts, and performance baselines, ensuring that future expansions and model migrations are built on a repeatable, observable, and locatable engineering foundation.