# How LLMs Work, Explained Without the Maths | QQuantum.ai

> How LLMs work, without the mathematics: tokens, next-token prediction, attention, sampling and frozen weights, and the common failure each one explains.

Source: https://qquantum.ai/resources/how-llms-work

[Home](https://qquantum.ai) [resources](https://qquantum.ai/resources) how-llms-work

Resource

# How LLMs actually work. Enough to debug them.

How LLMs work, in one paragraph: a large language model splits text into tokens and predicts the next token, over and over, weighing earlier text by relevance and sampling from the probabilities it produces. Its weights are frozen once training ends. You do not need the mathematics, but you do need this picture, because almost every surprising behaviour becomes predictable once you have it.

All Resources →

Introduction transcript. Qubi: Text goes in as tokens: fragments, not quite words and not letters. For each next token, the model weighs everything so far and scores every option. Sampling picks one, with a little randomness, and it is woven onto the end. Then again, and again; the weights were set in training, and stay frozen.

## The mechanism

- Text becomes tokens. Not words and not characters — fragments, chosen by a compression scheme fitted to a training corpus. Common words are single tokens; unusual ones split into several. This is why models are bad at counting letters in a word: they never see the letters, only the fragments.
- The model predicts the next token. That is the entire mechanism. Given everything so far, it produces a probability distribution over what comes next. Everything a model appears to do — reasoning, summarising, coding, refusing — is that operation repeated, with the output appended and the process run again.
- Attention decides what matters. When predicting the next token, the model weighs every previous token by relevance. This is what lets it connect a pronoun to a noun forty sentences back, and it is also why cost scales the way it does with context length.
- Sampling introduces variation. The model gives a distribution; something has to pick. Picking the highest-probability token every time gives repetitive text, so a sampling strategy adds controlled randomness. That is why the same prompt gives different answers, and why lowering temperature makes output more predictable rather than more correct.
- Training happened once, before you. Pre-training on a large corpus, then fine-tuning toward helpfulness and safety. The weights are frozen when you use it. It has no memory between conversations, no ability to learn from you, and no access to anything after its training cut-off unless you put it in the context.

## Why this explains the failures

01

### Why it invents things

It produces the most plausible continuation, and a plausible continuation of “the case citation is” is a well-formed citation. It has no mechanism for distinguishing recalled from constructed. Retrieval fixes this by putting the real answer in the context; nothing about the model itself does.

02

### Why it cannot count characters

It sees tokens, not letters. Asking how many times a letter appears in a word is asking about information the model never received. This is not a capability gap that scale fixes.

03

### Why prompt wording matters so much

The prompt is the entire conditioning. Changing phrasing moves the distribution over continuations, sometimes substantially. This is why prompts need testing rather than reasoning about, and why a change that seems cosmetic can move quality.

04

### Why it forgets

There is no memory. Every conversation is the whole history re-sent as context. When it exceeds the window, something is dropped — and unless your system is deliberate about what, it will be dropped arbitrarily.

Questions

## Questions about How LLMs Actually Work.

### Does it understand what it is saying?

A question about meaning that we are not equipped to settle. What is answerable is the engineering version: it produces outputs consistent with understanding across a wide range of tasks, and it fails in ways a person who understood would not. Design for the second observation and you will build systems that hold up.

### Does it learn from our conversations?

Not within a conversation and not between them — the weights are frozen. Some providers may use submitted data for future training depending on your agreement, which is a contractual question rather than a mechanical one, and one worth checking rather than assuming.

### Why does the same prompt give different answers?

Sampling. The model gives probabilities and something picks from them, with deliberate randomness. You can reduce it with temperature settings, and reducing it makes output more consistent rather than more accurate — a distinction worth keeping straight.

Keep reading

- [Resource Tokens & Context Windows](https://qquantum.ai/resources/tokens-and-context-windows)
- [Resource What Are AI Agents?](https://qquantum.ai/resources/what-are-ai-agents)
- [Resource AI Glossary](https://qquantum.ai/resources/glossary)
