MODULE 1 · LESSON 4 · 14 MIN
What Is a Large Language Model?
By Siten Sanghvi · Published · Updated
A large language model is a neural model trained to represent patterns in language. A common text-generating version repeatedly scores possible next tokens, chooses one, and continues from the enlarged context.
That loop explains much of what you see in a chatbot. It does not, on its own, explain the product's web search, saved history, access controls or tools. Those are parts of the application around the model.
Separate the model from the product
Suppose an assistant answers a question about your company's leave policy. Its response might combine learned parameters with a policy passage supplied for this request. The application may have retrieved that passage from an authorized source.
The model generates text; the application decides what evidence to supply and what actions are available. Reading a current document as input does not, by itself, update the model's learned parameters.
This distinction also prevents two opposite mistakes: assuming every assistant has live information, and assuming none can use it. Inspect the actual retrieval, tools and evidence rather than infer them from the word “chatbot.”
Parameters are learned numerical settings
Weights and other learned numerical values influence the model's calculations. They are not a tidy table of source-attributed facts. A model can reproduce a useful association without knowing when that association stopped being reliable.
“Large” has no universal hundreds-of-billions cutoff. As a concrete counterexample to that rule, the Llama 3 paper describes a model family with several parameter sizes, including 8B and 70B models. Parameter count alone does not tell you which model is best for a particular task.
Follow the autoregressive generation loop
For the common left-to-right, or autoregressive, text generator taught here:
- The application supplies a context represented as tokens.
- The model uses that available context and its parameters to produce next-token scores.
- A decoding method chooses a token, for example by a highest-score rule or sampling.
- The chosen token becomes part of the continuing context. Repeat until a stopping condition.
The Hugging Face generation-strategies guide describes why token selection is a separate decoding choice. Sampling is an option, not a universal requirement.
The exhibit is a two-step teaching fixture, not a running LLM. Its token candidates and percentages are handpicked. Different first choices lead to different predefined second-step examples; no weights are trained or model probabilities measured in this widget.
EXHIBIT 04 / MICROSCOPIC
Zoom into one predictionA reply grows one token at a time.
Inspect five possible continuations. Choose one, append it, then see how the next step uses the longer context.
CONTEXT + GENERATED CONTINUATION
The meeting starts at
0 of 2 generation steps. Select a candidate or use the highest-scoring one.
The tokens and probabilities are handpicked illustrations, not outputs from a live model. The first choice selects a predefined second-step distribution; no model computes it here. A high token probability is about continuation, not proof that a statement is true.
Read the prediction example
For “The meeting starts at”, this illustration assigns 45% to “nine” and 25% to “noon”, with the remaining mass on three other candidates. Choosing “nine” opens a predefined follow-up with 50% on “a.m.”; choosing “noon” opens a different follow-up with 55% on a period. These are teaching fixtures. A real model computes its own vocabulary scores from learned parameters and context.
Transformers are important, not the definition of language modeling
A transformer uses attention to mix information across allowed positions. In a causal decoder, a position cannot attend to later positions. The original Attention Is All You Need paper introduced the transformer in an encoder-decoder translation setting; today's language-model designs are not all identical to that original system.
Do not generalize “next-token prediction” into the only possible language-model objective. BERT is a concrete bidirectional representation model with masked-language pretraining. Nor is attention mandatory for every language-model architecture: Mamba studies an alternative selective state-space approach.
You do not need to learn those architectures yet. The point is to keep a useful explanation's scope clear: this chapter's generation loop describes common autoregressive text generation, not every language model ever built.
Training scale is not a guarantee of a capability
Pretraining develops broad learned behavior; subsequent training can adapt it. Training data, objectives, architecture, decoding and application design can all affect the result you observe.
Avoid a rule such as “at 100 billion parameters, reliable reasoning switches on.” Research on apparently sudden capabilities also examines how the choice of evaluation metric affects the appearance of emergence. For a product decision, test representative tasks rather than rely on a supposed universal threshold.
Fluent answers still need evidence
A generated answer can be wrong, unsupported or out of date. An application may add retrieval, tools, checks and saved information, but those capabilities must be designed and tested. No single technique makes all outputs trustworthy.
If the assistant quotes a leave policy, check that the retrieved passage is the authorized version and actually supports the answer. If it has no current evidence, it should not pretend that fluent wording settles the question. A model's historical training coverage is not proof it knows every event before a stated cutoff either.
Try it: trace a policy answer
Draw three boxes: supplied evidence, model generation, and verification. Put the current policy in the first; put a comparison of the answer against that policy in the third. Put persistent storage or an action tool outside the bare generation loop. Now you can explain what each part contributes and what could still fail.
The takeaway
For a common autoregressive generator, context and learned parameters produce next-token scores, a decoding choice selects a token, and the process repeats. Retrieval, persistent memory, permissions and verification are additional system responsibilities. Fluent is a property of the answer; verified is a property of the evidence.
Related lessons
- Tokens, Embeddings, and Context Windows Explained separates the units, representations and input limits in this loop.
- Training Data: What Models Learn From and Why It Matters examines what training examples can and cannot establish.
- Pre-Training, Fine-Tuning, and RLHF — The Three Phases introduces further training stages; check the actual model's recipe rather than assume every model follows one.
Up next
Tokens, Embeddings, and Context Windows Explained: use the right units to understand what the model receives, represents and has room to use.
VISUAL FIELDNOTES / 04
Keep the big picture.
A one-page visual companion. Save it, print it, or explain it to someone else.
View the full-size sheet ↗One token at a time.
The loop behind a common autoregressive response.
One US Letter page · Vector artwork · Fits A4 when printed to fit
Read the key points as text
- Context
- In this autoregressive example, available tokens and learned parameters shape the next-token scores.
- Generation
- A decoding rule chooses the next token. Append it to the context and run the loop until a stopping condition.
- Verification
- Likely text can still be wrong. Retrieval, tools, and external checks are separate system capabilities.
Remember: Fluent is a property of the answer. Verified is a property of the evidence.
Try it: For a policy answer, retrieve the approved policy, cite the relevant passage, and verify the claim against it before a user relies on it.
Recall: Where in your application does an answer get checked against reality?
OPTIONAL CHECK
Check your understanding.
The optional check requires JavaScript. You can continue reading the lesson.
Which process does this chapter’s common autoregressive text-generation example describe?
Is hundreds of billions of parameters a universal minimum for calling a model an LLM?
A retrieved current policy is added to the request. What does that alone change?
Must a decoder always sample a token randomly?
Which statement about language models is scoped correctly?
Why is Mamba relevant to this explanation?
The token demo shows a candidate with a high score. What can you infer about factual truth?
An assistant can answer with today’s policy. Where might that currency come from?
Which evidence is strongest for choosing a model for a real task?
What makes persistent memory different from the bare generation step?
Quiz complete
YOUR LEARNING
Keep your place.
Your progress is saved on this device.