Domestic Compute Platforms: A Two-Node 16-GPU 400-Step Stable Training Validation

    This article reviews an engineering validation of large-model training on domestic compute platforms using two nodes and 16 training cards. It first defines the scope of a 400-step stability test, then provides a verifiable configuration table, compares single-GPU, single-node multi-GPU, and two-node 16-GPU validation goals, and describes the parameter-sharding training path with engineering-oriented pseudocode. It also gives criteria for judging whether a 400-step run truly validates the training loop, along with anomaly localization, operator verification, monitoring, checkpoint recovery, and node isolation checklists. The conclusion is intentionally limited: the test is an engineering validation under a specified configuration, not a production-level promise for all models, datasets, network conditions, or cluster sizes.

    1. Conclusion First: An Engineering Validation Under a Limited Configuration

    This article focuses on large-model training stability under a specific setup: domestic compute platforms, two nodes, 16 training cards, parameter sharding, cross-node communication, gradient synchronization, numerical stability, and a 400-step stable training validation.

    It is important to state the scope at the beginning. This article does not claim that domestic compute platforms can unconditionally support all large models. Instead, it reviews an engineering validation of the large-model training pipeline under a specified model, platform version, and cluster configuration. The goal is to provide a repeatable and reviewable engineering assessment.

    For large-model training, “the job can run” is only the lowest threshold. The more important questions are:

    • Can the model continuously perform forward computation, backward propagation, gradient synchronization, optimizer updates, metric collection, and checkpoint saving over a long duration?
    • Can the job remain stable across multiple processes and multiple nodes?
    • If an exception occurs, can the platform help locate the problem quickly through logs, metrics, monitoring, and recovery mechanisms?

    Therefore, this article treats “400 consecutive steps” as an engineering validation action, not as a production-grade long-term stability commitment.

    Four hundred steps are enough to expose common issues in parameter sharding, communication blocking, numerical anomalies, process coordination, and missing observability. However, 400 steps cannot replace a production validation that lasts weeks or months.

    2. A Verifiable Test Configuration: Boundaries Must Be Defined First

    The original description of “400 consecutive steps” was too abstract and lacked the test environment, model configuration, metric definitions, and exception criteria. For this reason, the revised article first provides a verifiable configuration table.

    In a real project, all fields below should be filled in and preserved as evidence. If real values cannot be provided, the table can only be used as a validation template, not as the final basis for a conclusion.

    Configuration item Definition used in this article Verification method
    Number of nodes 2 Host list, launch logs, scheduler records
    Number of training cards 16 rank 0 to rank 15
    Interconnect High-speed interconnect within a node; RoCE or InfiniBand between nodes Platform topology, link detection, latency and bandwidth tests
    Framework version Domestic AI training framework 1.x, or a PyTorch compatibility layer 2.x Environment snapshot, version number, dependency lock file
    Model scale Sample adapted to nearly 3 trillion parameters; only the parameter-sharding path is validated Model configuration file, parameter list
    Parallel strategy Sharding of parameters, gradients, and optimizer states; tensor parallelism or expert parallelism may be added as needed Parallel group initialization logs
    Precision mode BF16 or FP16, with loss scaling Training configuration, operator logs
    Batch configuration micro_batch=1, grad_accum=4, global_batch=64 Data loader configuration
    Sequence length 2048 Data configuration file
    Loss collection definition Average loss for each optimizer step, recording minimum, maximum, and mean values Metrics logs
    grad_norm collection definition Global L2 norm before gradient clipping, recording abnormal peaks Optimizer hook
    Memory collection definition Peak allocated and reserved memory for each card Profiler, memory monitoring
    Step time collection definition From the start of the current step to the completion of the next optimizer.step Timestamp logs
    Communication time collection definition P50/P95 latency of all_reduce, reduce_scatter, and all_gather Communication hook, profiling
    Checkpoint interval Save once every 100 steps, and save once more after validation ends Checkpoint files and checksums
    Exception definition Process exit, NaN/Inf, communication timeout, memory OOM, checkpoint failure, metric gap Monitoring alert rules

    In this table, the most important point is not any single number. The more important issue is whether the measurement definition can be verified.

    For example:

    • Is loss averaged by micro-batch or by token?
    • Is grad_norm measured before or after clipping?
    • Does step time include data loading and communication waiting?
    • Does memory usage include optimizer states and fragmented cache?

    If these definitions are not consistent, the results of a 400-step run cannot be compared horizontally.

    3. Validation Goals: Single GPU, Single-Node Multi-GPU, and Two-Node 16-GPU

    The two-node 16-GPU setup has typical validation value not because it has “more cards”, but because it includes node-local computation, cross-node communication, global gradient synchronization, and multi-process coordination at the same time.

    Different validation scales expose different types of problems.

    Validation scenario Problems it can expose Problems it cannot fully expose Applicable goal
    Single GPU Operator correctness, precision mode, single-GPU memory limits, basic forward and backward computation Multi-card communication, parameter sharding, gradient synchronization Operator and model adaptation
    Single-node multi-GPU Node-local communication, data parallelism, collective communication, memory balance within a node Cross-node network jitter, multi-node scheduling, node-level failures Basic distributed training pipeline validation
    Two-node 16-GPU Cross-node communication, global gradient reduction, multi-node process coordination, node-level failure localization Large-scale linear scalability, long-term production stability Comprehensive validation close to a real production environment

    Therefore, the meaning of a two-node 16-GPU 400-step validation is as follows:

    • It is closer to real training than a single-GPU test.
    • It exposes cross-node communication and task coordination problems better than a single-node multi-GPU test.
    • Its scale is still controllable, which makes log analysis, problem reproduction, and exception rollback easier.

    For domestic compute platforms, this scale is large enough to validate the core training pipeline, but not so large that problems become difficult to investigate.

    4. Parameter-Sharding Training Path: Enabling Ultra-Large Models Under Limited Memory

    For a model adapted to nearly 3 trillion parameters, a single GPU cannot store the full model parameters, gradients, and optimizer states.

    The core idea of parameter-sharding training is:

    • Each training process stores only part of the parameters, gradients, and optimizer states.
    • When forward or backward computation needs the full parameters, the required shards are obtained dynamically through communication operations.
    • After computation finishes, the shards are released or reshared.

    The pseudocode in the original article was too simplified. It only expressed a training loop and did not show parallel groups, precision mode, gradient accumulation, exception handling, or logging fields.

    The pseudocode below is still not a complete implementation for a specific platform. However, it preserves the key structure of a real engineering skeleton.

    1. import os
    2. import time
    3. import torch
    4. import torch.distributed as dist
    5. def main():
    6. rank = int(os.environ.get("RANK", 0))
    7. world = int(os.environ.get("WORLD_SIZE", 1))
    8. local_rank = int(os.environ.get("LOCAL_RANK", 0))
    9. torch.cuda.set_device(local_rank)
    10. dist.init_process_group(backend="nccl", init_method="env://")
    11. cfg = load_config()
    12. model = build_model(cfg)
    13. # groups includes data parallel groups, tensor parallel groups, expert parallel groups, etc.
    14. # In a real implementation, the framework creates and returns them according to the parallel strategy.
    15. groups = build_parallel_groups(world, cfg.parallel_strategy)
    16. # shard_plan determines how parameters, gradients, and optimizer states are sharded.
    17. shard_plan = build_shard_plan(
    18. model,
    19. groups,
    20. mode=["params", "grads", "optimizer_state"]
    21. )
    22. model = shard_parameters(model, shard_plan)
    23. optimizer = build_optimizer(model, cfg)
    24. loss_scale = build_loss_scaler(cfg.precision)
    25. for step in range(cfg.start_step, cfg.target_step):
    26. step_start = time.time()
    27. total_loss = 0.0
    28. try:
    29. # Gradient accumulation: combine multiple micro batches into one optimizer update.
    30. for micro_step in range(cfg.grad_accum):
    31. batch = load_micro_batch(
    32. rank=rank,
    33. step=step,
    34. micro_step=micro_step,
    35. seq_len=cfg.seq_len
    36. )
    37. with torch.autocast(device_type="cuda", dtype=cfg.torch_dtype):
    38. loss = forward_backward(model, batch, shard_plan)
    39. loss = loss / cfg.grad_accum
    40. loss_scale.backward(loss)
    41. total_loss += float(loss.detach())
    42. # Gradient clipping must be performed after unscaling.
    43. grad_norm = loss_scale.unscale_and_clip_grad_(
    44. optimizer,
    45. max_norm=cfg.grad_clip
    46. )
    47. # Gradient synchronization may include reduce_scatter, all_reduce, or all_gather.
    48. sync_gradients(model, groups)
    49. loss_scale.step(optimizer)
    50. loss_scale.update()
    51. optimizer.zero_grad(set_to_none=True)
    52. peak_mem = torch.cuda.max_memory_allocated() / 1024 / 1024
    53. comm_p95 = get_comm_metric("reduce_scatter", percentile=95)
    54. log_metrics({
    55. "step": step,
    56. "rank": rank,
    57. "loss": total_loss,
    58. "grad_norm": grad_norm,
    59. "peak_mem_mb": peak_mem,
    60. "step_time_ms": (time.time() - step_start) * 1000,
    61. "comm_p95_ms": comm_p95,
    62. "node": os.environ.get("HOSTNAME", "unknown"),
    63. "precision": cfg.precision,
    64. "world_size": world,
    65. "ckpt_path": ""
    66. })
    67. if (step + 1) % cfg.save_interval == 0:
    68. ckpt_path = save_checkpoint(
    69. step=step,
    70. model=model,
    71. optimizer=optimizer,
    72. loss_scale=loss_scale,
    73. shard_plan=shard_plan
    74. )
    75. log_ckpt(step, ckpt_path)
    76. except Exception as exc:
    77. log_error(
    78. step=step,
    79. rank=rank,
    80. error=repr(exc),
    81. traceback=True,
    82. node=os.environ.get("HOSTNAME", "unknown")
    83. )
    84. raise

    In this code, rank, world, shard_parameters, sync_gradients, and optimizer.step are not isolated functions. They are bound to parallel groups, precision mode, gradient accumulation, exception handling, and logging fields.

    Three engineering points require special attention.

    First, parameter sharding must define the sharding dimension clearly.

    The implementation will differ depending on whether sharding is based on parameter names, layers, tensors, or optimizer states. This directly affects the communication pattern and memory usage.

    Second, gradient synchronization must define the communication group clearly.

    Node-local communication groups, data parallel groups, and expert parallel groups must not be confused. If the communication group is configured incorrectly, gradient synchronization may fail, or gradients may be synchronized to the wrong set of processes.

    Third, exceptions must be observable.

    Logs should at least include step, rank, loss, grad_norm, memory usage, communication latency, node name, precision mode, and checkpoint path. Otherwise, if training is interrupted, the team can only rely on manual guessing.

    5. What Counts as a True 400-Step Validation of the Training Loop?

    Completing 400 consecutive optimizer updates is what this article calls a 400-step stable training validation.

    This does not represent a complete training cycle. However, it allows observation of whether the training loop remains closed during continuous updates.

    A closed loop cannot be judged only by “the job did not exit”. It is necessary to check whether multiple metrics remain in reasonable ranges.

    The following pass criteria are recommended:

    1. All 400 optimizer steps are completed, with no process exit, no abnormal interruption, and no communication timeout.
    2. The loss of every step remains finite, with no NaN or Inf.
    3. grad_norm fluctuates within a reasonable range, without continuous divergence or repeated spikes.
    4. Peak memory usage per card remains below the upper limit and retains a safety margin, avoiding a borderline OOM.
    5. Step time does not continuously deteriorate, and fluctuations remain acceptable.
    6. Gradient synchronization time does not continuously increase, and cross-node communication does not show obvious blocking.
    7. Checkpoints can be saved successfully. If recovery testing is performed, the loss for the first few steps after recovery should match the baseline or have an error within the expected range.
    8. Log fields are complete, so the specific computation, communication, or data stage can be located by step and rank.

    If an exception occurs during the 400 steps, but the logs clearly indicate whether the exception happened in forward computation, backward propagation, gradient reduction, optimizer update, or checkpoint saving, the validation still has engineering value.

    On the other hand, if the 400 steps finish but there are no metrics, logs, or exception definitions, the run can only prove that the job executed. It cannot prove that the training loop is truly closed.

    6. Anomaly Localization: Numerical Stability and Communication Efficiency

    Common problems in long-running stable training are often not caused by a single operator failing to run. Instead, they gradually appear as numerical instability, memory anomalies, communication blocking, or process disconnection during long training runs.

    The following table helps turn “training failed” into an engineering problem that can be investigated.

    Anomaly Possible stage Key log fields Investigation action Handling suggestion
    loss becomes NaN/Inf Forward, backward, optimizer update step, loss, grad_norm, precision Check whether a certain rank fails first Roll back the checkpoint, check precision mode and abnormal input samples
    grad_norm diverges Backward propagation, gradient reduction grad_norm, loss, learning_rate Observe whether multiple consecutive steps increase Adjust gradient clipping, learning rate, and loss scale
    Memory OOM Parameter sharding, activation storage peak_mem, reserved_mem, micro_batch Check which step causes a sudden memory increase Reduce micro batch, increase recomputation, adjust sharding strategy
    Communication timeout Cross-node gradient synchronization comm_p95, timeout, rank Confirm whether a certain node has abnormal latency Check the link, node load, and communication group configuration
    Process drops offline Job scheduling, node health heartbeat, rank, exit_code Check node logs and system status Isolate the faulty node and recover from a checkpoint
    Step time continues to increase Data loading, communication, memory paging step_time, dataloader_wait, comm_time Compare timing distributions across ranks Optimize data loading, communication overlap, and memory layout
    Checkpoint recovery fails Checkpoint read/write, parallel topology changes ckpt_path, world_size, shard_plan Verify file integrity and topology consistency Rebuild parallel groups, reload, and verify the loss for the first few steps
    Bandwidth jitter between nodes Network, switch, node load allreduce_p95, rtt, retransmit Run independent bandwidth and latency tests Adjust topology, switch links, or reschedule the job

    The value of this table is that it breaks “platform instability” into engineering problems that can be localized.

    For domestic compute platforms, the ability to locate an anomaly to a specific stage is often more important than simply pursuing peak compute performance.

    7. Engineering System: Four Executable Checklists

    Large-scale training adaptation is not a one-time model migration. It is a continuously evolving engineering capability.

    The original article summarized four directions: operator adaptation, automated toolchains, observability, and fault recovery. The revised version breaks these into four executable checklists.

    Checklist 1: Operator Validation Matrix

    Operator category Typical scenario Pass criterion Failure example
    Matrix multiplication Linear layers, attention projections Results stay within threshold across shapes and precisions Abnormal precision under a certain shape
    Attention Self-attention, cross-attention Supports masks, variable-length sequences, causal masks Incorrect results for variable-length sequences
    Normalization LayerNorm, RMSNorm Backward gradients match the reference implementation Backward gradient deviation is too large
    Activation functions GELU, SwiGLU Numerically stable, no overflow Inf under certain inputs
    Loss functions Cross-entropy, language model loss Label smoothing and ignore_index are correct Loss calculation is shifted
    Optimizers Adam, AdamW First-moment and second-moment updates are correct Optimizer states are inconsistent
    Collective communication all_reduce, reduce_scatter Results are consistent across multiple processes Results are incorrect for some ranks

    Checklist 2: Monitoring Metrics and Alert Thresholds

    Metric Collected fields Example recommended threshold Alert action
    loss step, loss, rank Abnormal for 3 consecutive steps, or NaN/Inf appears Pause training, check samples and precision
    grad_norm step, grad_norm Exceeds 3 standard deviations from the moving average Reduce learning rate or check gradient anomalies
    step time step, duration Rises by more than 20% for 10 consecutive steps Check communication, data loading, and memory
    Communication latency P50, P95, timeout P95 exceeds baseline by 30% Check network and node load
    Memory allocated, reserved Exceeds 90% of the upper limit Reduce batch size or adjust sharding
    Process heartbeat rank, heartbeat, status No heartbeat for 30 seconds Isolate the node and prepare recovery
    Checkpoint File size, checksum Save fails or checksum fails Retry saving and preserve field logs

    Checklist 3: Checkpoint and Recovery Steps

    A checkpoint is not simply a model file. It must ensure that the training state can be recovered.

    At least the following content should be saved:

    1. Parameter shards of the model.
    2. Optimizer states, including momentum, second moments, or equivalent states.
    3. Learning rate scheduler state.
    4. Current global step.
    5. Random number states, including data loading, dropout, sampling, and related states.
    6. Data loading progress or sample consumption offset.
    7. Parallel strategy, world size, and communication group configuration.
    8. Framework version, dependency versions, and environment variable snapshot.

    The recovery process should include the following steps:

    1. Read checkpoint metadata and confirm global step, world size, and parallel topology.
    2. Rebuild parallel groups that match the topology used when saving.
    3. Load model shards and optimizer states.
    4. Restore data loading progress to avoid repeated or missed sample consumption.
    5. Run a small number of validation steps and compare the post-recovery loss with the baseline before the interruption.
    6. If the error exceeds the threshold, preserve logs and roll back to an earlier checkpoint.

    Checklist 4: Faulty Node Isolation and Rescheduling Process

    1. Detect abnormal nodes through heartbeats, process status, and monitoring metrics.
    2. Preserve logs, metrics, and field information for the abnormal rank.
    3. Mark the abnormal rank and corresponding node, and pause submitting new tasks.
    4. Isolate the node from the current training resource pool.
    5. Schedule a backup node or reallocate card resources.
    6. Rebuild communication groups and load the most recent checkpoint.
    7. Recover training from the checkpoint and observe loss, grad_norm, and communication latency for several steps.
    8. Perform offline diagnosis on the faulty node to determine whether the issue is caused by hardware, drivers, networking, or the framework.

    These checklists are not limited to two-node 16-GPU validation. Their value is to turn “can training run?” into “can training continue, can problems be localized, and can training be recovered?”

    8. From “Can Train” to “Potential for Out-of-the-Box Training”: Boundaries Must Be Clear

    The original expression “out-of-the-box training” was somewhat promotional. It needs to be limited by applicable conditions.

    The revised conclusion should be: under a specified model, platform version, and cluster configuration, domestic compute platforms have the potential to move further toward out-of-the-box training.

    This “potential” is not an unconditional promise. It is based on a comprehensive judgment of the following capabilities:

    1. Model adaptation capability: the ability to load the target model and complete parameter sharding, forward and backward computation, and initialization.
    2. Operator coverage capability: common operators can be validated under different precisions, shapes, and parallel strategies.
    3. Communication optimization capability: cross-node gradient synchronization, gradient reduction, and node-local communication are observable.
    4. Monitoring and alerting capability: loss, grad_norm, memory usage, communication latency, and process status can be collected.
    5. Fault recovery capability: checkpoint saving, recovery from interruption, and isolation of abnormal nodes can be executed.
    6. Automated toolchain: launch, configuration, log aggregation, metric collection, and reproduction processes can be standardized.

    At the same time, the applicable boundary must be clear.

    The two-node 16-GPU 400-step validation discussed in this article cannot prove that domestic compute platforms have the same stability under all models, all data distributions, all network conditions, and all cluster scales.

    To move toward production-grade out-of-the-box use, further validation is still required for:

    • Longer training runs
    • Scaling to more nodes
    • Network jitter injection
    • Data checkpoint recovery
    • Different model structures
    • More complex parallel combinations

    9. FAQ: Four Questions Readers Care About Most

    Question: What is stable long-run training?

    Answer: Stable long-run training does not mean whether a model can complete one forward pass or one backward pass. It means that under continuous multi-step, multi-process, and multi-node conditions, the training process can maintain finite loss, controllable gradients, stable communication, safe memory usage, recoverable checkpoints, and locatable exceptions.

    Question: How should a two-node 16-GPU setup be validated?

    Answer: At least the following should be defined: number of nodes, number of cards, interconnect method, framework version, model scale, parallel strategy, precision, batch configuration, sequence length, loss and grad_norm collection definitions, memory definition, step time definition, communication latency definition, and checkpoint interval.

    Then observe whether 400 consecutive steps have no interruption, no NaN/Inf, no communication timeout, and no continuous memory growth. Checkpoint recovery should also be validated.

    Question: How can numerical stability be judged?

    Answer: The key points are whether loss remains finite over a long period, whether grad_norm stays within a reasonable range, whether learning rate and loss scale behave abnormally, and whether optimizer states update continuously.

    If loss or grad_norm shows continuous increase, spikes, NaN, or Inf, use step, rank, and node logs to locate the abnormal stage.

    Question: What are common mistakes?

    Answer: Common mistakes include:

    • Treating “the job can run” as “stable long-run training”
    • Not defining exception criteria
    • Not recording parallel groups and communication groups
    • Not saving optimizer states
    • Checkpoints cannot be recovered
    • Logs lack step and rank information
    • Focusing only on peak memory while ignoring fragmentation and communication waiting

    These problems can make a 400-step validation look successful, but in reality it cannot support later troubleshooting and recovery.

    Overall, the value of a two-node 16-GPU 400-step stable training validation is not to create a promotional conclusion. Its value is to establish an engineering method that is verifiable, reproducible, debuggable, and recoverable.

    For domestic compute platforms, only when parameter sharding, cross-node communication, gradient synchronization, numerical stability, monitoring and alerting, and fault recovery are all made into clear closed loops can large-model training gradually move from dependence on expert tuning toward standardization, automation, and platformization.