What happens between your click and the reply?
Author: Mehdi Sadriu, independent educator. Last reviewed: 25 November 2026. How we check claims: methodology.
You type a message and press enter. The bytes go over the internet to computers that run the model. The text is split into tokens, each token becomes a vector, those vectors pass through many transformer layers, the model scores the next token, emits it, and repeats until it stops. Then the tokens are turned back into text on your screen. That is the pipeline. Product details (which chips, which safety filters) differ by vendor and are not claimed here.
In one paragraph. A chat reply is a remote next-token loop over a transformer, plus whatever extra filters the product adds. mej7.com does not document a specific vendor's extras.
Send → network → tokens → vectors → layers → logits → pick → detokenize → display. Click any Intermediate lesson to zoom one box.
What are the nine teaching steps?
- You send the message.
- It travels to a data centre.
- Tokenization.
- Each token becomes a vector (embedding + position).
- Vectors flow through layers (attention + MLP, residual adds).
- Logits for the next token.
- Pick a token, append, repeat.
- IDs become text.
- The reply streams back.
What is a context window here?
Only a limited number of tokens fit in one forward pass. Very long chats must be trimmed, summarized, or retrieved — product-specific. We do not invent a number for ChatGPT's window on this page.
Where do you go deeper?
Intermediate lessons on this site match those steps one-for-one (tokens, embeddings, attention, softmax, generation). Advanced adds KV cache and related systems topics.
What is the math?
One forward pass: tokens → embed → N × (attn + MLP) → unembed → softmax. Autoregression calls that pass T times for T new tokens (or uses a KV cache so past keys/values are reused — Advanced track).
Worked example
Message: 'explain the moon landing'. After tokenization and layers, the first emitted token might be 'The' or 'NASA' depending on the model and decoding. Each later token conditions on everything already written, which is why long answers stream.
Check your understanding
Five questions. Answers are in the disclosure under each item, so this page still works if JavaScript is off.
Further reading
- Attention Is All You Need — Vaswani et al. (2017). NeurIPS.
- A Neural Probabilistic Language Model — Bengio et al. (2003). Journal of Machine Learning Research.