ML Systems & Distributed Training

Build distributed training systems from state and collective semantics upward: deterministic input and restart, communication, DDP and FSDP, model parallelism, composed plans, recovery, profiling and fleet operation. CPU multiprocess evidence is sufficient for correctness gates; GPU and cluster claims require the topology on which they were measured.

10 sections · 118 units · about 486 hours

0/118
Start hereRun identity, launch configuration and the setup, step, save, load and teardown contract
1Training Pipeline and Framework Internals0 of 12 passed · project: Single-process golden trainer founding trainlab
  1. Run identity, launch configuration and the setup, step, save, load and teardown contract4h
  2. Dataset manifests, document-to-batch lineage and deterministic sampler position4h
  3. Microbatches, accumulation, global batch, token accounting and update semantics4h
  4. Who owns parameters, buffers, gradients, optimizer, scheduler, scaler, RNG and loader state4h
  5. Autograd graphs, backward scheduling, saved tensors and gradient hooks5h
  6. FP32, TF32, BF16 and FP16 state, autocast and loss-scaling failures4h
  7. Persistent, activation, temporary and allocator memory in one training step4h
  8. Activation checkpointing, recomputation cost and selective policies4h
  9. Step timelines and repeated-trial benchmark hygiene4h
  10. PyTorch profiler traces, memory snapshots and NVTX ranges for a training step3h
  11. `torch.compile` on a training step: graph boundaries, recompiles and breaks3h
  12. Exact resume state and tiny deterministic fixtures for systems debugging5h
2Ranks, Collectives and Topology0 of 13 passed · project: Ordered collectives with a CPU correctness suite
  1. Processes, global and local rank, world size and one process per device3h
  2. Rendezvous, stores, launchers and default and nested process groups4h
  3. Point-to-point transfers, broadcast and reduce ownership4h
  4. All-reduce, gradient averaging and the all-gather and reduce-scatter duality4h
  5. All-to-all semantics and token exchange3h
  6. Barriers, collective ordering and shape and dtype agreement4h
  7. Asynchronous collective handles, CUDA streams, events and completion4h
  8. Ring and tree collectives and the \(\alpha\)-\(\beta\) cost model5h
  9. Per-rank bytes, critical paths, message size and effective bandwidth4h
  10. PCIe, NVLink, NVSwitch, NICs, node topology and the NCCL and Gloo backends4h
  11. Rank-local logs, collective sequence numbers, timeouts, aborts and teardown4h
  12. A CPU multiprocess collective correctness suite4h
  13. Hierarchical collectives and compressed communication with accuracy controls3h
3Data Parallelism and Overlap0 of 12 passed · project: Data-parallel training with overlapped buckets
  1. Replicated state, disjoint data ownership and DistributedSampler invariants3h
  2. Loss reduction, update equivalence and the single-process oracle4h
  3. Global batch across workers and accumulation, and `no_sync`4h
  4. Minimal data parallelism with an explicit all-reduce4h
  5. DDP construction, parameter registration and reducer buckets4h
  6. Bucket size, launch count, autograd hooks and compute-communication overlap5h
  7. Unused parameters, static graphs and divergent control flow4h
  8. Rank-consistent loss and metrics, and distributed batch normalization3h
  9. DDP communication hooks, compression contracts and a PowerSGD experiment4h
  10. Stragglers, weak and strong scaling, parallel efficiency and hierarchical DP5h
  11. Synchronized timing under fixed work and gradient-ready and bucket timelines4h
  12. Failure cleanup and rank-attributed logs in data-parallel training3h
4ZeRO and Fully Sharded Training0 of 12 passed · project: Fully sharded training with resharding evidence
  1. The replicated data-parallel memory baseline by dtype3h
  2. ZeRO-1, ZeRO-2 and ZeRO-3 partitioning5h
  3. Parameter all-gather before compute and gradient reduce-scatter after backward6h
  4. Reshard-after-forward policies and forward and backward prefetch4h
  5. Flat parameters, wrapping granularity and hybrid sharding5h
  6. FSDP2 on DTensor with mixed parameter and reduction dtypes4h
  7. Activation checkpointing under FSDP and CPU and storage offload5h
  8. Meta-device and deferred parameter initialization3h
  9. Peak memory from live windows and FSDP communication volume5h
  10. Full, local and sharded state dictionaries and optimizer state4h
  11. Checkpoint consolidation and resharding to a new world size3h
  12. Sharded equivalence tests and auto-wrap, OOM and replication failures4h
