Skip to content

Decoder-only language models: GPT, and what a model card discloses

GPT-style models predict the next token with a causal mask and scale up. See what that objective gives you, how much of GPT-4, Phi and OLMo is actually disclosed, and how CodeSplash uses such models through its AI layer, not as methods.

Applied ~14 min8 steps

What runs in CodeSplash

You will be able to

  • Describe the causal mask and the next-token objective of a decoder-only model
  • Compute a continuation's probability from its token probabilities
  • Say what a closed model's report leaves out and what that means for reproducibility
  • Explain what fully open models such as OLMo make possible

Read first

01

Predict the next token, at scale

Read

A GPT-style model is a stack of Transformer decoder blocks with a causal attention maskAttention maskBlocks some query–key pairs before the softmax, such as future tokens (causal) or padding, so they get zero weight.: each position may attend only to earlier positions. Training maximizes the probability of every next token in a huge text collection. That is the whole objective of an autoregressive language modelAutoregressive language modelA model trained to predict each next token from the ones before it, under a causal mask; it generates text one token at a time..

A continuation's probability is the product of its token probabilities. Three tokens at 0.8, 0.6 and 0.9 give the reference program 0.432. Scaling this simple objective up, from GPT-2's 124 million parameters to GPT-3's 175 billion, brought in-context learning: following examples and instructions written in the prompt.

A causal mask keeps every token from seeing the ones after it.

DExplorable · Attention: scores, masks and heads

Where does each word look, and what do the scaling and the masks change?

With this mask, how much of each word's attention lands on <pad>?

How sure?
6
2

How many of the positions are <pad>.

Width d

Heads

Mask

Without masks or positions the output rows shuffle the same way.

1.00.00.00.00.00.00.33.67.00.00.00.00.03.14.82.00.00.00.26.71.02.01.00.00.09.08.65.12.06.00.37.48.03.01.09.03thecatsaton<pad><pad>thecatsaton<pad><pad>
  • Little weight
  • Most weight
  • Masked: score set to −∞

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

Make your prediction to see the result.

02

A closed model: what was disclosed

Read

GPT-4's technical report describes capabilities and evaluations, but withholds the architecture, the parameter count, the training data and the compute. Its results can't be reproduced or checked for training-data overlap from outside.

Treat any closed model as a moving service. The provider can update it under the same name, so record the exact model version and date with every result, and re-run your own evaluation after a change. The same applies to every hosted model you reach through an API.

Reference · LNG034 · Explained hereGPT-4 publicly documented familyDocuments a large multimodal model that accepts text and, in the report, images, and produces text. It is included as a historically influential model family while keeping the report's disclosure limits explicit.
03

Data design and full openness

Read

Phi models are small and trained on carefully selected and synthetic "textbook-quality" text. Their lesson is that data selection can rival scale; their open question is whether strong benchmark scores reflect skill or overlap with what the curated data resembled. A data mixture is itself a design: the reference program's mixture of three domains has an expected loss of 1.28.

OLMo releases weights, training code, intermediate checkpoints and the full training data. With full opennessModel opennessHow much of a model is released: weights only, or also training data, code and checkpoints. Only open data allows contamination checks., anyone can search the data for a test set, study how training stages change the model (the reference program compares weighted losses 1.92 and 1.84 after two stages) and reproduce the run.

04

Open weights is not open data

Predict

Predict first

A model's weights are free to download, but its training data isn't published. Can you rule out that your benchmark leaked into its training?

Yes: with the weights you can check everythingNo: without the training data you can't check for test-set overlapOnly if the model is small
Reveal

No. Open weights let you run and study the model, but checking for leaks needs the data, or at best indirect tests such as Min-K% Prob that hint, never prove.

05

How CodeSplash uses these models

Read

Decoder-only chat models are not CodeSplash methods. They run through the AI layer, as infrastructure behind Ask documents, Label with AI, the LLM classifier, the AI judge and the Agent: a local runtime (Ollama or LM Studio) on your Mac, or a cloud provider you configure. Their outputs are model output, not parity-checked results, and they change when the model does.

One GPT model does run as a method: Language model perplexity scores text with GPT-2 small, written out in Python and R. GPT-4 and Phi are explained here; OLMo's reference program runs as a notebook.

06

Where it stands in CodeSplash

Read
EntryIn CodeSplash
GPT family (LNG033)Partly runs in CodeSplash: GPT-2 small scores text in Language model perplexity; chat models are usable through the AI layer, not a method
GPT-4 (LNG034)Explained here; reachable through a cloud provider in the AI layer
Phi (LNG042)Explained here; usable through the AI layer, not a method
OLMo (LNG043)Runs as a notebook (its reference program); usable through the AI layer, not a method
07

Check: decoder-only models

Checkpoint

Check yourself

What does the causal mask in a GPT-style model enforce?

Show the answer

Answer: b

Without the mask, training would let each position copy the answer from the future. With it, all positions can be trained in parallel on next-token prediction.

Check yourself

What is a GPT model's pretraining objective?

Show the answer

Answer: a

Next-token prediction on large text is the whole pretraining objective; instruction and preference tuning come later.

Check yourself

Why can't outside researchers check whether a closed model saw a benchmark during training?

Show the answer

Answer: b

Without the data, overlap can't be measured; only indirect, inconclusive tests remain.

Check yourself

You evaluated a hosted model in March and again in June under the same model name, with different results. What is good practice?

Show the answer

Answer: b

Providers update models behind names. A result is only reproducible with the version and date attached.

Check yourself

What is the main idea behind the Phi models?

Show the answer

Answer: b

Phi treats the data mixture as the main design choice. The caveat is that curated data can resemble benchmarks, inflating scores.

Check yourself

A model's training mix gives half its weight to one domain. What does changing those mixture weights change?

Show the answer

Answer: b

A mixture is a choice about whose text the model should model well. Reporting it is part of describing the model.

Check yourself

What does OLMo release that most open-weight models don't?

Show the answer

Answer: b

With data and code, others can audit for contamination, reproduce training and study how stages change the model.

Check yourself

Why does a fully open model help an evaluation team?

Show the answer

Answer: b

A contamination check needs the data. Open data turns a guess into a search.

08

Recap

Recap
  • GPT models are causal decoders trained on next-token prediction; continuations multiply token probabilities.
  • Closed models withhold architecture and data; pin versions and re-evaluate.
  • Phi bets on data design; OLMo releases data, code and checkpoints, so claims can be checked.
  • In CodeSplash, chat models run through the AI layer; GPT-2 scores text as a method.

Concepts in this lesson