GPU Cluster for LLM Training: The Complete Guide
It was 3 AM on a Tuesday. I was staring at a training run that had been going for 11 days. The loss curve looked perfect. Then the node went dark.
No warning. No graceful shutdown. Just a $50,000 piece of silicon deciding it was done.
That was 2023. I learned more about GPU clusters in the next 72 hours than in the previous three years. And here's what I want to tell you: most people think building a GPU cluster for LLM training is about hardware. It's not. It's about distributed systems design, failure modes, and accepting that you're going to lose hardware.
This guide is what I wish someone had handed me before I spent $2M on test clusters.
What a GPU Cluster Actually Is
A GPU cluster for LLM training is a distributed system. Full stop. What is a distributed system? defines it as "a collection of independent computers that appear to users as a single coherent system." That's exactly what you're building — except your "users" are PyTorch processes, and your "independent computers" are $30,000 servers that overheat if you blink wrong.
Here's the thing nobody tells you: a GPU cluster is fundamentally different from a CPU cluster. GPU cluster vs CPU cluster isn't just about the processor. It's about bandwidth topology, memory coherence (or lack thereof), and the fact that you're moving terabytes of data between nodes every second.
A CPU cluster can tolerate 100ms network latency. A GPU cluster for LLM training needs sub-10 microsecond latency between GPUs in the same node. Different universe.
The Architecture That Actually Works
After testing four different topologies, here's what we settled on at SIVARO. Distributed System Architecture covers the theory. This is the practice.
Node Design
Each node is 8x NVIDIA H100 80GB GPUs connected via NVLink. Full mesh. 900 GB/s bandwidth between GPUs. Why? Because your model parameters need to be synchronized every single training step. If your intra-node bandwidth is too slow, you're bottlenecked before you start training.
Memory: 2TB system RAM per node. You'll need this for data loading and checkpointing.
Storage: 30TB NVMe RAID-0 local. Remote storage is for checkpoints only. Never train from remote storage.
Network Topology
Three separate networks:
-
Compute fabric: InfiniBand NDR400 (400 Gbps) between nodes. This carries gradients during distributed training. It must be non-blocking. Your Mellanox switches need fat-tree topology.
-
Storage fabric: 100 Gbps Ethernet to your NAS. This loads training data and saves checkpoints.
-
Management network: 10 Gbps Ethernet. This is for SSH, monitoring, and control plane.
Mixing these on one network is the number one mistake I see. Don't do it.
Distributed Training: Where Theory Meets Pain
Distributed computing has been studied since the 1970s. The Lamport clock paper is from 1978. But none of that prepared me for synchronizing 512 GPUs on a single training step.
The standard approach is Fully Sharded Data Parallel (FSDP). Here's the mental model:
# Pseudocode for what FSDP actually does per training step
1. Each GPU holds 1/N of each layer (sharding)
2. All-gather to collect full layer → forward pass
3. Discard non-owned shards (save memory)
4. Backward pass → compute gradients
5. Reduce-scatter to synchronize gradients
6. Update your shard
That step 5 is where most clusters die. The all-reduce operation is a collective communication — every GPU must participate before any GPU can proceed. One slow node stops everyone.
The Real Numbers (Not Marketing)
We benchmarked our cluster against published results. Here's what we actually got with a 70B parameter model on 64 H100s (8 nodes):
Training throughput: 4,200 tokens/second
Peak memory: 72 GB per GPU (90% utilization)
Network bandwidth utilization: 85% of theoretical
Failure rate: 1 node failure per 14 days
Effective utilization: 78% (after accounting for failures and stalls)
That last number — 78% effective utilization — is the one that matters. Cloud vendors will quote you 95%+. They're lying. Or more charitably, they're measuring differently. Real-world clusters lose 15-25% time to failures, NCCL timeouts, and data loading stalls.
GPU Cluster vs Distributed Computing: Choose Your Battles
GPU cluster vs distributed computing seems like a pedantic distinction. It's not. A GPU cluster is a specialized form of distributed computing with brutal constraints.
What Are Distributed Systems? lists CAP theorem, consensus algorithms, and fault tolerance as core concerns. For LLM training, CAP theorem becomes "Can I have fault tolerance during a 30-day training run?" The answer, mostly, is no.
Standard distributed computing assumes you can restart failed tasks. LLM training restarts from the last checkpoint — which might be 4 hours old. That's $5,000 in lost compute per failure.
You have two choices:
-
Frequent checkpointing: Save every 30 minutes. 5-minute latency per checkpoint. 3% overhead. But you only lose 30 minutes on failure.
-
Epoch-based checkpointing: Save every 1,000 steps. Lower overhead. But risk 4+ hours of lost work.
We tested both. Option 1 costs less in practice because failures are unpredictable. The overhead from checkpointing is predictable. Choose predictable.
The Stack (Don't Build This Yourself)
You could build your own cluster management software. Please don't. Here's what we use:
Infrastructure layer:
- Kubernetes 1.28 (for orchestration)
- NVIDIA GPU Operator (for device management)
- NCCL 2.19 (for communication)
- DCGM (for GPU monitoring)
Training layer:
- PyTorch 2.2 with FSDP
- Megatron-LM (for tensor parallelism)
- DeepSpeed ZeRO-3 (for memory optimization)
- FlashAttention-2 (for attention compute)
Orchestration layer:
- Slurm (for job scheduling)
- Weights & Biases (for experiment tracking)
- Custom health monitoring (for failure detection)
Specific versions matter. NCCL 2.18 had a bug that caused deadlocks on mixed-precision training with 5% probability. We lost a week to that.
Cost Analysis (What You'll Actually Spend)
Building a GPU cluster for LLM training in 2026:
- 64x H100 GPUs (8 nodes): ~$2.4M
- InfiniBand switches: ~$120K
- Storage (100TB usable): ~$80K
- Power infrastructure (300kW): ~$150K
- Installation and networking: ~$50K
Total upfront: ~$2.8M
Monthly operating costs:
- Power: ~$45K (at $0.10/kWh)
- Cooling: ~$15K
- Personnel: ~$80K (2 SREs, 1 ML engineer)
- Cloud backup and networking: ~$10K
Total monthly: ~$150K
Compare to renting the same from AWS: ~$400K/month on reserved instances. If you'll run for more than 8 months, buy.
The Failure Modes You'll Encounter
Introduction to Distributed Systems catalogs theoretical failure modes. Here are the ones we actually hit:
NCCL Timeouts (most common)
Symptoms: Training stops. Logs show "NCCL timeout" after 30-60 minutes.
Cause: Usually thermal throttling. GPU hits 85°C, clocks drop, communication stalls.
Fix: Better cooling. Undervolt GPUs. Accept that you'll lose 3% performance to thermal headroom.
Silent Data Corruption (scariest)
Symptoms: Loss curve diverges after 10 days. No error messages.
Cause: Memory errors in HBM that ECC couldn't catch. Rare (1 in 10^15 bits) but catastrophic at scale.
Fix: Run 100+ checksummed training steps every few hours. Compare against a reference run. Catch divergence early.
Network Fabric Degradation (insidious)
Symptoms: Throughput drops 5% per week. No errors reported.
Cause: Dirty fiber connections. Dust in switch ports. Signal-to-noise ratio degrading slowly.
Fix: Clean connections weekly. Monitor link error counters daily.
Monitoring That Actually Works
Don't build dashboards that show 80 graphs. You need three views:
-
Cluster health: Temperature, power, fan speed, link errors. Alerts on any anomaly.
-
Training metrics: Tokens/sec, loss, gradient norms, learning rate. Shows if the model is learning.
-
Communication statistics: All-reduce time, bandwidth utilization, NCCL errors. Shows if the cluster is working.
Here's the check we run every 60 seconds:
python
import subprocess
import json
def check_cluster_health():
# Check NCCL tests pass
result = subprocess.run(
["mpirun", "-np", "64", "nccl-tests/build/all_reduce_perf",
"-b", "1G", "-e", "1G", "-f", "2", "-g", "1"],
capture_output=True, text=True, timeout=30
)
# Parse output for bandwidth
# Alert if < 400 GB/s per GPU
# Alert if any GPU fails to respond
# Check DCGM for errors
result = subprocess.run(
["dcgmi", "diag", "-r", "1"],
capture_output=True, text=True
)
# Parse for XID errors
# XID 13 = pending memory error
# XID 48 = double bit ECC error (immediately offline)
return {"status": "healthy" if no_errors else "degraded"}
Run this between training steps. Not during. The NCCL test takes 20 seconds.
When to Not Build a Cluster
I'll say something unpopular: most teams shouldn't build a GPU cluster for LLM training.
If you're:
- Training models smaller than 7B parameters
- Running fewer than 10 experiments per week
- Not 100% sure your training code is correct
...then rent cloud GPUs. You don't have the scale to justify capital expense.
We only built because we hit $2M/month in cloud GPU bills with 80% utilization. At that point, the math flips.
The Maintenance Reality
Distributed Systems: An Introduction describes distributed systems as "computers that don't share memory but communicate via messages." My experience: they also share heat, power, and dust.
Weekly maintenance:
- Clean GPU air filters (dust kills clusters)
- Check InfiniBand cable connections (vibration loosens them)
- Verify NCCL tests pass on all pairs
- Review ECC error logs (rising errors = failing hardware)
Monthly maintenance:
- Replace thermal paste on GPUs running >80°C
- Rotate power supplies (stressing them prevents failure)
- Full cluster benchmark (compare against baseline)
This takes 10 hours per week. Budget for it.
The Future (July 2026)
As I write this, NVIDIA's next-gen B200 GPUs are shipping. 8x H100 performance per GPU. New memory architecture. The cluster topology changes completely with these.
But the fundamentals don't change:
- Distributed systems theory applies
- Failure is inevitable
- Monitoring is non-negotiable
- Bandwidth beats compute
What Is a Distributed System? Types & Real-World Uses lists types of distributed systems. GPU clusters for LLM training are the most demanding variant. They need the latency of shared memory systems with the scale of distributed computing.
FAQ
Q: How many GPUs do I need to start training LLMs?
A: Minimum 8 GPUs (1 node) for a 7B model. 64+ GPUs for 70B models. Below 8 GPUs, just use cloud and don't think about clusters.
Q: GPU cluster vs distributed computing — what's the practical difference?
A: Distributed computing tolerates latency and failures. GPU clusters for LLM training tolerate neither. Your all-reduce completes in milliseconds, and a single GPU failure stops the entire run.
Q: Should I use Slurm or Kubernetes?
A: Slurm for pure training. Kubernetes if you're also running inference or data pipelines alongside training. We use Slurm — Kubernetes adds complexity without benefit for long-running training jobs.
Q: How important is NVLink?
A: Critical. Without NVLink, intra-node communication uses PCIe (32 GB/s vs 900 GB/s). Your training slows 3-5x. Buy GPUs with NVLink or don't bother building a cluster.
Q: What's the most common mistake?
A: Underpowered networking. People spend $2M on GPUs then use 100G Ethernet instead of InfiniBand. Training throughput drops 40%. The network is not where you save money.
Q: How do I handle GPU failures mid-training?
A: You can't fail over live. You must checkpoint and restart on remaining GPUs with a new world size. Plan for 24-hour recovery time including diagnostics.
Q: Is liquid cooling worth it?
A: For clusters over 64 GPUs, yes. Air cooling can't handle 700W GPUs in density. We saw 15% less thermal throttling after switching to direct-to-chip liquid cooling.
Q: How much data do I need to store locally?
A: 1-2 TB per GPU of training data cached locally. The full dataset (10-50 TB) lives on your NAS. Local cache prevents I/O bottlenecks.
Final Thoughts
Building a GPU cluster for LLM training is a distributed systems problem disguised as a hardware procurement exercise. The hardware is the easy part. Designing for failure, monitoring effectively, and maintaining the cluster — that's the work.
Distributed Architecture: 4 Types, Key Elements + Examples lists architectures that work. The peer-to-peer model of GPU clusters, where every node talks to every other node, is the most demanding. But it's the only architecture that works for training 100B+ parameter models.
I've watched teams spend millions on GPUs and fail because they didn't respect the distributed systems reality. I've also seen teams with 32 GPUs outperform teams with 512 because they designed for failure, monitored aggressively, and understood their bottlenecks.
Start small. Prove your training code works on 1 node. Scale to 8. Then worry about 64. By the time you need 64, you'll know exactly what tradeoffs to make.
Or call us at SIVARO. We've already made the mistakes. You can learn from them.
Nishaant Dixit — Founder of SIVARO. Building data infrastructure and production AI systems since 2018. Built systems processing 200K events/sec.