5Tensor, Sequence and Context Parallelism0 of 11 passed · project: Tensor, sequence and context parallelism with owned layouts
  1. Column- and row-parallel linear layers and communication cancellation5h
  2. Vocabulary-parallel embeddings, output projection and cross-entropy5h
  3. Tensor-parallel attention heads, GQA divisibility and MLP partitioning5h
  4. Sequence-parallel normalization and residual layouts3h
  5. DTensor placements and redistribution as collectives4h
  6. DeviceMesh, tensor-parallel groups and input, output and gradient layouts4h
  7. Tensor-parallel memory and communication volume by layer4h
  8. Context-parallel sequence ownership and ring attention5h
  9. Causal masks, document boundaries, positions and RNG across shards4h
  10. Divisibility failures and single-process reconstruction oracles4h
  11. Choosing TP and CP degrees, and asynchronous tensor parallelism4h
6Pipeline Parallelism0 of 10 passed · project: Pipeline schedules with validated simulation and measured trade-offs
  1. Ordered stages, stage cost and balanced or automated partitioning5h
  2. Microbatches, the forward and backward dependency graph and divisibility4h
  3. Activation and gradient transfer, send and receive protocols and stalled peers5h
  4. GPipe fill-drain and 1F1B schedules with their phases5h
  5. The pipeline bubble and activation lifetime under GPipe and 1F1B4h
  6. Interleaved virtual stages and zero-bubble and dual-pipeline schedules4h
  7. A validated pipeline schedule event simulator4h
  8. Stage-local ownership, final-stage loss and tied embeddings4h
  9. Recompute inside stages and pipeline groups combined with DP or TP4h
  10. Throughput, latency and memory trade-offs across schedules3h
7Expert Parallelism and Mixture of Experts0 of 10 passed · project: Expert-parallel MoE with balanced routing and honest accounting
  1. Sparse MoE layers, router scores and shared and fine-grained experts5h
  2. Top-k selection with deterministic ties and output recombination4h
  3. Token packing, all-to-all dispatch and inverse combine5h
  4. Expert process groups, expert tensor parallelism and expert state ownership4h
  5. Capacity factor and dropless, dropped and padded routing4h
  6. Auxiliary load-balancing loss and router z-loss4h
  7. Tokens-per-expert histograms, hot experts and all-to-all skew4h
  8. Masked-token, router-gradient and empty-expert tests5h
  9. FSDP with expert-sharded parameters and EP, TP and DP groups4h
  10. MoE communication and memory accounting and topology-aware placement4h
8Multidimensional Parallel Planning0 of 13 passed · project: Composed parallel plan with tested critical path
  1. The parallel dimensions and world-size factorization4h
  2. Named device meshes, rank coordinates and group construction4h
  3. Batch and token equations and divisibility across dimensions4h
  4. Per-rank parameter, gradient, optimizer, checkpoint and buffer memory4h
  5. Per-rank activation and temporary memory under a composed plan3h
  6. Per-layer FLOPs and the collective volume of every dimension5h
  7. Bubble and imbalance cost, critical paths and overlap constraints5h
  8. Link contention, intra- and inter-node placement and fast links for TP and EP5h
  9. TP versus CP for long context, and DP, ZeRO and PP under batch limits4h
  10. Configuration search with legal-plan pruning and predicted regimes5h
  11. Measured-to-predicted residuals and the topology and assumption manifest4h
  12. Correctness tests for a composed 2D or 4D plan4h
  13. Plan ranking under uncertain bandwidth and heterogeneous devices3h
