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