Generative AI · Long read

What Claude, Gemini and ChatGPT actually areTransformers explained, from words to vectors to the next word

Summary

Claude, Gemini, ChatGPT, Mistral: every large language model (LLM) is built on the same architecture, the transformer, introduced by a Google team in 2017. This article explains how it works, without formulas, using a toy model small enough to follow by hand.

Text is cut into tokens, and each token is turned into a vector, a short list of numbers looked up in a table. Attention then lets each token blend in what matters from the tokens before it, and classic neural networks inside every layer add what was learned in training. Stacked dozens of times and trained to predict the next token, this becomes an LLM. We follow one sentence through the machine, with numbers you can check, all the way to the predicted word.

We then look at training in depth: where the text comes from and how it is cleaned, how it is fed in, and how each of the model's billions of numbers learns which way to move. Along the way come the practical consequences: why models invent answers, why long documents cost more, and why their reliability is measured rather than proven.