Free interactive explainer

What Is an LLM?

Large language models, one prediction at a time.

A large language model (LLM) is an AI model trained on large amounts of text to learn language patterns and generate responses. A typical text-generating LLM predicts the next token, a word or part of a word, from the context it has seen, then repeats.

Try the idea yourself: choose a sentence start, change the temperature and watch a tiny model predict. Everything in the demo runs in your browser, without an account or an AI service.

01 / Predict

Watch a tiny language model choose its next word

This toy model learned word pairs from chapter one of Lewis Carroll’s Alice’s Adventures in Wonderland (1865, public domain in the US). It only sees the last word or punctuation mark. A real LLM learns richer patterns across a much longer context and usually predicts subword tokens.

Lower values favor frequent continuations; higher values spread the chance more evenly. Zero always picks the top word (ties use alphabetical order). Temperature changes variety, not factual accuracy.

Your text stays in this browser tab.

Possible next words (36)

  1. not9.4% · 5 seen
  2. nothing5.7% · 3 seen
  3. too5.7% · 3 seen
  4. very5.7% · 3 seen
  5. _3.8% · 2 seen
  6. a3.8% · 2 seen
  7. all3.8% · 2 seen
  8. going3.8% · 2 seen
  9. just3.8% · 2 seen
  10. no3.8% · 2 seen
  11. now3.8% · 2 seen
  12. ,1.9% · 1 seen
  13. another1.9% · 1 seen
  14. beginning1.9% · 1 seen
  15. close1.9% · 1 seen
  16. coming1.9% · 1 seen
  17. considering1.9% · 1 seen
  18. dozing1.9% · 1 seen
  19. empty1.9% · 1 seen
  20. ever1.9% · 1 seen
  21. good1.9% · 1 seen
  22. growing1.9% · 1 seen
  23. indeed1.9% · 1 seen
  24. labelled1.9% · 1 seen
  25. lit1.9% · 1 seen
  26. lying1.9% · 1 seen
  27. over1.9% · 1 seen
  28. playing1.9% · 1 seen
  29. quite1.9% · 1 seen
  30. rather1.9% · 1 seen
  31. reading1.9% · 1 seen
  32. still1.9% · 1 seen
  33. that1.9% · 1 seen
  34. the1.9% · 1 seen
  35. to1.9% · 1 seen
  36. walking1.9% · 1 seen

02 / Split

See text as smaller pieces

A token can be a whole word, part of a word, punctuation, or whitespace. These colors use a simple four-character chunk rule to illustrate pieces. This is not a model tokenizer or a token-cost estimate. Real boundaries depend on the model and language.

20 illustrative pieces, including whitespace

Language models predict one token at a time.

How a real LLM works

  1. 1. Train

    Examples adjust billions of numerical weights so the model learns patterns. Further training can teach instruction following and other behaviors.

  2. 2. Read the context

    A tokenizer turns input into pieces. A transformer uses attention to relate those pieces across the available context.

  3. 3. Predict and repeat

    The model assigns scores to possible next tokens. A decoding rule selects one, adds it to the context, and repeats until it stops.

This demo counts pairs of words. It has no neural network, attention or reasoning ability, and its probabilities are from a single chapter. It illustrates prediction and sampling, rather than replicating a modern LLM.

Which model family is which?

A starting guide, checked November 15, 2026. These are families, not a performance ranking. Specific versions, prices, capabilities and licenses change. Open weights means the trained weights can be downloaded; it does not automatically mean unrestricted use, open training data or zero hosting cost.

GPT / OpenAI

Hosted proprietary GPT models; OpenAI also offers separate open-weight gpt-oss models.

Common uses: General language, reasoning and coding.

OpenAI model documentation

Claude / Anthropic

Proprietary; accessed through hosted services.

Common uses: Language, coding, document and agent tasks.

Anthropic model documentation

Gemini / Google

Proprietary Gemini models; Google’s Gemma is a separate open-weight family.

Common uses: Language and multimodal inputs.

Google model documentation

Llama / Meta

Downloadable open weights under release-specific Llama licenses.

Common uses: Self-hosted or provider-hosted applications.

Meta model documentation

Mistral / Mistral AI

A mix of open-weight and commercial models; check each release.

Common uses: General language and specialized tasks.

Mistral AI model documentation

DeepSeek / DeepSeek

Open-weight releases include R1; license and resources vary by release.

Common uses: Reasoning, coding and self-hosted applications.

DeepSeek model documentation

Grok / xAI

Hosted Grok services; the older Grok-1 base model has an open-weight release.

Common uses: General language, reasoning and coding.

xAI model documentation

For a practical choice, test several models on your own representative tasks. If you need self-hosting, start with a release whose weights and license support your hardware and use case. If you use a hosted model, check its data handling terms before sending sensitive information.

LLM glossary in plain English

Parameters
Learned numerical weights that shape predictions. More parameters alone do not guarantee a better answer.
Training vs inference
Training adjusts model weights using examples. Inference runs the trained model on new input, normally without changing those weights.
Context window
The maximum input and output tokens a model can work with in one request. A long window is not perfect memory.
Transformer
A neural network architecture using attention to relate pieces of input. Unlike this bigram demo, it can use many earlier tokens.
Fine-tuning
Further training an existing model on examples to change behavior, such as style or a specialized task.
RAG
Retrieval-augmented generation adds relevant retrieved material to a prompt before the model answers. Try RAG →
Agent
Software that uses a model to choose actions and tools toward a goal, with limits enforced by the software. Explore agent workflows →
MCP
Model Context Protocol: a standard connection between AI applications and servers that expose tools and data. Explore MCP →

How to use the next-word demo

  1. 1. Choose a sentence start

    Start with Alice was, the or she, or type your own text.

  2. 2. Inspect the probabilities

    See which words followed the last word in the training chapter and how often.

  3. 3. Adjust temperature

    Lower the temperature for more concentrated predictions or use zero for a greedy choice.

  4. 4. Generate and compare

    Generate the next word several times, then inspect what the toy model gets wrong.

LLM questions, answered

What does LLM stand for?

LLM stands for large language model: an AI model trained on large amounts of text to learn patterns and generate language. Many modern models also accept images, audio or other inputs.

Is ChatGPT the same thing as an LLM?

ChatGPT is an application that uses language models. The app adds features such as search, file handling and tools around those models. AI is the broader field; LLMs are one type of AI.

Do LLMs think or understand?

LLMs can perform many reasoning and language tasks, but fluent output does not establish consciousness or human-like understanding. Their answers should be judged by evidence and task performance.

Why do LLMs hallucinate?

A model generates a likely continuation, not a guaranteed true statement. Missing knowledge, misleading context and pressure to answer can produce confident errors. Retrieval and fact-checking help but do not guarantee correctness.

How do AI agents use LLMs?

An agent uses an LLM to interpret a task and decide which tool to call next. The surrounding software executes the tool, returns results to the model, and enforces permissions and stopping rules.

Read the sources

Put models to work in repeatable workflows

Use Tornic to connect your existing AI coding CLIs into multi-step workflows with visible inputs and outputs.

Explore Tornic

Related free tools