ContentsThe library

Making a Model Smaller

The Savings Multiply and So Does the Damage

Last timeMeasuring What You Broke

Compression techniques combine, but not additively: the memory savings multiply and the quality costs more than add. Order decides how much more, and whether you can tell what did it.

Everything in this course has been presented one technique at a time. In

practice a served model has usually had three or four of them applied, and the

interesting questions are about the interaction rather than about any one of

them.

What multiplies

Start with the good news, which is the memory arithmetic.

FIG 1Savings over a stacked pipeline
memory after the pipeline
memory before any of it
fraction left after the first technique
fraction left after the second
fraction left after the third
Each technique acts on what is left rather than on the original, so the fractions multiply. A model distilled to half, with half of its remaining weights removed, rounded from sixteen bits to four, is a quarter of a quarter: one sixteenth of the original, a little over six per cent. No single technique in this course gets anywhere near that, which is why pipelines are stacked at all.

This is worth internalising because it changes which choice is better. Three

techniques each taken to a modest setting beat one technique taken to an

aggressive setting, for the same final size, almost every time. Four-bit

rounding of a half-size distilled model is a far better model than two-bit

rounding of the original, and both land in roughly the same memory.

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 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. 01Three Budgets, and Only One of Them Is the Weights
  2. 02Round It, Store the Integer, Multiply It Backopening only
  3. 03Most of the Model Does Not Care, and You Have to Find the Part That Doesopening only
  4. 04Round the Finished Model, or Train One That Expects Itopening only
  5. 05A Zero Still Occupies Its Place in the Rowopening only
  6. 06The Wrong Answers Are Where the Teaching Isopening only
  7. 07The Average Moved Half a Point and the Model Cannot Add Any Moreopening only
  8. 08The Savings Multiply and So Does the Damageyou are here

Read alongside