A Thousand Waits That Did Not Have to Happen
Last timeLetting Things Through Unchanged
A recurrence insists on walking a known sequence in order, which wastes almost all available hardware. Removing the nonlinearity from inside the loop makes the same computation reorderable.
Gates fixed the reach. They did nothing about the other problem, and by the time
sequence models became something people trained on very large amounts of data,
the other problem was the one that mattered.
Where the time goes
During training the entire sequence is known in advance. Every input is sitting
in memory. There is no reason in principle to process position four hundred
after position three hundred and ninety nine rather than at the same time, and
the hardware would very much prefer to do them together.
A second cost hides inside the first. Each ordered stage has a fixed overhead
that has nothing to do with the arithmetic: launching the work, reading the
previous state out of memory, writing the new one back. When the arithmetic in a
stage is tiny, as it is for one position of one sequence, that overhead is most
of the stage. So the ordered walk is not merely underusing the machine, it is
paying a setup charge thousands of times for work that would have fitted in one
setup. This is why the measured gap is often far larger than a count of
arithmetic operations predicts.
The lesson stops here
6 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 contentsThis 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