Training: The Enormous Prediction Game
Those adjustable settings do not begin with a rich grasp of language. Training is the long process of tuning them using examples of text. In the path from prompt to answer, this is what training builds: learned patterns encoded across the model’s parameters, not a separate filing cabinet of facts.
Imagine showing the model a sentence with the ending hidden:
The tired hiker filled her bottle from the mountain ___
The model produces a prediction for what comes next. Perhaps spring ranks highly; perhaps stream does too. If the example supplies stream, the system can compare its prediction with that target. The difference provides a signal for adjusting the settings so that, in similar circumstances, stream becomes more likely.
That is the basic feedback loop: make a prediction, compare it with the example, adjust the settings, try again. A mathematical procedure calculates how the settings contributed to the miss and nudges them in directions that would make the target more likely. The details are intricate; the central idea is that examples guide the model’s adjustments.
But there is an important missing step between a model that can continue text and the assistant you chat with. Pretraining teaches it to predict patterns across large amounts of material. Later post-training can teach it to respond more usefully to instructions: examples show what a helpful answer looks like, and feedback or rewards can encourage some responses over others. A model that has learned how a thousand question-and-answer exchanges are written is not automatically equally good at obeying your question, admitting uncertainty, or refusing a harmful request. Those behaviors may need additional training. Different developers use different recipes, so there is no single universal finishing school for LLMs.
Think of pretraining as learning a language and absorbing an enormous range of written examples; post-training is more like practicing the particular job of being an assistant. Neither stage installs a little person. Both adjust numerical settings. And neither guarantees that a confident answer is true.
Depending on the training method, the task may involve predicting the next token or filling in missing text. In either case, the model uses surrounding clues to produce a fitting continuation or completion. It repeats the task across vast collections of text, refining its settings through many examples and updates. One example barely moves the needle; the effect comes from accumulation.
A sentence about a hiker is not just a lesson about the word stream. Across countless passages, training encourages patterns of grammar: what kinds of words tend to follow the, how verbs change with their subjects, and how a sentence can continue after although. It also captures regularities of meaning. A bottle can be filled; a mountain has streams and springs; a hiker is likely to need water. Such relationships help narrow down plausible continuations.
Other examples contain different regularities. A recipe has a recognizable shape. A formal letter sounds different from a joke. In a passage about planets, certain facts and terms tend to appear together. A question followed by an explanation demonstrates a pattern of response. The training objective remains a simplified account of prediction, but doing well across varied material makes the model sensitive to grammar, subject matter, style, and relationships among ideas. Modern systems can also involve different training methods and stages; this example describes a broad principle, not every detail of every system.
This does not mean the model stores every training sentence like a row in a filing cabinet. Some information may be reproduced closely, but much of what training builds is better pictured as a changed landscape of tendencies. Repeated examples make some continuations easier to reach than others. Patterns can apply beyond the exact passages encountered—a familiar structure can help the model work with a new sentence, just as knowing how recipes are organized helps you follow one you have never seen.
That analogy has limits: the model’s learned patterns are encoded in numerical settings, not held as human understanding or a neat collection of rules. Training shapes the machinery; it does not guarantee that every answer will be correct.
What matters here is how repeated examples shape the settings that will later process a prompt. Training builds; inference applies. The next section looks at how information is transformed as it moves through the model.
Layers Transform the Clues
Those learned settings do not sit in a shelf of separate facts. During a reply, information passes through a stack of operations called layers. Each layer takes the model’s current numerical picture of the prompt and transforms it, producing a new picture for the next layer to work with. The prompt supplies the current clues; what the model can use is limited by the information available in its context and by its computation.
Imagine the prompt: “The key was small enough to fit in the child’s pocket.” At first, the model has numerical representations for pieces of text—the tokens—and their positions. These starting representations carry learned associations, but they do not yet tell the whole story. As the prompt moves through the layers, information from “fit,” “pocket,” and “child’s” can contribute to the contextual representation of “key,” making a small physical key a more fitting interpretation than, say, a musical key.
A layer is a little like another pass over a marked-up page. On one pass, a reader might notice which words belong together. On another, they might recognize that a pronoun points back to a person mentioned earlier. In a transformer, the transformations are numerical, not conscious acts of reading. Still, the analogy captures the important point: later processing can use relationships established earlier and build a richer representation from them.
A transformer is a kind of language model organized around these repeated transformations. Within each layer, mechanisms such as attention help different parts of the prompt exchange relevant information. Other operations further reshape the numerical representations. We do not need the wiring diagram to see the effect: a token’s representation can come to reflect not just that token, but its role in this particular context.
The process is not a series of tidy human-readable thoughts, each layer announcing, “This must mean a physical key.” A layer produces numerical values that influence the next layer; the information is distributed across many values and settings. Any single layer may contribute to several kinds of pattern, and the same token can carry different contextual information in different prompts.
A useful image is a photograph sharpened through several editing passes. One pass may bring out edges; another may make a face easier to distinguish from the background. No pass creates the scene from nothing. Each changes which features are prominent, so later passes can work with a more useful image. Likewise, layers can progressively transform token representations into patterns that help the model predict what should come next. The comparison is only an image: a transformer does not literally edit pictures or follow a fixed sequence of human-interpretable refinements.
This is how a prediction can draw on substantial processing. To continue a sentence well, the model may need to distinguish meanings, connect distant clues, track the subject, and notice the style or purpose of the prompt. Its layers provide repeated opportunities to combine and transform those clues. The result is not a list of rules attached to each word, but a context-sensitive numerical state that can guide the next prediction.
Training shaped the settings that make these transformations useful. When the model is answering, those settings are applied to the new prompt; they are not ordinarily being rewritten with every reply. The prompt’s clues are processed through learned patterns, rather than matched against a neat shelf of stored facts. That difference marks the boundary between learning the machinery and using it—and brings us to inference.
Inference: Using What Training Built
Training shaped the model’s settings; inference is what happens when those settings are put to work. A person types a prompt, the model processes it through its learned layers, and it produces a response. The word inference can sound like a special kind of human deduction, but here it names the model’s answering phase: using a trained model to calculate what should come next. Put simply: training builds; inference applies.
Imagine the prompt: “Why does ice float?” During training, the model encountered enormous numbers of text examples and repeatedly adjusted its parameters—the network’s learned settings—to improve its predictions. Those adjustments gradually captured patterns in language and information, including patterns that can help connect ice, water, density, and explanations. Training is the long process of changing the settings. Inference uses them.
When the ice question arrives, the model turns it into numerical representations and passes those through its layers. The learned parameters guide how the clues are combined and what continuations are likely. The prompt supplies the current clues, but it does not automatically provide information that is absent or resolve every ambiguity. The model may produce an explanation about ice being less dense than liquid water. But while it answers, its parameters are not ordinarily being adjusted to learn a permanent new fact from the exchange. The machinery is being run, not rebuilt.
A useful comparison is a pianist and a piano. Practice changes the pianist’s skill; playing a piece draws on that skill without rebuilding the piano after every note. The comparison has limits: a model is not a person practicing, and inference involves calculations rather than conscious performance. Still, it helps separate two processes that are easy to confuse. Training changes the model. Inference runs it.
The prompt does affect what happens during inference. It supplies the current context, and the model forms temporary numerical states as information moves through its layers. These working states are not the same as the learned parameters. Think of parameters as the instrument’s lasting adjustments, and the temporary states as the notes currently sounding: shaped by the prompt, used to produce the answer, and not usually saved as a lasting change to the instrument.
That distinction explains why a model can respond differently to two prompts without having learned something new between them. “Explain ice floating to a child” and “Explain ice floating to a chemistry student” activate different patterns of context. The underlying learned settings can be the same while the answer changes to fit the request.
In ordinary use, inference can happen quickly, but it may involve many calculations. The model repeatedly applies its learned settings to the prompt and to the text it has already produced. Training built the predictive machinery; inference puts it to work on this particular conversation. The next question is how those calculations become a particular answer rather than one of many plausible possibilities.