Anthropic logo
AnthropicSample

Claude

Next-token prediction · Mar 2023

Anthropic’s family of language models: pre-trained on next-token prediction, then aligned with human feedback and Constitutional AI, where the model critiques answers against a written set of principles.

Released
Mar 2023
Access
Closed
Parameters
Undisclosed
Architecture
Transformer language model (details undisclosed)
Training data
Public web data, licensed data, data from users who opted in, and synthetic data, per Anthropic’s system cards. The exact mix is undisclosed.
TextCodeImage

The statistical view

Pre-training learns the next-token distribution, like every model in this group. Alignment then learns a second model: how likely one answer is to be preferred over another.

P(A preferred to B) = σ(r(A) − r(B))

Loss
Pre-training: L = −Σₜ log p_θ(xₜ | x<ₜ). The preference model fits the Bradley–Terry formula above to ranked pairs of answers, by logistic loss on the reward difference.
Answering
Tokens sampled from the tuned distribution. With tools, numbers can be computed by code the model writes rather than generated token by token.

What comes next?

Cover everything after position t and predict it. Repeated over a corpus, this is maximum-likelihood estimation of the distribution of text.

A demonstration of the objective, computed in your browser on illustrative data. It is not Claude running here.

How it is trained

  1. 1Pre-train on next-token prediction over a large text and code corpus.
  2. 2Fine-tune on demonstrations of helpful, honest answers.
  3. 3Train a preference model on pairs of answers ranked by people, or by the model itself judging against a constitution (RLAIF).
  4. 4Optimise the language model with reinforcement learning against that preference model.

Line of descent

  1. Dec 2022Constitutional AI — Paper: AI feedback guided by written principles replaces much of the human labelling.
  2. Mar 2023Claude — First public release.
  3. Jul 2023Claude 2 — Public chat interface and a 100K-token context window.
  4. Mar 2024Claude 3 — Haiku, Sonnet and Opus tiers. Image input.
  5. May 2025Claude 4 — Opus 4 and Sonnet 4, aimed at long coding and agent tasks.

What data teams use it for

  • Reading long documents: data contracts, schemas, policies
  • Agentic data work: writing and running SQL or Python with tools
  • Structured extraction from messy text to JSON
  • Reviewing code and pipeline changes

Limits

  • Can hallucinate, like any language model
  • Parameter count and training mix are not published
  • Numbers in an answer are generated, not computed, unless it runs a tool
  • At temperature above 0 the same prompt can give different answers

Classic algorithms underneath

The same ideas, small enough to train in a browser.

Same objective