Inference 101, lesson 1
What happens when you press send
Every answer an AI gives is a small job run on a chip somewhere. This lesson follows one request from your words to the reply on your screen, and shows why the first word waits and the rest stream.
Every example below changes to fit what you pick. The businesses are made up for teaching.
The picture, one step at a time
Each box is one stage. The picture lights up as you scroll.
One request, from your words to the answer on your screen
1Into tokens
Your words are cut into tokens: short pieces of text, each one turned into a number.
2To the chip
The numbers travel to a data centre, to a GPU: a chip built to do huge numbers of small sums at once.
3Reading your prompt
The model reads every token of your prompt at once. People call this prefill.
4Writing the answer
It writes one token, then the next. Each one means reading the whole model from memory again. This is decode.
5Back to you
Each new token is turned back into words and sent to your screen as soon as it is written.
Your message, cut into tokens.
Step 1 of 6
Your words become tokens
The model does not read letters or whole words. Your message is first cut into tokens: short pieces of text, often a word or part of one. Each token becomes a number. Tokens are also what you are billed by.
As a rough guide, Anthropic's price page puts an average 10 kB web page at about 2,500 tokens (read 28 November 2026). Different models cut the same text into different numbers of tokens.
Step 2 of 6
Off to the chip
Those numbers travel to a data centre and wait their turn on a GPU, a chip built to do huge numbers of small sums at once. The model sits in the GPU's memory: billions of numbers it learned in training.
Step 3 of 6
It reads your whole prompt at once
Every token of your prompt is already known, so the chip can work on all of them side by side. People call this prefill. It uses the chip well and is quick, but a longer prompt still means a longer wait before the first word of the answer.
The vLLM paper (Kwon and others, 2023) describes this phase: because all the prompt tokens are known, the work can be done in parallel and makes good use of the GPU.
Step 4 of 6
It writes the answer one token at a time
Now it writes. It cannot write the tenth token before the ninth, because each one depends on the ones before it. And for every new token the chip reads the whole model out of memory again. This is decode, and it is where most of the time goes.
The same paper finds this phase leaves most of the GPU's sums idle. The limit is how fast the chip can read its memory, not how fast it can do maths.
Why can't the model write the whole answer at once?
Step 5 of 6
The answer streams back
Each new token is turned back into words and sent to your screen straight away. That is why replies seem to type themselves out. You can start reading after the first few words, long before the last one is written.
Step 6 of 6
What this means for you
When you use AI for answering customers, the wait has two parts. The wait for the first word comes mostly from reading your prompt. The wait for the last word comes from writing, one token at a time. A shorter prompt starts sooner. A shorter answer finishes sooner.
Your replies for answering customers start fast but take ages to finish. What helps most?
Which part of the trip is that?
Here are four things you might notice when you use AI in your business. Sort each one into the part of the trip that explains it.
1Your bill counts the product name "Harris Tweed" as more than one token.
2You paste the whole 40-page returns policy into the chat, and the first word of the reply takes longer to appear.
3A long reply listing every delivery option keeps typing for a while after it starts.
4The reply appears on screen a few words at a time, not all at once.
0 of 4 right so far, 4 to go.
One request, step by step
This is what you keep: the trip on one card, and the rule for a reply that feels slow.
One request, step by step
- Your words are cut into tokens: short pieces of text. You are billed by the token.
- The request goes to a GPU in a data centre, where the model sits in memory.
- Reading your prompt (prefill) happens all at once. A long prompt means a longer wait for the first word.
- Writing the answer (decode) happens one token at a time, and each token means reading the whole model from memory.
- The answer streams back as it is written, so you read while it writes.
A long prompt slows the first word. A long answer slows the last. Cut whichever you do not need.
Next: Lesson 2: where the cost goes. Who pays for the chip, why memory sets the speed, and why big providers can sell tokens cheaply.