Guide-linked quiz · Hard Level
ZeRO and Sharded Optimizers Quiz
Covers ZeRO stages, Adam state memory, parameter gathering, gradient reduction, offload options, and communication costs.
Question 1 of 8
What redundancy does ZeRO eliminate compared to plain data parallelism?
Preview every question8 questions
Answers and explanations appear as you take the quiz.
- What redundancy does ZeRO eliminate compared to plain data parallelism?
- Duplicate full copies of optimizer state, gradients, and parameters on every GPU
- Duplicate copies of the training data on each GPU
- Redundant network cables between nodes
- Repeated forward passes over the same batch
- Why is optimizer state often the biggest memory hog with Adam?
- Adam stores no extra state at all
- Adam keeps additional per-parameter values (like momentum and variance), often several times the model size
- Adam duplicates the entire dataset
- Adam requires storing every past gradient forever
- What does ZeRO Stage 3 shard that Stages 1 and 2 do not?
- The training data
- The loss function
- The model parameters themselves
- The learning rate schedule
- In ZeRO Stage 3, how does a GPU get the full parameters it needs for a layer's forward pass?
- It never needs the full parameters
- It downloads them from the internet
- It recomputes them from scratch each time
- It performs an all-gather to collect the missing slices, then discards them afterward
- Which PyTorch feature natively implements ZeRO-style sharding?
- FSDP (Fully Sharded Data Parallel)
- DataLoader
- TorchScript
- Autograd
- What is the core tradeoff ZeRO makes to save memory?
- It sacrifices model accuracy for speed
- It adds extra communication to gather and scatter shards as needed
- It removes layers from the model
- It only works with very small models
- Which state is partitioned in ZeRO Stage 1?
- Only parameters, with optimizer states replicated
- Parameters, gradients, and optimizer states all sharded
- Optimizer states, while parameters and gradients remain replicated
- Only input activations and labels
- What is a practical cost of ZeRO-style sharding?
- It removes the need to calculate gradients
- It makes every optimizer update local with no data exchange
- It requires the model to be retrained from scratch for every step
- Additional communication to gather parameters and distribute gradients
Keep testing yourself
More quizzes picked for your level.