Navigation
๐Ÿ‹๏ธ

Training Systems

End-to-end training infrastructure from optimizer math to fault tolerance at 10K GPUs.

0 / 29 chapters

Memory & Optimizer Internals

01

GPU Memory Anatomycoming soon

Where memory goes: parameters, gradients, optimizer states (Adam m/v), and activations.

02

Mixed Precision Trainingcoming soon

FP32, BF16, FP8, Transformer Engine โ€” which tensors at which precision and why.

03

The Memory Wallcoming soon

Why a 70B model in BF16 needs ~140GB before gradients or optimizer states.

04

Activation Memory Analysiscoming soon

What is saved for backward, per-layer cost, and strategies to reduce it.

Memory Optimization Techniques

05

ZeRO Stage 1/2/3coming soon

Partitioning optimizer states, gradients, and parameters across data-parallel ranks.

06

FSDPcoming soon

PyTorch Fully Sharded Data Parallel โ€” ZeRO-3 in native PyTorch.

07

Activation Checkpointingcoming soon

Recompute vs store tradeoff โ€” trading compute for memory.

08

CPU & NVMe Offloadingcoming soon

ZeRO-Offload, ZeRO-Infinity โ€” moving cold state off GPU, prefetching before use.

09

Distributed Launch Mechanicscoming soon

torchrun, RANK, LOCAL_RANK, WORLD_SIZE, elastic launch with fault tolerance.

Pipeline Scheduling

10

Micro-batching & Gradient Accumulationcoming soon

Processing multiple small batches before one parameter update.

11

Pipeline Schedulescoming soon

GPipe, 1F1B, interleaved 1F1B, zero-bubble schedules โ€” tradeoffs and efficiency.

12

Communication Overlapcoming soon

Gradient bucketing, starting AllReduce before backward finishes.

13

MoE-Specific Schedulingcoming soon

Overlapping All-to-All with computation in mixture-of-experts training.

14

Pipeline Bubble Analysiscoming soon

Quantifying efficiency loss from pipeline bubbles and strategies to minimize them.

Fine-Tuning & Adapters

15

LoRAcoming soon

Low-rank adapters โ€” where to apply, rank selection, and training efficiency.

16

QLoRAcoming soon

Quantized base model + FP16 adapters โ€” fine-tuning large models on limited hardware.

17

SFT Pipelinescoming soon

Chat templates, sequence packing, curriculum design, evaluation checkpoints.

18

Multi-Adapter Servingcoming soon

S-LoRA unified paging, Punica batched GEMM, adapter hot-swapping on shared base models.

19

Continual Learningcoming soon

Catastrophic forgetting, replay buffers, elastic weight consolidation.

20

Adapter Registry & Versioningcoming soon

Managing adapter lifecycle, A/B testing different adapters in production.

RLHF & RL Infrastructure

21

RLHF/GRPO Pipelinecoming soon

Generate rollouts โ†’ score with reward model โ†’ compute policy gradients โ†’ update.

22

Rollout Orchestrationcoming soon

Dedicated inference instances for generation, variable-length batching strategies.

23

Reward Model Servingcoming soon

Co-hosting reward/verifier models alongside policy models, external tool environments.

24

Agent RL Infrastructurecoming soon

Sandbox management for RL agents, security isolation, output capture, cost limits.

25

Dynamic Resource Allocationcoming soon

Async vs sync policy updates, elastic allocation between rollout and training.

Fault Tolerance & Efficiency

26

Checkpointing Strategiescoming soon

Synchronous vs asynchronous, distributed checkpointing, optimal save interval.

27

Fault Detection & Recoverycoming soon

Heartbeat monitoring, automatic rank replacement, elastic training with fewer GPUs.

28

Cluster Efficiency Metricscoming soon

MFU, GPU utilization, bubble ratio, communication overhead โ€” diagnosing the bottleneck.

29

Training Diagnosticscoming soon

Loss spikes, gradient anomalies, silent data corruption, thermal throttling.