How to Validate Large-Model Training Adaptation on Domestic GPUs: Boundaries and Checklist
This article explains how to verify large-model training adaptation on domestic GPUs without confusing it with inference adaptation or pretraining. It covers a memory budget for bf16 mixed precision with AdamW, the FSDP2 sharding path and its acceptance points, and how to interpret a two-node, 16-GPU, 400-step run. It also lists the additional details readers should request before drawing conclusions.
How to Validate Large-Model Training Adaptation on Domestic GPUs: Boundaries and Checklist
1. First Distinguish Three Concepts
On domestic full-function GPUs, “large-model adaptation” is often used to describe three different things. Their goals, validation methods, and failure modes differ, so readers should first confirm which category a report belongs to.
| Category | Goal | Typical validation | Common failure modes |
|---|---|---|---|
| Inference adaptation (Day 0) | The model can complete forward inference on the hardware | Operators run, and outputs are numerically close to the reference implementation | Missing operators, precision deviation |
| Training adaptation | Parameter sharding, gradient synchronization, and optimizer updates form a complete path | Several consecutive training steps run, and loss and gradient norm remain finite | Memory overflow, communication timeout, NaN/Inf |
| Pretraining | Model weights are mainly trained from scratch on the hardware | Full dataset, full step count, convergence to target metrics | Insufficient compute, long cycle, high cost |
Passing training adaptation only shows that the training path can run on the hardware. It does not prove that the model was pretrained on this hardware. The two need separate evidence.
2. Do the Memory Math First
With bf16 mixed precision and AdamW, each parameter typically occupies about 16 bytes: 2 bytes for the bf16 weight, 2 bytes for the gradient, 4 bytes for the fp32 master weight, and 4 bytes each for Adam’s first and second moments. Activations and communication buffers are counted separately, so actual usage is higher.
For nearly 3 trillion parameters, 3×10¹² multiplied by 16 bytes is about 48 TB. Using a single card with 64 GB as an example (an illustrative value; use the actual hardware), 16 cards total about 1 TB. Even with ideal sharding, full-state residency is short by roughly 48×.
Conversely, 16×64 GB cards without offload and ignoring activations can hold at most about 1024 GB divided by 16 bytes, or about 64 billion parameters of full state. Actual usable memory is below the nominal value, so the ceiling is lower.
This leads to a judgment. If the 400-step experiment covers full-state training of all parameters, it must rely on CPU or NVMe offload, or the experiment targets a subset, a shard, or another scale. The original text does not disclose this, so readers should confirm with the team.
For MoE models, total parameters determine the size of optimizer states, while active parameters determine the compute per token. Both must be stated; do not give only one “parameter count.”
3. FSDP2 Training Path
FSDP2 (Fully Sharded Data Parallel, second generation) shards parameters, gradients, and optimizer states across processes. During forward and backward computation, it all-gathers the full parameters of the current layer on demand and releases them after computation. Compared with fully replicated data parallelism, per-GPU resident state is reduced. The cost is more cross-GPU communication, and inter-node interconnect bandwidth must keep up.
The training path can be divided into three stages, each with checkable acceptance points.
| Stage | What it does | Acceptance point |
|---|---|---|
| Model loading | Shard by layer and place directly into each process | Per-GPU memory after loading matches the theoretical value; no CPU memory peak overflow |
| Sharding scheduling | All-gather parameters on demand during forward and backward | All-gather and release occur in pairs; memory does not keep growing with steps |
| Gradient synchronization | Complete cross-GPU reduction after backward | Sync time as a share of the single step is measurable; timeout count is 0 |
The following code only illustrates call order and is not directly runnable.
# Illustrative code: do not run directly. DEVICE_TYPE, communication backend, and version interfaces# are subject to the vendor runtime and framework documentation.# Assume the model has a model.layers attribute, and world_size matches the actual process count.from torch.distributed.device_mesh import init_device_meshfrom torch.distributed.fsdp import fully_shard, MixedPrecisionPolicyimport torchmesh = init_device_mesh(DEVICE_TYPE, (world_size,))mp = MixedPrecisionPolicy(param_dtype=torch.bfloat16, reduce_dtype=torch.float32)for layer in model.layers: # Shard layer by layer to reduce the memory peak of each all-gatherfully_shard(layer, mesh=mesh, mp_policy=mp)fully_shard(model, mesh=mesh, mp_policy=mp)for step, batch in enumerate(dataloader):loss = model(**batch).lossloss.backward()optimizer.step()optimizer.zero_grad()# Record loss, gradient norm, NaN/Inf count, and per-GPU memory peak
This code omits learning-rate scheduling, gradient clipping, and checkpoint saving and restoration. These also must be validated in real training.
4. How to Read the Two-Node, 16-GPU, 400-Step Result
The original text discloses three results: 16 training processes complete 400 optimizer updates, loss and gradient norm remain finite throughout, and no abnormal interruption occurs. Each item has limited meaning.
- 400 updates show that the training path can run continuously without deadlock or process exit. They do not show that the model converges. For a trillion-parameter model, 400 steps is a very short run.
- Finite loss and gradient norm show that no NaN or Inf appears. They do not show that loss is decreasing in the right direction; the full curve is needed.
- No abnormal interruption is a qualitative description. To judge whether it is reliable, numbers such as communication timeout count, retry count, process survival rate, and memory peak are needed.
To judge the scope of this validation, readers still need the following information:
- Parameter count…
