Act I
Substrate
How a model comes to exist. Data goes in at one end; a file of numbers comes out the other. Nothing in this act can think, and nothing in it is running.
01 Act I · Substrate
The corpus
Text, gathered at a scale no person could read
A new model has no experience of anything. Everything it will ever be able to do has to arrive as text, before it exists.
Training data is an enormous collection of text: web pages, books, code, transcripts. It is collected, then filtered and deduplicated hard. It is not stored inside the finished model, and the model cannot look anything up in it afterwards. The data’s only job is to be predicted, over and over, while the model’s numbers are adjusted. What remains is a statistical residue of which words follow which, in what structures, under what conditions. What gets thrown away shapes the result as much as what is kept.
Interaction planned Toggle a filter. Watch what survives, and what it cost.
Not this. The model does not contain the data and cannot retrieve a document from it. Nothing is stored; something is absorbed.
- ~1.5
- tokens per English word
- 20–50%
- of raw web crawl removed as duplicates
Advanced
Composition matters as much as scale. Code in the mix improves reasoning on tasks that are not code, and a small fraction of carefully curated text can outweigh a large fraction of crawl. The filtering stack usually runs language identification, then deduplication (exact first, then near-duplicate), then quality classification, then safety filtering, then decontamination against known benchmarks. Ordering effects are real but poorly understood. Two consequences travel with the model for the rest of its life. There is a knowledge cutoff: nothing after the collection date exists to it. And there is inherited distribution: whose writing is over-represented in the corpus becomes whose assumptions are over-represented in the output. Neither can be fixed afterwards by prompting. Licensing and consent are unresolved and actively litigated. That is an open question rather than a settled practice, and this site does not pretend otherwise.
Where the field disagrees. Whether data quality or sheer quantity dominates at frontier scale is contested, and the labs that know publish little.
02 Act I · Substrate
Tokens
Text cut into pieces a machine can count
Computers do arithmetic. They cannot do arithmetic on letters. Something has to turn text into numbers before anything else can happen.
A tokenizer cuts text into tokens, which are chunks of characters that appeared often in the training data, and gives each one an ID. Common words become a single token. Rare words split into several pieces. The vocabulary is fixed when the model is built and never changes. From here on the model never sees your text. It sees a list of integers. Everything measured about these systems, including cost, context limits and speed, is counted in tokens rather than words.
Token list. Use left and right arrow keys to move between tokens. Escape to leave.
Type anything. Underneath is the same text as the model receives it: not letters, and not words, but chunks that were common enough in the training data to be worth storing whole.
Loading the vocabulary…
Loading the vocabulary…
Not this. Tokens are not words and not syllables. They are whatever chunks were statistically efficient to store.
- ~1.5
- tokens per English word
- ~4
- characters per token in English
- 100k
- entries in this tokenizer's vocabulary
Advanced
The standard method is byte-pair encoding. Start from individual bytes, repeatedly merge the most frequent adjacent pair, and stop at the target vocabulary size. The merges are learned from the training data, so the vocabulary reflects what that data contained. A few consequences show up constantly. Leading spaces are usually part of the token, so " the" and "the" have different IDs, which is why a stray space in a prompt can change the output. Numbers fragment unpredictably, and the model never sees the digits as a quantity, which contributes to arithmetic errors. Languages that were under-represented in training cost two to three times more tokens per word, so they are literally more expensive to use and they fill the context window faster. Character-level tasks like counting letters or reversing a string are hard for the same reason: the model never sees characters at all. Tokenization is also a reliability surface. Unusual byte sequences produce tokens the model saw almost never during training, and behaviour on those is poorly characterised.
Trade-offs
- A larger vocabulary means fewer tokens per document, but a larger embedding table and more parameters spent on rare entries.
- Byte-level fallback guarantees any input can be encoded, at the cost of very long sequences for unusual text.
03 Act I · Substrate
Embeddings
Meaning stored as position in space
An ID is arbitrary. Token 4021 is not "more" than token 4020. The model needs a representation where similarity actually means something.
Each token ID is swapped for a list of numbers, a vector, which acts as a coordinate in a space of thousands of dimensions. Those positions are learned during training, so tokens used in similar ways end up near one another. Direction carries meaning too: the offset separating one related pair often separates another. All of the model’s later arithmetic happens in this space. What the model has instead of definitions is geometry: nearness, direction and distance.
Interaction planned Two dimensions standing in for several thousand.
Not this. Positions are not assigned from a dictionary. They are learned from usage and contain no definitions.
- 1k–10k
- dimensions per vector
- ~400M
- numbers to store a 100k vocabulary at 4,096 dimensions
Advanced
The initial embedding is context-free. One vector per token ID, identical every time. Context is added by the layers above, so by the final layer the representation of "bank" in a river sentence differs from "bank" in a finance sentence. That distinction between static input embeddings and contextual hidden states causes most of the confusion when people talk about "the embedding" of a word. Similarity is measured by cosine, the angle between two vectors, rather than by straight-line distance. Magnitude tends to encode frequency rather than meaning, so ignoring it is deliberate. The famous analogy arithmetic works partially and unevenly. It is a real property of the space and it gets oversold: the nearest result is often the input word itself, which is why demonstrations quietly exclude it. The same idea scales up from tokens to whole passages, which is what makes retrieval possible later on.
04 Act I · Substrate
Parameters
The adjustable numbers, and the shape they sit in
Coordinates alone produce no answer. Something has to transform them, repeatedly, and that something needs knobs that can be turned.
A model is a stack of layers. Each layer multiplies its input by large grids of numbers, adds, and reshapes the result. Those numbers are the parameters. They begin random and mean nothing at all. Training changes them, and only them. Everything the finished model appears to know, whether grammar or facts or style or code, exists as values in these grids. More parameters gives more capacity to hold patterns, and more arithmetic for every token it ever produces.
Interaction planned Change the size. The file and the price per token follow.
Not this. Parameters are not facts, rules or memories. No individual number holds any one thing.
- 10⁹–10¹²
- parameters in a modern model
- ~140 GB
- to store 70 billion parameters at 2 bytes each
Advanced
Each transformer layer has two parts. Attention mixes information between positions, and a feed-forward network transforms each position independently. Most of the parameters sit in the feed-forward blocks: about two thirds in the older designs, and closer to four fifths once grouped-query attention shrank the attention side. That is where most factual association appears to live, distributed across many parameters rather than localised in any one. Precision is a real lever. The same model at 16, 8 or 4 bits per parameter differs in size and speed by multiples, with quality loss that stays small until it suddenly does not. Mixture-of-experts architectures hold many parameters but activate only a fraction for each token. That decouples storage cost from compute cost, and it makes parameter counts a poor basis for comparing two models.
Where the field disagrees. Why capability improves so predictably with scale is described empirically and explained poorly.
05 Act I · Substrate
Training
Guess, measure the error, nudge every number
The parameters begin as random noise. Nobody writes them by hand, because there are too many and no one knows what they should be. They have to be found.
Show the model some text with the next piece hidden. It guesses. Compare the guess with what actually came next, and the size of that gap is the loss. Then work backwards through every layer to calculate how much each parameter contributed to the error, and nudge each one slightly in the direction that would have reduced it. Repeat, trillions of times. Nobody specifies what should be learned. Whatever reduces that single number is what gets learned.
Interaction planned Real gradient descent. Turn the rate up and break it.
Not this. No facts or rules are programmed in. The only instruction ever given is "predict the next token".
- 1
- number being minimized
- 0
- human-written rules
Advanced
Backpropagation computes the gradient of the loss with respect to every parameter. An optimizer then applies it, scaled by a learning rate, with momentum and adaptive per-parameter scaling. Training runs in batches, and the learning rate follows a schedule that warms up and then decays. Loss falls fast, then logarithmically. The last increments are enormously expensive, which is most of why frontier training runs cost what they do. Capabilities do not appear smoothly. Some tasks sit at chance for a long time and then improve sharply, which makes progress genuinely hard to predict from a loss curve. People watch loss curves obsessively anyway, because a diverging run can waste weeks of compute before anyone notices. The whole process is one optimization problem. It is very large and very expensive, and conceptually it is simple.
06 Act I · Substrate
Scale
More of everything, and what that actually buys
Nothing about predicting the next word explains why one model can write code, summarise a contract and argue with you. That generality is the surprising part, and it is not in the mechanism.
It came from size. More text, more parameters, more compute, and the same single objective throughout. Loss falls smoothly and predictably as you add all three, which is what makes the enormous runs worth financing. Capability does not. Some tasks sit at chance for a long time and then work, at no threshold anyone can name in advance. Generality was not designed: it is what predicting text well enough turned out to require.
Interaction planned Train the small model on more text. Watch what improves, and what does not.
Not this. Scale is not understanding, and a smooth loss curve is not a roadmap. The thing that improves predictably is not the thing anyone cares about.
- 1
- objective, unchanged throughout
- 3
- things that get turned up: data, parameters, compute
- 0
- reliable ways to predict a capability before the run
Advanced
Scaling laws relate loss to data, parameters and compute as a power law over many orders of magnitude, and they hold well enough to plan a training run against. The compute-optimal ratio between data and parameters has been revised more than once, which is worth remembering when a current figure is quoted as settled. Emergence is contested rather than mysterious. Part of the sharpness is real and part is an artifact of grading: a task scored pass-or-fail jumps when partial competence crosses the threshold, while the underlying improvement was smooth all along. How much of it is measurement is an open question. The practical consequence is uncomfortable for everyone involved. You can predict what a run will cost and roughly how well it will predict text. You cannot predict what it will be able to do, which means capability is discovered after the money is spent.
Where the field disagrees. Whether emergent capability is a real discontinuity or an artifact of how it is measured is genuinely unsettled.
07 Act I · Substrate
The weights
A file of numbers, and nothing else
People say "the model" as though naming an entity. It is worth knowing exactly what the noun points at, because almost every misconception downstream starts here.
When training stops, the parameters are frozen and written to disk. That file, a very large array of numbers, is the model. It has no memory, no state, no clock, and it does nothing on its own. Copy it and you have two identical models. It does not change when you talk to it, and it does not change when it is wrong. Anything that resembles learning during a conversation is happening in the text around the model, never in the file.
Interaction planned What changes when you talk to it: the text, never the file.
Not this. The model does not learn from your conversations. The file is read-only from the moment it ships.
- 1
- file
- 0
- bytes changed by any conversation, ever
Advanced
What ships is a set of tensors, a config describing the architecture, and a tokenizer vocabulary. There is no database, no index and no runtime state. Serving it means loading it into memory and running arithmetic against it. The same file behind an API and on a laptop produces the same distribution given the same input and settings, which is what makes the API a convenience rather than a different machine. Fine-tuning creates a new file, or a small companion file of adjustments called an adapter. It does not edit the original. This is why "the model remembers me" is always wrong, and always describes something else happening outside the file: a transcript being resent, a note being stored, a document being retrieved. Every one of those is a program somebody wrote, and every one of them shows up in the stages that follow.
08 Act I · Substrate
Post-training
Why it answers you instead of continuing your sentence
A model trained only to continue text does exactly that. Ask a raw one a question and it may cheerfully write five more questions.
After pretraining, the model is trained further on examples of the behaviour we want: a request, then a good response. Responses are then ranked against each other, either by people or by another model trained on people’s rankings, and the parameters are adjusted to make preferred responses more likely. This adds almost no knowledge. It changes which of the model’s existing behaviours come to the surface, so it answers rather than continues, declines rather than complies, structures rather than rambles.
Interaction planned Same prompt. One continues it; one answers it.
Not this. Post-training does not teach new facts. It reshapes which behaviours the model reaches for first.
- 10¹²
- tokens in pretraining
- 10⁵–10⁶
- examples in post-training
Advanced
There are two stages. Supervised fine-tuning teaches the response format and the assistant role. Preference optimization then adjusts the model toward outputs humans rated higher, historically through a learned reward model and reinforcement learning, and increasingly through direct methods that skip the separate reward model. A third stage trains against verifiable outcomes: did the code run, is the proof valid. That is what produces long deliberate reasoning traces. Post-training is where the personality, the refusal behaviour and the formatting habits come from. It accounts for most of the visible difference between two models built on similar pretraining. It is also fragile. Heavy alignment training can measurably reduce capability on some tasks, and that trade-off is not solved.