---
title: How does ring all-reduce scale with the number of workers? How do you keep convergence when the global batch grows 8×?
url: https://gurkanozkan.ai/learn/questions/mle-all-reduce-gradient-accumulation-and-large-batch-training-56/
markdown: https://gurkanozkan.ai/learn/questions/mle-all-reduce-gradient-accumulation-and-large-batch-training-56.md
kind: question
role: ML engineering
stage: Technical
difficulty: Hard
json: https://gurkanozkan.ai/api/learn/questions/mle-all-reduce-gradient-accumulation-and-large-batch-training-56.json
robots: noindex
---

# How does ring all-reduce scale with the number of workers? How do you keep convergence when the global batch grows 8×?

ML engineering · Technical · Hard

## Answer

*Model answer, written in a candidate's voice*

### In short

- Ring all-reduce per-worker bandwidth is ~2(N-1)/N x message size, near-constant in N, while latency grows with N.
- Overlap communication with backward by bucketing gradients and starting all-reduce as buckets fill.
- For an 8x global batch, scale LR roughly linearly with warmup; use LAMB/LARS for very large batches.
- Use gradient accumulation to emulate the large batch without raising per-device memory; scale each micro-batch loss by 1/accumulation steps so gradients are averaged, not summed.
- Keep BN statistics consistent across devices with synchronised BN or global-stat normalisation.

### In full

Ring all-reduce is bandwidth-efficient as workers grow: each worker moves about 2(N-1)/N times the message size, so the bandwidth term is nearly flat in N, but the number of steps and latency still grow with N, so very large clusters need good bucketing and topology-aware placement. I would overlap communication with backward by bucketing gradients and launching all-reduce as soon as a bucket is ready, rather than waiting for the full gradient. For an 8x global batch, I would not just keep the same LR: use linear LR scaling with warmup as the baseline, and for very large batches consider LAMB/LARS-style layer-wise trust ratios, while validating on a small sweep because linear scaling is a heuristic, not a guarantee. I would also use gradient accumulation to emulate the large batch—effective batch = micro-batch x accumulation steps x workers—so per-device memory stays bounded while the optimiser sees the large batch, and I divide each micro-batch loss by the number of accumulation steps so the accumulated gradient is an average rather than a sum, which would otherwise silently multiply the effective learning rate. Finally, batch-norm statistics must match the global batch: use synchronised BN or otherwise compute/sync global mean and variance across devices, otherwise train/eval mismatch and unstable normalisation can quietly break convergence.

*Corrected by an independent AI reviewer.*

## What a strong answer covers

- Ring all-reduce bandwidth cost ≈ 2(N−1)/N × message size per worker (near-constant in N) plus latency terms.
- Overlap communication with backward.
- Linear LR scaling with warmup; LAMB/LARS for very large batches.
- Gradient accumulation to emulate large batches; BN statistics across devices.

## Common mistakes

- scaling the batch without the LR
- double-counting accumulated gradients (averaging errors).

## Topic guides

- [Distributed training and parallelism](https://gurkanozkan.ai/learn/topics/distributed-training.md)
- [Training neural networks: losses, optimisers, numerics and scale](https://gurkanozkan.ai/learn/topics/training.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
