Training a 3-Trillion-Parameter Model on Dual-Node 16-GPU Chinese Accelerators: A Practical Adaptation Guide

    This article shares a practical adaptation experience for training large language models on dual-node, 16-GPU clusters equipped with domestic (Chinese) full-function accelerators. It breaks down the complete training pipeline—from model loading and sharded scheduling to gradient synchronization and checkpointing—and outlines a verification methodology centered on numerical stability, process consistency, and fault recovery. The guide also covers common troubleshooting scenarios and a team-ready checklist for replicating stable multi-node training workloads.

    1. Background: From Inference Deployment to Full Training Pipeline

    Large-model teams typically begin by deploying inference on a single machine, verifying that the model runs correctly and that latency and throughput meet requirements. Training is a different category of work. It requires simultaneous forward computation, backward propagation, gradient aggregation, and parameter updates, imposing stricter demands on GPU memory capacity, communication bandwidth, numerical precision, and fault tolerance. When the model scale approaches three trillion parameters, the memory of a single device cannot hold the full set of parameters, gradients, and optimizer states. Sharding and multi-card coordination become unavoidable.

    Two concepts need to be distinguished here. Inference adaptation means the model architecture can execute correctly on the target hardware and produce reasonable outputs. Training adaptation means the model can complete parameter updates on the target hardware and maintain numerical stability over a long sequence of steps. The two are not interchangeable. A model that performs inference well does not imply its pretraining happened on the same hardware. To judge whether a training environment is mature, we should ask whether it can continuously and stably perform a large number of optimizer updates—not merely whether a single step runs.

    2. Four Critical Stages in the Training Pipeline

    A complete training pipeline can be broken down into four stages.

    2.1 Model Loading

    Parameters in the trillion-parameter range cannot be loaded into a single device’s memory at once. The common approach is to read shards by layer or by parameter group, with each process holding only the portion of weights it owns. During loading, you must verify parameter shapes, data types, and initialization states to avoid a process reading an incorrect shard. If the loading order or shard mapping is wrong, all subsequent computations will deviate, and the problem often only surfaces many steps later.

    2.2 Sharded Scheduling

    Fully sharded data parallelism distributes parameters, gradients, and optimizer states across processes. During forward passes, each process gathers the parameters needed for the current layer on demand; after computation, it releases shards not local to it, lowering peak GPU memory usage. The scheduling strategy determines the balance between communication volume and memory footprint. Over-prefetching consumes memory; under-prefetching makes computation wait for communication.

    2.3 Gradient Synchronization

    After backward propagation, gradients from each process must be aggregated according to the rule and then used to update the local shard. Cross-node communication bandwidth is typically lower than intra-node bandwidth, so gradient synchronization is often the bottleneck in multi-node training. Common optimization directions include reducing the number of synchronization points, overlapping gradient communication with backward computation, and tuning the size of communication buckets.

    2.4 Parameter Updates and Checkpoints

    After the optimizer updates, checkpoints must be saved periodically for fault recovery. The shard format of checkpoints should be consistent with the loading format. If the formats differ, recovery requires an additional re-sharding step, which increases time and the chance of errors.

    Below is an illustrative training main loop, only used to show the structure. Function names are placeholders and do not correspond to any specific API:

    1. # Illustrative: fully sharded training main loop
    2. for step in range(total_steps):
    3. batch = next_batch(loader)
    4. loss = forward(model, batch) # gather current layer parameter shards on demand
    5. loss.backward() # compute local gradients
    6. sync_gradients(model, group=world) # aggregate gradients across processes
    7. check_step_health(loss, model, step) # numerical health check
    8. optimizer.step() # update only local shards
    9. release_unused_shards(model) # release non-local parameters
    10. if step % ckpt_interval == 0:
    11. save_sharded_checkpoint(model, optimizer, step)

    3. Verification Method for Dual-Node 16-GPU Training

    The test scale in this practice was two nodes with 16 accelerator cards in total, and 16 training processes working across the two nodes. According to public reports, all 16 processes completed 400 consecutive optimizer updates, with loss and gradient norm remaining finite throughout—no numerical overflow or abnormal interruption occurred. This result shows the cross-node training pipeline works at this test scale, but it does not imply stability for all models, all data, or larger scales.

    For similar environments, you can design tests around the following five dimensions:

    • Numerical stability: Continuously monitor whether loss becomes non-finite and whether gradient norm grows abnormally.
    • Process consistency: Check whether step counts, random seeds, and learning-rate schedules are identical across processes.
    • Communication correctness: Before and after synchronization, compare hashes or checksums of critical parameters to confirm shards are not misplaced.
    • Long-running stability: Cover hundreds of steps or more, inspecting GPU memory fragmentation, communication timeouts, and throughput degradation over time.
    • Fault recovery: Terminate one process mid-run and verify that the loss curve remains continuous after restoring from the most recent checkpoint.

    Numerical health checks are the most fundamental. The following illustrative code shows the basic logic:

    1. import math
    2. def check_step_health(loss, model, step):
    3. # Illustrative: check whether the current loss and global gradient norm are finite
    4. if not math.isfinite(loss.item()):
    5. raise RuntimeError(f"step {step}: loss is non-finite")
    6. norm = global_grad_norm(model)
    7. if not math.isfinite(norm):
    8. raise RuntimeError(f"step {step}: gradient norm is non-finite")

    Such checks have low overhead but can localize numerical issues to a specific step more effectively than post-hoc analysis of the entire training curve.

    4. Common Issues and Troubleshooting

    Peak GPU memory exceeds expectations

    First confirm whether non-local shards are released immediately after the forward pass. Then check whether a large number of intermediate activations are retained; if so, enable activation recomputation to trade extra computation for lower memory usage.

    Cross-node throughput drops

    Verify that the network topology and bandwidth between nodes match design expectations. Check whether gradient synchronization overlaps with backward computation, and evaluate whether the communication bucket size is appropriate. When throughput drops, measure compute time and communication time separately before deciding where to optimize.

    Intermittent loss spikes

    Inspect the mixed-precision scaling strategy and observe changes in the gradient norm distribution. If spikes coincide with gradient peaks, consider lowering the learning rate or strengthening gradient clipping.

    Process hangs

    A hang usually means one process has not reached the collective communication synchronization point. A common cause is inconsistent branching logic among processes—for example, different processes have different data lengths, causing some to exit the loop early. When troubleshooting, print the current step and stage for each process individually.

    Loss discontinuity after recovery

    Check, in order: model parameters, optimizer state, learning-rate scheduler state, and the data-loading position in the checkpoint. If any item is missing or inconsistent, the recovered training curve will show a break.

    5. A Team Checklist for Implementation

    • Clearly define verification goals: Separate inference verification, small-scale training verification, and long-duration stable training, each with its own pass criteria.
    • Unify environment versions: Pin the driver, runtime, and dependency versions, and record the complete configuration to reproduce issues.
    • Cover monitoring metrics: Collect per-card GPU memory usage, compute utilization, and temperature, and log per-step time breakdowns.
    • Set up logging and alerts: Use logging services and monitoring alerts to immediately notify on non-finite values, communication timeouts, and abnormal process exits.
    • Control data and permissions: Store training data and checkpoints with least-privilege access, and desensitize sensitive data before use.
    • Prepare a rollback plan: Keep the most recent usable checkpoints and periodically verify that they can be restored correctly.

    6. Conclusion

    The value of domestic full-function accelerator hardware in large-model training depends on whether the training pipeline can evolve from operator adaptation and multi-card coordination to an automated toolchain that lets model developers worry less about low-level details. For most teams, a pragmatic path is to first run small-scale experiments to validate the pipeline, confirm numerical stability, and then gradually scale up. Every failure should be turned into a checkable item and added to the team’s verification checklist, so the experience can be reused.