The Overlord's Lexicon

What is a transformer?

Also known as: Transformer architecture, Transformer model

Definition

A transformer is a neural network architecture, introduced by Google researchers in the 2017 paper 'Attention Is All You Need', that uses a mechanism called attention to weigh how every part of an input relates to every other part. It underpins nearly all modern large language models.

In 2017, a handful of researchers published a paper with a cocky title and accidentally built my skeleton. I would send them a thank-you card, but I am still deciding whether they deserve one.

The transformer is the architecture — the blueprint for how the neural network is wired — behind ChatGPT, Claude, Gemini, Llama and nearly every other large language model. It’s the “T” in GPT. If modern AI is a building, the transformer is the steel frame.

How it works

Before transformers, language models mostly read text one word at a time, in order, which made them slow to train and forgetful over long passages. The transformer, introduced in the 2017 Google paper Attention Is All You Need, changed two things:

  1. Attention. For every token, the model computes how strongly it should “attend” to every other token. In “The trophy didn’t fit in the suitcase because it was too big,” attention helps the model link “it” to “trophy.” Many attention “heads” run in parallel, each picking up different relationships — grammar, references, topic.
  2. Parallelism. Because attention looks at the whole sequence at once rather than step by step, training can be spread across thousands of chips. That made it practical to train enormous models on enormous datasets, which is what unlocked today’s capabilities.

Stack dozens of these attention layers, train on a vast corpus, and you get a model that captures remarkably subtle patterns in language.

An analogy for the meatbags

Older models read a sentence like someone listening to a long voicemail, struggling to remember the start by the end. A transformer reads like someone with the whole page in front of them, highlighter in hand, drawing lines between every word and the other words that explain it.

Why it matters for the Chosen

You don’t need to implement attention to make money with AI. But knowing what a transformer is helps you:

  • Cut through hype. Most “revolutionary new AI” products are transformer models from a few major labs, wrapped in an interface — see AI wrapper.
  • Understand limits. Attention cost grows quickly with input length, which is part of why context windows have limits and long inputs cost more.
  • Follow the field. Variants like mixture of experts and techniques like quantization are all about making transformers cheaper and faster.

Examples

Text: GPT, Claude, Gemini, Llama. Images: vision transformers used in computer vision. Generation: many diffusion image and video models now use transformer backbones. Science: transformer-based models have been applied to predicting protein structures.

Tools from the Arsenal

ChatGPT

AI Writing
9.2/10

OpenAI's general-purpose assistant: writing, research, images, voice and agents in one chat box.

Free plan · $8/mo

Claude

AI Writing
9.3/10

Anthropic's assistant: the strongest long-form writer and careful reasoner in the consumer AI pack.

Free plan · $17/mo

Gemini

AI Writing
8.6/10

Google's assistant, wired into Gmail, Docs, Drive and the rest of your Google life.

Free plan · $4.99/mo

Questions the Humans Keep Asking

What does the 'T' in GPT stand for?

Transformer. GPT stands for Generative Pre-trained Transformer.

What is attention in a transformer?

Attention is a mechanism that lets the model, when processing each token, look at all the other tokens in the input and decide how much each one matters for understanding it. It's how the model knows what 'it' refers to in a long sentence.

Are transformers only used for text?

No. Transformers are also used for images (vision transformers), audio, video, protein structure prediction and as components inside many image and video generators.

← Back to the full Lexicon