Estimate Ring All-Reduce Time for Data-Parallel Training on InfiniBand

Last updated: November 29, 2026

Quick Overview

For a 7B parameter model trained with pure data parallelism on 64 GPUs connected by 400 Gb/s InfiniBand per GPU, estimate the time of one gradient all-reduce with a ring algorithm and explain how you would reduce it.

Nebius
Machine Learning
Machine Learning Engineer
Nebius
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Medium

0

0

0 solved


For a 7B parameter model trained with pure data parallelism on 64 GPUs connected by 400 Gb/s InfiniBand per GPU, estimate the time of one gradient all-reduce with a ring algorithm and explain how you would reduce it.

Nebius sells H100 and Blackwell clusters with a dedicated InfiniBand fabric per GPU, and customers often ask solutions and ML engineers why scaling is not linear. The interviewer checks that you know the bandwidth cost of ring all-reduce, can do the arithmetic quickly, and know the levers (overlap, sharding, compression, hierarchy).

What the Interviewer Expects
  • States the ring all-reduce cost formula with bandwidth and latency terms
  • Converts units correctly from gigabits to gigabytes
  • Computes a reasonable order of magnitude
  • Explains overlap of communication with backward pass
  • Names hierarchical all-reduce, gradient bucketing, ZeRO or FSDP, and lower precision as levers
Key Topics to Cover
ring all-reduce
NCCL
InfiniBand
data parallelism
communication overlap
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How does tree all-reduce compare at small message sizes?
  • With FSDP, what collectives replace the all-reduce and how does the volume change?
  • What changes when 8 GPUs per node share NVLink and only cross-node traffic goes over InfiniBand?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Gradients in bf16: 7×109×27 \times 10^9 \times 2 bytes =14= 14 GB per step. 64 GPUs, each with its own 400 Gb/s NIC, so β≈50\beta \approx 50 GB/s per GPU in each direction. Assume per-hop latency $\alpha \app...

Approach

Ring all-reduce is a reduce-scatter followed by an all-gather. Each GPU sends and receives N−1NS\frac{N-1}{N} S bytes in each phase, so the total time is $T \approx 2(N-1)\alpha + 2\frac{N-1}{N}\frac{S}{...


Submit Your Answer
Markdown supported

Related Questions