AI + text · large language models

The same machine — now with words

We just built a machine that guesses a salary. Point it at language and it does one thing: guess the next word.

First, a snag

But words aren’t numbers.

A photo’s easy — its pixels are already numbers. Words aren’t. So step one: chop the sentence into chunks — tokens — and swap each for a number.

the1169 cat3797 sat3332 on319 the262

“the cat sat on the …” → a row of numbers. Same chunk, same number, every time.

Then — the exact same machine

Numbers in
116937973332319262
your words, tokenised — the same input slot as the salary facts
››
The box
the same dials
››
Next word
a number out…
“mat”
Guess the next word, check it, nudge the dials to be less wrong — a billion times over.
Then tack the word on and guess again. That’s autocomplete — and that’s all ChatGPT is.

Now do it across everything

Read (almost) everything.

A whole life of reading ≈ 8 billion words.
The biggest models train on ≈ 8 trillion words a month.

“It’s just autocomplete…”

“…and the killer is —

To fill in that one word, it has to follow the whole story. Guessing the next word well is understanding.

One more step

From autocomplete to assistant

Raw, it just carries on the text — sci-fi, but worse. A second round of training turns it into something helpful.

base model → instruct model. Let’s see both, side by side.

Ch. 05 · LLMs