9Checkpointing and Fault Tolerance0 of 11 passed · project: Atomic sharded checkpoints with kill-tested recovery
  1. The recoverable state set and deterministic resume of samplers and RNG streams4h
  2. Full and sharded formats and distributed checkpoint state-dict contracts4h
  3. Checkpoint manifests, schema versions and name and optimizer compatibility4h
  4. Atomic publish, commit markers, checksums and corruption detection4h
  5. Coordinated saves, asynchronous checkpointing and staging memory5h
  6. Checkpoint frequency, save cost, lost work and recovery objectives4h
  7. Restoring onto a different world size or mesh4h
  8. Preemption signals and bounded graceful shutdown3h
  9. Rank crashes, collective timeouts, elastic restart and replica recovery5h
  10. Storage saturation, partial writes, slow ranks and last-known-good retention4h
  11. Kill-at-every-boundary campaigns, post-resume equivalence and the recovery audit5h
10Performance and Fleet Operation0 of 14 passed · project: Measured fleet baseline with one real-code win
  1. Step time, token throughput and MFU versus HFU4h
  2. Strong and weak scaling efficiency and goodput under failures4h
  3. Fixed-workload benchmark contracts, variance and regression manifests5h
  4. Timeline attribution and multi-rank trace alignment5h
  5. NCCL traces, Flight Recorder and desynchronization reports3h
  6. Compute, memory and communication bounds and exposed communication4h
  7. Data loader, storage and host-transfer bottlenecks3h
  8. Allocator fragmentation, activation peaks, OOMs and recompilation storms4h
  9. Kernel launch gaps and rank and node straggler localization4h
  10. Network, topology and placement regressions and numerical instability at scale4h
  11. Gang scheduling, quotas, preemption, capacity and Kubernetes versus Slurm5h
  12. Health checks, canaries, rollback, runbooks and fleet anomaly detection4h
  13. Cost per useful token and performance per watt3h
  14. A small real-code contribution with before and after evidence6h

Final project: Distributed Training Systems Laboratory

Carry one tiny transformer and one evidence repository through the track. Keep correctness runnable on CPU processes, add hardware measurements only where available, and finish with a bounded change to a real training codebase.

  • A correctness core with restartable data and state, rank and group construction, tested collectives, single-process numerical oracles, DDP and sharded steps, TP, CP and PP mechanisms, a tiny MoE dispatcher, structured rank traces and analytic memory and communication models.
  • A composed-plan and recovery dossier with a legal 2D or 4D device mesh, topology and batch constraints, predicted memory and critical path, atomic sharded checkpoints, changed-layout restore, kill and corruption campaigns, and explicit separation of simulated, CPU, single-GPU and multi-GPU evidence.
  • A real-code extension in Picotron, TorchFeather, TorchTitan or an isolated Bumblebee branch with a fixed-workload baseline, aligned profiles, correctness and regression tests, before and after throughput, memory and reliability results with variance, a reproducible manifest, negative evidence and a skeptical design defense.
How it's graded · about 30 to 45 hours

Correctness core

Pass: Restartable data and state, rank and group construction, tested collectives and single-process oracles support DDP and sharded steps, TP, CP and PP mechanisms, a tiny MoE dispatcher, structured rank traces and analytic memory and communication models.

Great: Every equivalence runs on CPU processes with the gloo backend against an independent oracle, and one defect per mechanism is caught by a named test.

Plan and recovery

Pass: A legal two- or four-dimensional mesh carries topology and batch constraints with predicted memory and critical path, atomic sharded checkpoints, changed-layout restore, and kill and corruption campaigns with simulated, CPU, single-GPU and multi-GPU evidence labeled apart.

Great: A blinded mesh choice precedes execution with residuals explained, and the game-day recovery replays from committed state only.

Real-code extension

Pass: The Picotron, TorchFeather, TorchTitan or isolated Bumblebee change carries a fixed-workload baseline, aligned profiles, correctness and regression tests, before-and-after results with variance, a reproducible manifest and negative evidence plus a skeptical design defense.

Great: Two alternatives are measured against the change on the traced critical path, and the losing regimes bound its claims.

Reproducibility and judgment

Pass: A clean checkout rebuilds every table from raw per-rank traces, every protection has an injected-defect test, and claims state the hardware and simulation tier behind them.

Great: An independent operator reproduces the dossier, and the defense names what to remove if the measured benefit is weak.