What came next
One paper about machine translation quietly became the blueprint for almost every AI system that followed. A short tour of how that happened.
In June 2017, eight researchers at Google posted a paper with an unusually confident title: “Attention Is All You Need.”1 Its stated goal was modest. It wanted to translate English into German and French a little better, and a lot faster, than the systems of the day.
It did that. It also, without quite meaning to, handed the field a general-purpose engine. Nearly every headline AI system of the years since, from chatbots and code assistants to image models and protein-structure predictors, uses or borrows from the architecture that paper introduced: the Transformer.
The idea, in one paragraph
Before 2017, the leading language models read text the way you might read through a keyhole: one word at a time, carrying a running summary forward. That made them slow to train and forgetful over long passages. The Transformer threw out the keyhole. Every word looks at every other word at once and works out which ones matter for understanding it. That act of looking is attention. The idea itself was not new: translation systems had been adding attention to word-by-word models since 2014.2 The paper’s bold move was to keep the attention and drop the rest.
Because every word can be processed in parallel, Transformers suit the hardware we already had: GPUs, which do thousands of calculations simultaneously. That turned out to matter more than anything else.
Go deeper: the attention formula
Each token starts as an embedding, a vector of numbers. The model multiplies it by three learned matrices to get a query (what am I looking for?), a key (what do I contain?) and a value (what do I pass along?). Stacking these for every token gives matrices Q, K and V, and the whole operation is one line:
Attention(Q, K, V) = softmax(QKT / √dk) V
QKT scores every query against every key. Dividing by √dk (the key length) keeps the scores in a range where training stays stable. Softmax turns each row of scores into weights that sum to 1, the kind of weights the arcs in the figure above stand for. Those weights then blend the values. In NumPy:
import numpy as np
def attention(Q, K, V):
d_k = Q.shape[-1]
scores = Q @ K.T / np.sqrt(d_k)
weights = np.exp(scores - scores.max(axis=-1, keepdims=True))
weights /= weights.sum(axis=-1, keepdims=True) # softmax
return weights @ V
The paper runs eight of these “heads” side by side, each with its own learned matrices, so different heads can track different kinds of relationships.
2018–2019: read everything, then specialize
Within a year and a half, two families of models showed what the architecture could do when fed enough text. OpenAI’s GPT3 trained a Transformer simply to predict the next word across a large pile of books, then fine-tuned it for specific tasks. Google’s BERT4 trained one to fill in blanked-out words, and it promptly topped a wide range of language-understanding benchmarks.
The recipe both shared, pretrain broadly, then adapt, became the default way to build language systems. GPT-2,5 in 2019, scaled the idea up to 1.5 billion parameters and produced paragraphs of fluent prose that startled people outside the field for the first time.
2020: bigger turns out to be different
In 2020 two things happened that reshaped the field’s ambitions. Researchers published scaling laws showing that a Transformer’s performance improved smoothly and predictably as you added data, parameters and compute.6 And GPT-3, at 175 billion parameters, showed that a big enough model could perform new tasks from a handful of examples written into the prompt, with no retraining at all.7
The same year, the architecture escaped language. The Vision Transformer8 chopped images into small patches, treated each patch like a word and, given enough training data, rivaled the best image classifiers. DeepMind’s AlphaFold 2,9 built around attention, predicted protein structures with accuracy that largely settled a fifty-year-old problem in biology.
A design built for translation turned out to be a design for learning relationships between pieces of anything.
2022: the public meets the Transformer
Raw next-word predictors are capable but unruly. The missing step was teaching them to be helpful conversational partners, largely through reinforcement learning from human feedback: people ranked model responses, and the model was tuned toward the ones people preferred.10 In November 2022 that work reached the public as ChatGPT, and the Transformer went from a research topic to something an estimated hundred million people used within a couple of months.11
Since then
The years that followed have been less about new architectures than about what you can build on this one: models that see, hear and speak; models that write and run code; models that use tools and carry out multi-step tasks; and a steady stream of work on making them cheaper, longer-context, more reliable and better understood. Underneath almost all of it, the core loop from 2017 is still recognizable: tokens in, attention across them, a prediction out.
What this site is for
That is the thread these essays will follow. Some will explain how a piece of the machinery works, with optional detours into the math for those who want it. Others will be about what the technology is doing to the world it is now part of. All of them start from the same place: a paper that, it turns out, was right about its title.
- Vaswani et al., “Attention Is All You Need” (2017). ↩
- Bahdanau, Cho and Bengio, “Neural Machine Translation by Jointly Learning to Align and Translate” (2014). ↩
- Radford et al., “Improving Language Understanding by Generative Pre-Training” (2018). ↩
- Devlin et al., “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding” (2018). ↩
- Radford et al., “Language Models are Unsupervised Multitask Learners” (2019). ↩
- Kaplan et al., “Scaling Laws for Neural Language Models” (2020). Later work, notably DeepMind’s Chinchilla paper, “Training Compute-Optimal Large Language Models” (2022), revised how best to split a fixed budget between model size and data. ↩
- Brown et al., “Language Models are Few-Shot Learners” (2020). ↩
- Dosovitskiy et al., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale” (2020). ↩
- Jumper et al., “Highly accurate protein structure prediction with AlphaFold” (2021). The system was first shown at the CASP14 competition in 2020. ↩
- Ouyang et al., “Training language models to follow instructions with human feedback” (2022). ↩
- A UBS estimate of monthly users for January 2023, reported by The Register (2023). ↩