Status: 🟑 In Progress β€” Deadline August 2026
Stack: PyTorch FSDP Β· DDP Β· Ray Β· SLURM Β· Kubernetes Β· NCCL Β· Mixed Precision


What This Is

Production distributed training infrastructure for training large-scale ML models across 128 GPUs. Covers the full stack: job orchestration, efficient parallelism strategies, fault tolerance, and cost optimization.

This is the infrastructure that makes it practical to train models that don’t fit on a single GPU β€” or even a single node.

Problem Statement

Training a 7B parameter model on a single A100 is straightforward. Training a 70B+ model across multiple nodes with:

  • Efficient gradient synchronization (minimize communication overhead)
  • Fault tolerance (one GPU failure shouldn’t kill a 10-hour run)
  • Optimal parallelism strategy (when to use FSDP vs DDP vs tensor parallel)
  • Cost control (minimize GPU-hours without sacrificing convergence)
  • Reproducibility (same seeds, same results, every run)

…requires purpose-built infrastructure. This project builds it.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Job Scheduler Layer                        β”‚
β”‚              SLURM / Ray Β· Job Queue Β· Priority               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 Distributed Training Layer                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ ─
β”‚  FSDP Sharding  β”‚   Gradient Ckpt    β”‚  Mixed Precision       β”‚
β”‚  (param shards  β”‚   (activation      β”‚  (BF16 forward,        β”‚
β”‚  across ranks)  β”‚   recomputation)   β”‚  FP32 optimizer)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Communication Layer                          β”‚
β”‚           NCCL Β· AllReduce Β· AllGather Β· Ring Topology        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Hardware Layer                               β”‚
β”‚         128x A100 80GB Β· NVLink Β· InfiniBand HDR              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Technical Decisions

FSDP vs DDP: When to Use What

The decision isn’t obvious and most documentation doesn’t explain the tradeoffs clearly:

Use DDP when: Model fits in GPU memory with a reasonable batch size. DDP is simpler, faster (no sharding communication overhead), and easier to debug.

Use FSDP when: Model doesn’t fit in single GPU memory, or you need to scale across many nodes efficiently. FSDP shards parameters, gradients, AND optimizer state β€” enabling training of models 4-8x larger than DDP allows.

The grey zone: 7B-13B models often fit in DDP if you’re aggressive about gradient checkpointing and mixed precision. Worth benchmarking before committing to FSDP complexity.

Gradient Checkpointing Strategy

Naive gradient checkpointing (recompute everything) reduces memory usage by ~60% but increases compute by ~30%. Selective checkpointing (recompute only expensive operations) gets most of the memory savings with less compute overhead.

Implementing an activation memory profiler to identify which layers benefit most from recomputation.

Fault Tolerance at Scale

At 128 GPUs, hardware failures are a matter of when, not if. Building:

  • Async checkpoint saves every N steps (configurable)
  • Failure detection with automatic job restart from last checkpoint
  • Degraded-mode training (run on N-1 GPUs if one fails, sync optimizer state)

Benchmarks (Planned)

Model SizeGPUsBatch SizeThroughputGPU Utilization
7B832β€”β€”
13B1616β€”β€”
70B12864β€”β€”

Milestones

  • M1 (March 2026): 8-GPU baseline β€” DDP, profiling, observability
  • M2 (May 2026): FSDP implementation, 16-GPU scaling tests
  • M3 (July 2026): 128-GPU runs, fault tolerance, cost analysis
  • M4 (August 2026): Full benchmark suite, architecture writeup, public repo

Posts will appear here as they’re published.


GitHub: Available August 2026