Running training jobs on GPUs
For engineers
Memory math, mixed precision, gradient accumulation, multi-GPU parallelism, renting compute and keeping a long run healthy
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Which part of training memory exists during full fine-tuning but not during plain inference?
Check yourself · 2 of 5
What is the main reason bf16 is easier to use than fp16 for training?
Check yourself · 3 of 5
You train on 2 GPUs with a micro-batch of 4 and 8 accumulation steps. What is the effective batch size?
Check yourself · 4 of 5
When does plain data parallel (DDP) work as the parallelism choice?
Check yourself · 5 of 5
Which items belong in a checkpoint so a resumed run continues properly?
Topics
- Memory budget of a training run5 min read · Weights, gradients, optimizer states and activations, and why full fine-tuning needs several times the memory of inference
- Mixed precision with bf16 and fp85 min read · Lower-precision math for speed and memory, loss scaling, and the numerical failures that show up as NaN or exploding losses
- Gradient accumulation and activation checkpointing5 min read · Trading compute for memory by recomputing activations, and simulating large batches with accumulation steps on limited memory
- Data, tensor and pipeline parallelism6 min read · DDP, FSDP and ZeRO shard work and state across GPUs, while tensor and pipeline parallelism split the model itself
- Monitoring and recovering long runs5 min read · Loss spikes, throughput and utilisation, regular checkpoints, preempted cloud GPUs and resuming without losing work
- Renting GPUs and budgeting runs5 min read · Cloud, GPU-specialist and serverless options, spot pricing, storage and transfer costs, and a hard budget set before a run starts
Start here
- The Ultra-Scale Playbook: Training LLMs on GPU Clusters (opens in a new tab)BookFree
An interactive guide to data, tensor, pipeline and ZeRO parallelism with measured trade-offs.
- Getting Started with Fully Sharded Data Parallel (FSDP) (opens in a new tab)DocsFree
A runnable FSDP setup that shows how parameters, gradients and optimizer state are sharded.
- ZeRO: Memory Optimizations Toward Training Trillion Parameter Models (opens in a new tab)PaperFree
Breaks down the bytes per parameter for weights, gradients and Adam states, and how sharding removes the copies.
Helps to know first
110 questions · last verified 2026-12