A single-GPU training job updates weights after each batch of 128 examples, but a replacement GPU fits only 32 examples per batch. Which change preserves 128 examples per optimizer update without adding GPUs?
Show the answer
Correct answerD. Accumulate four batches of 32 before each update
AWhy not this: More epochs increase total data exposure but leave each update based on only 32 examples.
BWhy not this: Checkpoint averaging combines model weights after separate updates, not gradients for one optimizer update.
CWhy not this: Changing the learning rate changes update magnitude but does not combine 128 examples into one update.
DWhy this is right: Accumulating appropriately scaled gradients across four microbatches preserves 128 examples per optimizer update.
Gradient accumulation combines gradients from four microbatches of 32 to retain an effective batch size of 128 per optimizer update. Increasing epochs changes total training exposure, not the examples contributing to each update.