FSDP2 Training Enablement on Domestic GPUs: A Practical Path and 16-GPU Smoke Test
This article distinguishes inference enablement from training enablement, outlines the prerequisites for reproducing a PyTorch FSDP2 workflow on domestic GPUs, and explains what a 16-GPU smoke test can—and cannot—demonstrate. It also provides an engineering checklist covering parallelism, memory, communication, precision, and reproducibility.
Distinguish Inference Enablement from Training Enablement
Inference enablement usually means running a newly released model’s forward pass on a target accelerator. The work focuses on operator coverage and numerical accuracy: attention, matrix multiplication, normalization, activation functions, and other operators must be implemented or mapped to the target hardware, while the output error must remain within an acceptable range compared with a reference implementation. Inference involves only forward computation. The graph is fixed, there is no backward pass, and gradients do not need to be synchronized across devices.
Training enablement requires many more components to work together:
- Distributed weight loading: Sharded weights for very large models must be loaded according to the parallelism strategy without exceeding the memory capacity of a single node.
- Sharding of parameters, gradients, and optimizer states: Once the model exceeds the memory capacity of one accelerator, all three types of state must be partitioned.
- Complete backward-operator coverage: The backward graph generally uses more operator types and has stricter precision requirements than inference.
- Collective communication: Primitives such as AllReduce, AllGather, and ReduceScatter must work with the available network topology.
- Numerical stability: Mixed-precision training must prevent loss overflow, gradient explosions, and the propagation of NaN values.
Therefore, the fact that a model can run inference on a particular accelerator does not prove that it can be trained there. It certainly does not prove that pretraining for that model was completed on the accelerator. When reviewing a technical report, first determine whether it validates inference, fine-tuning, or pretraining. Then examine the model scale and test duration.
Prerequisites for an FSDP2 Workflow
FSDP2 is a parameter-sharding data-parallel approach in PyTorch. Its entry point is commonly fully_shard, with DTensor used internally to represent sharded tensors. Parameters, gradients, and optimizer states are distributed across devices in the data-parallel group. During forward and backward execution, parameters are gathered as needed and released after use. This interface is available in newer PyTorch versions; the exact introduction version and stability should be confirmed in the documentation for the version being used.
To reproduce this workflow on domestic GPUs, at least the following items must be verified:
- Framework versions: The PyTorch version, the vendor’s adaptation branch or plugin version, and the compatibility relationship between them.
- Communication backend: The version of the collective communication library and whether it can recognize both intra-node interconnects and inter-node networks.
- Sharding strategy: The sharding granularity, such as by layer or module; the
reshard_after_forwardsetting; and the modules that callfully_shardindependently. - Mixed precision: The
param_dtypeandreduce_dtypeconfigured throughMixedPrecisionPolicy, as well as whether optimizer states remain in FP32. - Launch configuration: The
nnodes,nproc_per_node, and rendezvous parameters used bytorchrun, along with the environment variables required between nodes. For example, two machines with eight accelerators each have a world size of 16. - Multimodal components: Whether all operators used by the vision encoder and language backbone are implemented, and how irregular sequence lengths on the vision side are handled.
These conditions should be included in the test record. Without versions and configuration details, others cannot reproduce the results, and the conclusions cannot be compared fairly with those from other solutions.
What a 16-GPU Smoke Test Should Demonstrate
Consider a basic estimate first. With mixed-precision Adam, the training state for each parameter occupies approximately 16 bytes:
- 2 bytes for the BF16 parameter
- 2 bytes for the BF16 gradient
- 4 bytes for the FP32 master weight
- 4 bytes each for the FP32 first- and second-moment estimates
This estimate does not include activations. If all 3 trillion parameters participate in training, the total state size is approximately 48 TB. Even with complete sharding across 16 GPUs, each GPU would still need to hold about 3 TB, far beyond the memory capacity of a typical single accelerator.
For a model of this scale to run on 16 GPUs, one or more of the following conditions would generally be required:
- The model uses a Mixture-of-Experts architecture and activates only a small number of experts per step. However, all expert parameters and optimizer states still need to be stored, so this alone does not solve the storage problem.
- CPU or SSD offload moves part of the state out of GPU memory. In this case, bandwidth and host memory become bottlenecks.
- Only part of the parameters is trained, such as LoRA adapters or selected modules.
- Other storage or sharding mechanisms are being used but have not been disclosed.
As a result, the claims “nearly 3 trillion parameters,” “two machines with 16 GPUs,” and “400 consecutive optimizer updates” cannot be directly combined to conclude that trillion-scale training was completed. Public materials may omit the total parameter count and the number of active parameters, the actual parameter range being trained, sequence length, global batch size, micro-batch size, parallel sharding strategy, offload and recomputation settings, and optimizer-state precision.
Readers can confirm only that, during the reported test window, the training pipeline ran without errors and the loss remained finite. This shows that the training path was operational. It does not prove that large-scale pretraining is feasible, nor that complete pretraining was performed on the reported cluster.
If you are running a similar smoke test, define the objectives and thresholds before starting, then compare the results against them afterward. Possible objectives include:
- The training pipeline completes successfully.
- Per-step duration and memory usage remain within the expected range.
- The loss curve remains continuous after checkpoint recovery.
Engineering Checklist
The following checklist can be used directly as a test-record template. Each item should include concrete values rather than simply being marked “completed.”
Parallel Sharding
- Degrees of data, tensor, pipeline, and expert parallelism, as well as the size of the FSDP sharding group
- Number of nodes and accelerators crossed by each parallel dimension, and whether the configuration is aligned with the network topology
Sequence and Batch
- Maximum and average sequence lengths
- Global batch size, micro-batch size, and gradient accumulation steps
Memory
- Peak memory usage per GPU and allocator fragmentation
- Scope of activation recomputation, objects being offloaded, and bandwidth consumed by offload
Communication
- Percentage of per-step time spent on communication
- Whether AllGather and ReduceScatter overlap with computation
- Inter-node bandwidth utilization, timeout count, and retry count
Precision and Numerical Stability
- Precision used for parameters, gradients, reductions, and optimizer states
- Initial loss-scaler value, adjustment interval, and number of skipped steps
- Gradient-clipping threshold and per-step records
