the.ai

Systems / Training

verified

Gradient Accumulation

Sometimes the batch size a run needs does not fit in memory. Gradient accumulation runs several smaller batches, adds their gradients together, and only then takes a step — the same update as one large batch, spread over several forward passes.

Viz primitive · budget-splitmicrobatches = 4

microbatches holds 50% of the budget; rest holds the remaining 50%.

Share of memory the activations take against everything else held during a step. Drag the micro-batch count to watch peak memory fall while the step takes longer.

4

Reviewed by opendroid · 2026-08-04