ContentsThe library

Models That Carry a Memory

The Bill That Grows and the Bill That Does Not

Last timeDeciding What to Keep

A look-back model stores something for every token it has seen, so serving cost climbs with the conversation. A carried state is one fixed block, and that difference decides what can be deployed.

Everything up to here has been about whether a fixed state can be made good

enough. This lesson is about why anyone wanted it to be, and the answer is

visible on an invoice.

What a conversation costs to keep

A look-back model does not recompute its history. It stores two vectors for

every token it has processed, in every layer, so that each new token can consult

them. That store is the reason generation is fast, and it is also a quantity

that grows without limit as a conversation continues.

FIG 1Memory held per conversation, in megabytes
1 thousand tokens8 thousand64 thousand512 thousand
a growing store, one ent0.54.032.0256.0
a carried state of fixed8.08.08.08.0
The bottom row is flat by construction. The top row doubles whenever the conversation doubles, and the marked cell is where it ends up at half a million tokens: thirty two times what the fixed state costs, for one conversation.
FIG 2The two bills as the context grows
0.005.0010.0015.0020.001000.08750.016500.024250.032000.0tokens in the conversation
one stored entry per tokenone fixed block
A straight line against a horizontal one. The crossing point is not interesting; what is interesting is that one of them has a slope and the other does not, because that is what decides the shape of the cost as products move to longer contexts.

There is a second growth hiding behind the first. Each new token has to consult

every stored entry, so the arithmetic for one token also grows with the length

of the conversation. In practice reading the store out of memory, rather than

the arithmetic itself, is the slow part, so the per-token time climbs roughly in

step with how much has been said. A reply at the end of a long session is

genuinely slower to produce than the same reply at the start, and users notice

it before operators do.

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. 01Everything You Remember Has to Fit in the Same Box
  2. 02The Same Small Rule, Run a Thousand Timesopening only
  3. 03Almost Right, Four Hundred Times in a Rowopening only
  4. 04Add Instead of Multiply, and Decide How Muchopening only
  5. 05A Thousand Waits That Did Not Have to Happenopening only
  6. 06Slots That Forget at Rates You Choseopening only
  7. 07A Rule That Reads What Arrived Before Decidingopening only
  8. 08The Bill That Grows and the Bill That Does Notyou are here

Read alongside