Week 1 · Further reading
How large language models work, in more depth
The slides told the story from 1948 to today's agents in about 30 minutes. This page has the sources behind each part, with the numbers they support, for when you want to read the original or check a claim. Most links are free to read.
1. Before the transformer
- Shannon (1948), A Mathematical Theory of Communication. The "second-order word approximation" on the slide is quoted from here: each word chosen only by the word before it. Every pair sounds like English; the whole means nothing.
- Shannon (1951), Prediction and Entropy of Printed English. People guessing the next letter: English carries "of the order of one bit per letter" (0.6 to 1.3). Next-token prediction as a measure of understanding is that old.
- Bengio et al. (2003), A Neural Probabilistic Language Model. The first neural network that learned a vector for each word while learning to predict the next one.
- Brants et al. (2007), Large Language Models in Machine Translation. The fun fact from the timeline: Google's "large language models" were word counts over up to 2 trillion tokens.
- Mikolov et al. (2013), word2vec. Word vectors where directions carry meaning: king − man + woman ≈ queen.
- Bahdanau et al. (2014), attention for translation. Attention first appeared as an add-on to recurrent networks, letting a translator look back at the source sentence.
2. The transformer
Vaswani et al. (2017), Attention Is All You Need, eight authors at Google Brain and Google Research, dropped recurrence altogether: every word looks directly back at every earlier word, computed as matrix multiplications. That made training parallel on GPUs, let any word reach any earlier word in one step, and works on anything cut into tokens. Each word makes a query, compares it with every earlier word's key, and takes a weighted mix of their values: the three steps on the slide.
Transformers in science
- EQTransformer (Mousavi et al., Nature Communications 2020): detects earthquakes and picks seismic phases.
- AlphaFold 2 (Jumper et al., Nature 2021): protein structure, with attention in its Evoformer and structure module.
- Pangu-Weather (Bi et al., Nature 2023): global weather forecasts.
3. Next-token prediction at scale
The model's only output is a probability for every token in its vocabulary. A token is a word or a piece of one; 1,000 tokens is about 750 English words.
| Source | The number |
|---|---|
| GPT-2 (Radford et al. 2019) | a 50,257-token vocabulary |
| GPT-3 (Brown et al. 2020) | 175 billion parameters, 96 layers, 96 attention heads, 300 billion training tokens |
| Scaling laws (Kaplan et al. 2020) | loss falls as a smooth power law in model size, data and compute, over more than seven orders of magnitude |
| Chinchilla (Hoffmann et al. 2022) | a 70-billion-parameter model on 1.4 trillion tokens beat much larger models: train on more data, not just more parameters |
| Llama 3 (Meta, April 2024) | over 15 trillion training tokens, a 128,000-token vocabulary; about 85,000 years of reading for one person |
4. Pre-training, then post-training
Pre-training teaches what the model knows; post-training, with far less data, teaches how it behaves. Both train the same next-token predictor.
- InstructGPT (Ouyang et al. 2022): example answers and human rankings turn a base model into an assistant. ChatGPT launched on November 30, 2022.
- Reasoning models: reinforcement learning on problems with automatic checks, such as math and code. OpenAI o1-preview (September 12, 2024) and DeepSeek-R1 (January 2025), whose paper describes the method openly.
5. What next-token prediction explains
- Confident inventions. It writes the likeliest continuation, which is usually true and sometimes a citation that never existed. Check every reference.
- No memory of you. Between conversations it keeps nothing, unless an app pastes notes back into its context (week 3's memory files).
- Eager to please. Trained on answers people liked, it may agree with you when you're wrong. Ask it to argue the other side.
The failure-modes weeks later in the quarter come back to all three.
6. From tokens to agents
An agent is a model in a loop: the model writes tokens; when they are a tool call, the harness runs it and pastes the result back.
| When | What |
|---|---|
| Oct 2022 | ReAct (Yao et al.): interleave reasoning and actions in one transcript |
| Jun 13, 2023 | OpenAI function calling: tool calls as structured output |
| Nov 25, 2024 | The Model Context Protocol: one standard way to plug tools into any harness |
| Feb 24, 2025 | Claude 3.7 Sonnet and Claude Code: a coding agent in the terminal |
| Apr 16, 2025 | OpenAI o3, o4-mini and Codex CLI |
Weeks 2 and 3 open this loop up: week 2 reading · week 3 reading.
7. The falling cost of AI
Epoch AI, "The plunging price of thought" (Ament and Burnham, September 22, 2026) is the source of the slide's headline: the cost to reach a fixed score falls about 47% per quarter, roughly 13 times per year, since 2023. Its examples: a GPQA science score that cost about 30 cents a question with o3 in January 2025 cost about 0.04 cents with GPT-5.6 Luna by July 2026, 726 times cheaper in 18 months. For comparison, DNA sequencing got about 1.8 times cheaper per year, computing 1.5, lithium batteries 1.16.
- Andreessen Horowitz, "LLMflation" (November 2024): about 10 times per year; GPT-3-level text went from $60 to $0.06 per million tokens in three years.
- Epoch AI, LLM inference price trends (March 2025): 9 to 900 times per year depending on the milestone.
- Sam Altman, "Three Observations" (February 2025): "the cost to use a given level of AI falls about 10x every 12 months".
Cautions: the rate differs by task, frontier models stay expensive, and price per question includes hidden reasoning tokens (week 2).
8. Benchmarks
Every "best now" score on the slide came from the Epoch AI Benchmarking Hub on September 29, 2026.
| Benchmark | What it asks | At launch |
|---|---|---|
| GPQA (Nov 2023) | 448 graduate science questions; experts score 65%, skilled non-experts with the web 34% | GPT-4: 39% |
| SWE-bench Verified (Aug 2024) | 500 real GitHub issues, screened by 93 developers | GPT-4o: 33% |
| FrontierMath (Nov 2024) | unpublished research-level math | under 2% |
| Humanity's Last Exam (Jan 2025) | 2,500 expert questions in over 100 subjects | o1: 8% |
| PostTrainBench (Mar 2026) | post-train a base model with one H100 in 10 hours | 23%, against 51% for the labs' own tuning |
| OSWorld 2.0 (Jun 2026) | 108 long computer workflows, about 1.6 hours for a person | 21% |
| Terminal-Bench-Science 0.1 (Aug 2026) | 70 research tasks in the Harbor format, like your homework | 30%; GPT-6 Astra now 63% (Artificial Analysis) |
| FrontierMath Erdős (Sep 2026) | 68 unsolved Erdős problems, stated in Lean | GPT-6 Astra solved 2 |
- METR, Measuring AI Ability to Complete Long Tasks (paper): measures agents by how long a task takes a person.
- Liu et al., "Coding Agents Have Converged" (September 2026): across 254 SWE-bench submissions, the top 30 are not statistically different. Saturated benchmarks stop telling models apart, which is why new, harder tasks matter.
9. Tasks like your homework
A task is a folder: an instruction, a sealed environment, a reference solution, and tests that write a reward of 1 or 0. The format is Harbor, from Terminal-Bench 2.0. The reference solution must score 1 and an agent that does nothing must score 0. That is how labs measure agents, and how reinforcement learning trains them.