Training Validation Guide for 16 Domestic Accelerator Cards Across Two Nodes
This guide defines a practical validation scope for training, rather than inference, on a two-node 16-card domestic accelerator setup. It provides a configuration record, a six-part checklist covering model loading, sharding, gradient synchronization, numerical stability, checkpointing, and resume consistency, plus metrics, pass criteria, and a troubleshooting order. It also states which conclusions can and cannot be extrapolated.
Training Validation Guide for 16 Domestic Accelerator Cards Across Two Nodes
1. Validation Boundary and Configuration
Inference passing does not mean training is stable. Inference only requires forward output to be broadly consistent with a reference implementation. Training also requires backpropagation, gradient synchronization, optimizer updates, and checkpoint saving to remain normal over hundreds of steps or longer.
The validation goal of this article is to confirm that the training pipeline remains stable across continuous iterations. It does not evaluate throughput, nor does it prove that a complete trillion-parameter model can be pretrained from scratch. Adaptation means that model code and operators can run on a given hardware configuration and complete fine-tuning or continued training. Pretraining means parameters are trained from random initialization. The two are not necessarily related, and the validation report should clearly state the validation scope.
Validation conclusions apply only to the recorded configuration. Before starting, fill in the table below and keep it consistent with the report.
| Configuration item | Value in this run | Notes |
|---|---|---|
| Accelerator model, driver version, number of nodes, cards per node | [Fill in] | Total cards should be 16 |
| Framework, collective communication library, and operator library versions | [Fill in] | Revalidation is required after version changes |
| Model parameter scale | [Fill in] | Conclusions cannot be directly extrapolated to other scales |
| Parallel strategy and sharding level | [Fill in] | Data parallelism, tensor parallelism, pipeline parallelism, or sharding method |
| Training method | [Fill in] | Full-parameter update or parameter-efficient fine-tuning |
| Offload settings | [Fill in] | Whether parameters, gradients, and optimizer states are offloaded |
| Mixed precision strategy | [Fill in] | Data types for parameters, gradients, and optimizer states |
| Evaluate throughput? | No | This article does not evaluate throughput |
For full-parameter training, the memory footprint of optimizer states is usually significantly higher than that of model weights. With AdamW, for example, the fp32 master weights and two momentum tensors in mixed precision are often much larger than the bf16 weights themselves. Memory planning therefore needs to be accounted for separately.
2. Checklist for Six Stages
Each stage of the training pipeline can become a failure point, and each must be validated one by one to locate problems.
1. Model Loading and Weight Mapping
Check method: Compare the parameter names, shapes, and data types in the model state_dict() with the corresponding entries in the checkpoint.
Command or log anchor: Pay attention to missing_keys and unexpected_keys in the return value of load_state_dict, as well as the strings “Missing key” and “Unexpected key” in the logs.
Pass criteria: Both sets are empty, or they contain only documented expected differences.
Common failures: Inconsistent parameter name prefixes (for example, an extra or missing module. prefix), linear layer weights that need to be transposed but are not, and data types of some layers being silently converted during loading. Silent conversion changes numerical precision, so after loading, print the dtype of key layers and compare it with the configuration.
2. Parameter, Gradient, and Optimizer State Sharding
Check method: Count the number of parameter elements held by each rank and sum them.
Pass criteria: The sum of elements across ranks equals the total parameter count, the shard boundaries match the parallel configuration, and sharding padding has been correctly removed.
Common failures: Incorrect sharding dimension, padding not removed, and optimizer state sharding inconsistent with parameter sharding.
3. Gradient Synchronization
Check method: Fix a batch, and after backpropagation and synchronization, compute the L2 norm of representative parameter gradients on each rank and compare them.
Command or log anchor: Enable debug output from the collective communication library (such as NCCL_DEBUG=INFO or a vendor-provided equivalent variable), and search for timeout, retry, and hang records.
Pass criteria: After synchronization, the relative error of gradients across ranks is within the tolerance determined by the team baseline, and there is no communication timeout.
Common failures: A rank does not participate in collective communication, gradient accumulation steps are inconsistent across ranks, and gradients are cleared before synchronization.
4. Numerical Stability
Check method: Check torch.isfinite(loss) and the global gradient norm at each step.
Pass criteria: Within the agreed target number of steps, the loss has no NaN or Inf, the gradient norm has no abrupt changes, and it remains in the same order of magnitude as the baseline.
Common failures: Mixed-precision loss scale is too large and causes overflow, learning rate is too high, and the precision of individual backward operators is insufficient.
5. Optimizer State and Checkpoint Saving
Check method: After saving, reread the file, verify the checksum, and compare tensor by tensor.
Pass criteria: The file is complete, the checksum is consistent, and the training step in the metadata matches the step of the learning rate scheduler. The saved content should include parameters, optimizer state, random number generator state, and data loader position.
Log anchors: Save path, write duration, and completion marker for each rank.
Common failures: Some ranks fail to write but do not report an error, optimizer state is not saved, and the saved step is inconsistent with the actual step.
6. Resume Consistency
Check method: Save a checkpoint at step N, resume from that checkpoint, run M more steps, and compare the loss curve with an uninterrupted run.
Pass criteria: Under a deterministic configuration, the loss after resume matches the original run. Under a non-deterministic configuration, the deviation must be within the team-agreed tolerance. The data sampling position must not repeat or skip.
Common failures: Data loader state is not saved, learning rate scheduler is not restored, and random seed is not restored.
3. Metrics and Pass Criteria
| Metric | Definition | Pass criteria |
|---|---|---|
| Non-finite loss count | Number of steps where loss is NaN or Inf | 0 |
| Gradient norm | Global gradient L2 norm per step | No abrupt changes; same order of magnitude as baseline |
| Cross-rank gradient consistency | Relative error after synchronization | Within baseline tolerance |
| Consecutive running steps | Training steps completed without interruption | Reaches the agreed target number of steps |
| Communication timeout count | Number of collective communication timeouts or retries | 0 |
| Checkpoint checksum pass rate | Proportion of files with consistent checksums | 100% |
| Resume deviation | Loss deviation between resumed and original runs | Within tolerance |
All tolerance thresholds should be determined in the team’s baseline runs and written into the validation record.
4. Troubleshooting Order
Failures usually surface at a fixed stage. Following the order below can reduce ineffective changes.
- Confirm that all processes have started and that the world size matches the configuration.
- Review the weight loading logs and confirm that the missing and unexpected keys are empty.
- Verify the shard sizes and parallel configuration.
- Review the communication records for the first step and confirm that there are no timeouts or hangs.
- Check whether the loss and gradient norms in the first few steps are finite and reasonable.
- Check the checkpoint checksum and the loss consistency after resume.
Change only one variable at a time, and record the command, version, and log path. This is how you determine whether a change is effective.
5. Conclusion and Non-Extrapolation
This validation passes only when all of the following conditions are met: all check items in the six stages pass; all metrics in the metrics table meet the pass criteria; continuous running reaches the agreed number of steps; and the resume consistency check passes.
The following conclusions cannot be extrapolated: models with different parameter scales; configurations with different parallel strategies, node counts, or card counts; between full-parameter training and parameter-efficient fine-tuning; environments with different software stack versions; and settings with offload enabled versus disabled.
This validation only shows that the training pipeline can run stably under the recorded configuration. It does not indicate throughput, scaling efficiency, or performance level, nor can it be used to determine the source of training compute for a base model. When writing the report, state the validation scope and configuration table.
