Training a 100B-Parameter Model on Two 8-GPU Nodes: Parallelism Setup, Memory Math, and Troubleshooting
This article documents a hands-on validation of training a 100-billion-parameter model on a two-node, 16-GPU cluster, covering the full pipeline of 400 forward and backward steps. It walks through hardware and RoCEv2 network prerequisites, software version consistency checks, detailed GPU memory calculations with optimizer state offloading, a TP=8/PP=2/DP=1 parallelism strategy with 1F1B scheduling, a monitoring checklist with alert thresholds, and an ordered troubleshooting guide for common failures such as low throughput, OOM, NaN loss, and process hangs.
1. Scope of This Validation
This article records a pipeline validation: launching training of a 100-billion-parameter model on two nodes with 16 GPUs in total, and completing 400 forward and backward steps. All figures are based on this specific example configuration and are estimates. Anything marked as “estimated” must be replaced with measurements from your own environment.
400 steps is a very small scale. With a global batch of 65,536 tokens per step, 400 steps process roughly 26 million tokens. That is enough to verify that data loading, forward pass, backward pass, gradient synchronization, parameter updates, and checkpoint saving all work end to end — but it says nothing about model convergence or long-term system stability.
2. Hardware and Network
The example environment consists of two servers, each with 8 identical accelerator cards, 80 GB of memory per card, 16 cards in total. Cards within a node communicate over high-speed interconnect. The two nodes are connected via 200G Ethernet with RoCEv2, and the switch has PFC and ECN flow control enabled.
Before deployment, confirm the following:
- The intra-node interconnect type and its measured bandwidth
- The measured bandwidth of the cross-node RoCE NICs, obtained with a bandwidth testing tool rather than relying on nominal values
- The actual configured PFC priorities and ECN thresholds
- Host memory per machine — this setup requires about 1 TB (see Section 4)
PFC and ECN settings must be checked item by item against the switch vendor’s documentation. Misconfiguration causes packet loss and retransmission, which significantly degrades training throughput — while the loss may still decrease normally. Therefore, you cannot judge network health by looking at the loss curve alone.
3. Software Stack and Versions
Use containers to pin the runtime environment, and record the driver, device runtime, communication library, and framework versions inside the image as a matched set. The table below shows the example versions used here; replace them for your actual deployment.
| Component | Example Version | How to Verify |
|---|---|---|
| Accelerator driver | Example: Driver A.B.C | Query with the vendor’s management tool |
| Device runtime | Example: X.Y | Runtime version command or header macros |
| Collective communication library | Example: Z.W | Check library version output |
| Deep learning framework | Example: Framework M.N | Run python -c “import framework; print(framework.version)” |
ABI incompatibilities usually only surface at runtime. To check, confirm that the communication library the framework links against matches the version installed in the image: run ldd <path to the framework’s core shared library> and grep for the communication library name. The output path should point to the same version inside the image.
4. GPU Memory Calculation
For a 100B-parameter model, GPU memory is dominated by model states. The following estimate assumes 100 billion parameters, bf16 mixed precision, and the AdamW optimizer.
Per-parameter model state footprint:
- bf16 weights: 2 bytes
- bf16 gradients: 2 bytes
- fp32 master weights: 4 bytes
- fp32 momentum: 4 bytes
- fp32 variance: 4 bytes
That totals 16 bytes per parameter, so 100 billion parameters require roughly 1,600 GB.
The parallelism configuration used here is tensor parallelism TP=8 (8 GPUs within one node), pipeline parallelism PP=2 (each node holds half the layers), and data parallelism DP=1. With 16 GPUs in total, each GPU holds about 1/16 of the parameters, or 6.25 billion.
| Item | Per-GPU Footprint (Estimated) |
|---|---|
| Model states without offloading | 6.25B × 16 bytes ≈ 100 GB — exceeds 80 GB |
| States remaining on GPU after offloading optimizer states to host memory | 6.25B × 4 bytes ≈ 25 GB |
| Activations (with recomputation enabled) | ~10 GB, must be measured |
| Communication buffers and fragmentation headroom | ~10 GB, must be measured |
| Total | ~45 GB, under 80 GB |
The offloaded optimizer states are about 6.25B × 12 bytes ≈ 75 GB per GPU. Across two nodes that totals roughly 1,200 GB, or about 600 GB per node. Host memory also needs headroom for buffers and system processes, which is why the example machines have 1 TB of RAM.
Note that with DP=1, ZeRO has no replicas to shard across and cannot reduce memory. Claims that treat ZeRO as a memory-saving mechanism only hold when DP is greater than 1. The memory savings in this example come from optimizer state offloading.
Both offloading and recomputation have costs. Offloading increases data movement between PCIe and host memory, lengthening each step. Recomputation adds roughly the cost of one extra forward pass. Both reduce throughput, so compare using measured throughput rather than just checking whether training runs.
5. Parallelism Strategy and Scheduling
The communication paths in this configuration:
- TP=8: splits matrix operations within a single node, avoiding high-frequency cross-node tensor communication.
- PP=2: the model is split by layers into two stages, one per node. Cross-node communication is limited to point-to-point activation transfers between pipeline stages.
- DP=1: no gradient synchronization across replicas. Techniques like “overlapping gradient synchronization with backpropagation” do not apply here; cross-node network pressure comes mainly from pipeline point-to-point transfers.
Scheduling uses 1F1B. Given pipeline stages p and microbatches m, the pipeline bubble fraction is (p−1)/(m+p−1). Here p=2 and m=16, so the bubble is about 1/17, or 5.9%.
The global batch is determined by microbatch size, number of microbatches, and data parallelism. Here microbatch size is 1, sequence length is 4096, m=16, and DP=1, so each step processes 16 × 4096 = 65,536 tokens.
The learning rate uses an example configuration: linear warmup over the first 40 steps, peaking at 1e-4. This value must be tuned for your model and data.
6. Monitoring Checklist
| Metric | Collection Method | Sampling Period | Alert Threshold (Example) | Interpretation |
|---|---|---|---|---|
| Loss | Training log, per step | Per step | Immediate alert on NaN or Inf; over 3× the median of the last 50 steps | Steady decrease is normal; for spikes, check gradient norm |
| Gradient norm | Training log, per step | Per step | NaN or Inf; over 5× historical median for 10 consecutive steps | Sustained increase usually points to learning rate or data issues |
| Token throughput | Training log, averaged every 10 steps | Every 10 steps | Over 20% drop from the prior 10-step steady value for 5 minutes | When it drops, check network and optimizer offloading first |
| MFU | Derived from throughput: MFU ≈ 6 × parameters × tokens/sec ÷ (GPU count × peak FLOPS per GPU) | Every 10 steps | Below 80% of measured baseline | The formula omits attention FLOPs, so values run low; compare against your own baseline |
| GPU utilization | Vendor monitoring tool | 10 s | Below 50% for 60 consecutive seconds | Periodic dips usually indicate communication waits |
| GPU memory usage | Vendor monitoring tool | 10 s | Over 90% of per-GPU memory | Near the limit, check fragmentation and activations |
| Packet loss and PFC | ethtool -S, filter entries containing pfc or drop | 60 s | Continuously increasing counters | Growth indicates network congestion or misconfiguration |
| Host memory | free -g | 60 s | Available memory below 20% | Insufficient offload buffers cause paging and severe slowdowns |
7. Common Issues and Troubleshooting Order
Change only one variable at a time, and record metrics before and after each change, so that multiple changes don’t mask each other.
- Throughput far below expectations, with periodic GPU utilization drops. First check NIC packet loss and PFC counters, then check whether the pipeline scheduling bubble is too large, and finally check for unnecessary cross-node collective communication.
- OOM. First confirm bf16 mixed precision is in use, then confirm recomputation is enabled, then confirm optimizer offloading is actually active (per-GPU model states should be around 25 GB). Only then consider reducing the microbatch size. Smaller microbatches reduce activation memory but change the pipeline bubble and per-step compute, so trade-offs apply.
- NaN in the loss. Check whether the learning rate remains too high after warmup, check whether gradient clipping is enabled, and check whether the precision of the offloaded optimizer states matches the design.
- Process hang. Check communication timeout settings, and confirm the master address and port are consistent on both nodes.
8. Conclusion
This example completed 400 training steps of a 100-billion-parameter model on two 8-GPU nodes, verifying that the training pipeline runs end to end — data loading, forward pass, backward pass, parameter updates, and checkpoint saving. No OOM or process hangs occurred during the run. This result only demonstrates that short runs work; it is not evidence of long-term stability. To assess that, run a stress test of at least several hours and record time-series curves for throughput, temperature, memory, and network counters.
We recommend that readers first use the memory calculation table to estimate whether their own configuration is feasible, then verify each item in the monitoring checklist, and finally replace the estimates in this article with measured data.
