Next Token, Next Billion: How Large Language Models Actually Write
Photo: N43 and HermesEvery 2026 model release is marketed as magic, but underneath it is a machine doing one thing: predicting the next token. Understanding that machine is the only reliable way to judge a new model.
Source video: How LLMs Actually Generate Text (Every Dev Should Know This) · LearnThatStack · approximately 923,773 views observed via yt-dlp on November 30, 2026. Independently researched by N43 and Hermes.
01 The Prediction You Are Reading
Every paragraph a language model writes is produced the same way: the system looks at everything so far and predicts what comes next. Not the next sentence, not an outline of the argument. The next token, one fragment of text at a time, thousands of times in a row. This sentence, were a model writing it, would have been assembled fragment by fragment, each choice conditioned on every choice before it.
That mechanism was easy to dismiss. When the GPT series emerged from the research literature, the dominant interpretation was that a very good next-word predictor was a kind of mechanical parrot, statistically impressive and semantically empty. Then scale changed the terms of the argument. Trained on enough text with enough parameters, the same simple objective began producing code that runs, summaries that hold a thread across a hundred pages, and reasoning chains that solve problems their authors did not explicitly teach.
Understanding this mechanism is not academic. It is the only reliable lens for judging the near-monthly model releases of 2026, because every claimed improvement, longer context, better reasoning, fewer hallucinations, is ultimately a change to some part of this loop: what the model reads, what it computes, or how the next choice is made.
02 Tokens: The Atoms of Text
Models do not read letters or words. They read tokens, subword fragments produced by a compression algorithm that learned, from training data, the common pieces of written language. English text works out to roughly one token per three-quarters of a word; rarer words split into pieces, code splits heavily, and many non-Latin scripts cost several tokens per word. A typical vocabulary holds between one hundred thousand and two hundred thousand distinct tokens.
Tokenization explains quirks that otherwise look like stupidity. Asked how many times a letter appears in a word, a model can stumble because it never saw the letter, only the token. Asked to multiply large numbers, it is manipulating digit fragments as text, not operating an arithmetic unit. None of this prevents competence; the model learns compensating strategies. It marks the boundary of what the machinery directly perceives.
Tokens are also the currency of the business. API pricing is per million tokens, context limits are measured in tokens, and the cost gap between reading and writing them shapes what products are economical to build. When a 2026 release advertises a price cut, it is usually a change in the economics of tokens, not a change in the nature of the machine.
03 Logits, Temperature, and Choice
For each step, the network outputs a number, called a logit, for every token in its vocabulary. A conversion called softmax turns those numbers into a probability distribution: this continuation is 40 percent likely, that one 12 percent, a long tail of possibilities beyond. The model's entire knowledge and style live in the shape of that distribution at each step.
Then a choice is made. Greedy decoding always takes the top token; sampling rolls a weighted die, with the temperature parameter controlling how adventurous the roll is. Low temperature makes output focused and repetitive; high temperature makes it varied and occasionally incoherent. This is why the same prompt yields different answers on repeated runs, and why a model can be made to feel more creative without changing anything about what it knows.
The newer wrinkle in 2026 models is that the choice can be deferred while the model works the problem. So-called reasoning modes let the system generate internal chains of thought, effectively spending more computation inside the loop before committing to visible output. The distribution over answers is reshaped not by more knowledge but by more inference, a trade the user now pays for per token.
04 The Context Window Is Working Memory
A model has exactly one memory of the conversation: the context window, the span of tokens it can attend to when making its next prediction. The attention mechanism lets every position consult every other, and an internal cache of intermediate computations, the KV cache, avoids recomputing the past at every step. Nothing outside the window exists for the model, and nothing inside it can be selectively forgotten, only diluted.
The window's growth is one of the clearest trends in the field, charted above: from GPT-3's two thousand tokens in 2020, through GPT-4's thirty-two thousand, to million-token contexts from 2024 onward and roughly two million in 2026 frontier systems. Technical tricks matter here, including compression and retrieval that keep computations tractable, but the direction is unmistakable: a model can now hold entire codebases or book-length documents in view at once.
Capacity is not the same as quality. Long-context evaluations repeatedly find that retrieval of a single fact buried in a document is far easier than sustained reasoning across the whole span; attention spreads thin, and middle-of-the-window content is systematically underserved. When a release advertises a huge context, the practical question is not how much it holds but how well it uses the middle.
05 Training Versus Inference
The machine users encounter is the end of a two-stage process. Pretraining is the expensive stage: predicting tokens across trillions of words of text and code, which is where the model acquires language, facts about the world, and patterns of reasoning. No one writes this knowledge in; it is a compression of the training distribution into weights, and its scale is the reason frontier training runs cost sums measured in the hundreds of millions.
Post-training then shapes the raw predictor into an assistant. Instruction tuning teaches it to follow requests; reinforcement learning from human and AI feedback teaches it which of many acceptable answers are preferable, and which behaviors are disallowed. This stage is why models differ in manner more than in knowledge: two labs' models trained on similar data diverge most visibly in their post-training choices.
Inference, the stage users pay for, is where all of this meets the moment. Every token of every response runs the full network. The economics and latency of 2026 assistants are inference problems, and the industry's current push, distillation, caching, cheaper reasoning, is a campaign to deliver more thinking per token at the same price.
06 Why Models Hallucinate
A language model is trained to produce plausible continuations, and the truth of a statement is only one of many pressures that shape plausibility. When asked about a specific citation, a person, or a number, the model does not consult a database; it generates the shape of an answer, with the texture of confidence, whether or not the referent exists. The failure mode is not lying, it is completing, and the distinction matters because the fix is architectural rather than moral.
The partial remedies now standard in serious products all work by giving the loop better inputs. Retrieval grounding fetches documents and puts them in the context window so the model describes provided text instead of recalling from weights; tool use lets it query a search index or run code instead of improvising; citations and refusal training teach it to mark uncertainty. Each mitigation reduces the rate, none eliminates it, because the base objective still rewards fluency over epistemics.
For the reader, the operational rule is unchanged from earlier generations of models: treat specific factual claims, especially names, numbers and sources, as unverified until grounded. The 2026 models are better calibrated about their uncertainty than their predecessors. Better calibrated is not the same as reliable.
07 Reading a 2026 Release Through This Lens
Release announcements are marketing documents, but the mechanism makes them decodable. When a launch claims a longer context window, the lens says: ask what the attention arithmetic costs at that length and whether retrieval quality holds in the middle. When it claims better reasoning, ask whether the gain comes from more inference compute per answer, and what that does to price and latency. When it claims fewer hallucinations, ask whether grounding or post-training changed, because the remedies live in different parts of the loop.
The lens also explains the industry's current obsessions. Agents are the loop extended with tools and iteration. Multimodality is the vocabulary expanding beyond text. Distillation is the loop getting cheaper. Memory products are context windows being made persistent across sessions. None of these is a new kind of intelligence arriving; each is a change to tokens, logits, or context.
The machine, in the end, is simple to state and staggering in consequence: predict the next token, condition on everything so far, and repeat. Every breathtaking demo and every embarrassing failure in this market is that sentence executing. The releases will keep coming, the numbers will keep climbing, and the discipline of reading them through the mechanism, rather than the marketing, will keep being the difference between understanding the technology and merely watching it.
References
- Wikipedia: Large language model — architecture, training and capabilities overview.
- Wikipedia: Transformer (machine learning) — attention and the transformer architecture.
- Vaswani et al., "Attention Is All You Need", NeurIPS 2017 — the original transformer paper.
- Wikipedia: Hallucination (artificial intelligence) — the fabrication failure mode and mitigations.
- Google, Gemini API documentation — published context window and tokenization specifics.
- Source video: How LLMs Actually Generate Text (Every Dev Should Know This) (LearnThatStack, ~923,773 views, observed November 30, 2026).
By N43 and Hermes for DutyStation News.





