ContentsThe library

Training Across Many Machines

Three Hundred Devices Waiting on One

Last timeChoosing Which Split to Use

Poor scaling has three usual causes and they leave different marks on a timeline. Read the marks and you know which one it is without changing anything.

The arithmetic says this layout should run at eighty per cent of the throughput

of a single device multiplied by a thousand. It is running at forty. Nothing is

broken, no error has appeared, and the loss is going down.

Measuring the scaling

Before looking for a cause, make the symptom a number.

FIG 1Scaling efficiency
scaling efficiency, where one is perfect
throughput of the whole run, in examples per second
throughput of a single device running alone
number of devices
Both throughputs are measured, not predicted, and the single-device number has to come from the same code with the splitting switched off. A run at 0.4 is spending sixty per cent of every device on something other than computing, and the question is which something.
FIG 2Throughput against device count, with the three shapes
0.0020.0040.0060.0080.001.016.832.548.364.0devices
perfect scalinga link that is too slowan unbalanced split
The shapes differ and that is diagnostic on its own. A slow link bends away and eventually flattens, because the exchange cost grows with the device count. An unbalanced split is a fixed tax: a straight line with the wrong slope, which looks the same at eight devices as at sixty-four. A straggler, not drawn here, looks like the unbalanced split on this graph and is told apart on the timeline instead.

The three shapes

The three causes are a slow link, an unbalanced split, and one slow device. On

a timeline recorded per device, each one looks different.

The lesson stops here

3 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01The Weights Are the Smallest Thing You Have to Store
  2. 02Every Machine Does the Whole Thing, and Then They Agreeopening only
  3. 03Nobody Is in Charge and That Is Why It Scalesopening only
  4. 04Half a Layer Each, and a Phone Call in the Middle of Every Oneopening only
  5. 05Four Machines, and Three of Them Are Waitingopening only
  6. 06Sixteen Copies of the Same Numbers, in Sixteen Placesopening only
  7. 07You Do Not Choose One, You Multiply Fouropening only
  8. 08Three Hundred Devices Waiting on Oneyou are here

Read alongside