← recruiter.ai Lab 01 · Distributed training

An original interactive lab

Gradient Ring

Eight machines. One brain. Watch a real neural network learn while its workers pass gradients around a ring, then find out exactly when adding more machines stops helping.

—max gradient error vs. a single machine
—weight divergence between replicas
—accuracy on all data

The model

The ring idle

When does adding machines stop paying off?

Computed live from the hardware model on the left. Drag the model size or bandwidth and watch the curves bend.

Speed-up vs. workers

Ring Param server Ideal

Where one step's time goes

Compute Communication (exposed)

What this is, and why it matters

What it does

Trains a small neural network the way large models are trained: the batch is split across workers, each computes a gradient on its slice, and the workers sum their gradients before everyone takes the same step. Every number on this page is computed live, in your browser, from real maths.

Why the ring

Sending every gradient to one server makes that server's link carry N copies. A ring has each worker talk only to a neighbour, so traffic per worker stays about twice the model size however many workers join. That is the idea behind NCCL and Horovod.

Why it's honest

Each step the lab recomputes the gradient on one machine and compares. The error stays near machine precision and the replicas never drift apart, so you can see that parallelism changes the speed, not the answer.

Why it's important

Frontier models cannot fit or finish on one device. Knowing where communication, stragglers and batch size eat your scaling is the difference between a cluster that is fast and one that is merely expensive.

How a step works

  1. ShardThe global batch is split across workers.
  2. ComputeEach worker back-propagates its slice into a gradient vector.
  3. Scatter-reduceChunks travel the ring, each hop adding into the next worker's copy.
  4. All-gatherThe finished chunks circulate until everyone has the full sum.
  5. UpdateEvery replica applies the identical momentum step.