Sections

HomeResearchWritingExperienceProjectsVideosFor agents

Theme

Hrithwik Bharadwaj

hrithwik009@gmail.com

Built with Vite and React · Bangalore, India

Writing

Attention, Explained Like a Group Chat

One idea from a 2017 translation paper sits inside every model you use. What attention is, in plain words, why it made scaling laws possible, and how GPT-2 grew into reasoning models and Kimi K3.

Hrithwik BharadwajNov 22, 202619 min read

Contents

  1. 01The Telephone Line
  2. 02The Group Chat
  3. 03The Fuzzy Lookup
  4. 04The picture in the paper
  5. 05Why it scaled
  6. 06The Three Dials
  7. 07The Group Chat Bill
  8. 08Cutting the bill
  9. 09From GPT-2 to Kimi K3
  10. 10How Kimi K3 is different
  11. 11The Fourth Dial
  12. 12Is attention still all you need?
  13. 13Under the hood
  14. 14What I am watching
  15. 15Sources and further reading

The idea inside every AI model you use came from a paper about translating English into German.

In June 2017, eight researchers at Google posted Attention Is All You Need. It beat the best translation systems of the day, and the big version trained in 3.5 days on one machine with eight graphics cards. Nothing in it is about chatbots. Yet ChatGPT, Claude, Gemini, DeepSeek and Kimi all run on the idea at its centre. The T in GPT stands for Transformer, the name the paper gave its model.

The authors are worth a look too. A footnote says the order of their names is random, because all eight contributed equally. Nine years later, none of them works at Google. Seven started companies, and two are now at OpenAI. Here is where each one went.

2017 · Google Brain

Ashish Vaswani

2022Adept→2023Essential AI→2026Nvidia

Reported to have joined Nvidia in June 2026 to work on its Nemotron models, after Nvidia took in Essential AI.

2017 · Google Brain

Noam Shazeer

2021Character.AI→2024Google, Gemini→2026OpenAI

Went back to Google in 2024 to co-lead Gemini, then left for OpenAI in June 2026.

2017 · Google Research

Niki Parmar

2022Adept→2023Essential AI→2024Anthropic

Joined Anthropic around the end of 2024, the last move on public record.

2017 · Google Research

Jakob Uszkoreit

2021Inceptive

Runs Inceptive, which designs RNA medicines with AI, and signed a deal with Alnylam in June 2026.

2017 · Google Research

Llion Jones

2023Sakana AI, Tokyo

Co-founded Sakana AI and is its CTO, looking for what comes after the Transformer.

2017 · Google Brain intern

Aidan Gomez

2019Cohere

Was a University of Toronto student at the time. Co-founded Cohere and is its CEO; in September 2026 it agreed to merge with Germany’s Aleph Alpha.

2017 · Google Brain

Łukasz Kaiser

2021OpenAI

At OpenAI since 2021, where he worked on the reasoning models this essay ends with.

2017 · Google Research

Illia Polosukhin

2017NEAR

Left Google the same year to start NEAR, an AI startup that became a blockchain, and now pushes “user-owned AI”.

Where the eight went, as of November 2026. Vaswani's move to Nvidia is from press reports, not an announcement, and Cohere's merger had been signed but not closed. Sources at the end.

This is the explanation I would give a friend who knows a bit of code, or a student who has never opened a research paper. By the end you will know what attention does, why it let AI labs turn money into intelligence on a predictable curve, and how one 2017 design grew into GPT-2, then reasoning models, then Kimi K3. The first four sections need no maths. If you have ever built a backend, one of them will feel familiar.

The Telephone Line

Before 2017, the best language models read the way you listen to someone talk: one word at a time, in order. After each word they updated a single running note about everything heard so far, then passed that note on to the next word.

Think of the children’s game of telephone. A message is whispered down a line, one person at a time. I will call this the Telephone Line. It has two problems, and both matter for the rest of this essay.

The first is forgetting. The note has a fixed size, so every new word squeezes out a little of the old ones. In 2014, the paper that first added attention to translation called this fixed-size note “a bottleneck”. Read the sentence below: by the time the model reaches “are”, it has to remember that “keys”, five words back, was plural.

The second is speed. Word six cannot be processed until word five is done. The 2017 paper says it plainly: this “inherently sequential nature precludes parallelization”. Hold on to that one. It turns out to be the whole story.

Before 2017

The Telephone Line

One word at a time5 hops, keys → areTheThekeyskeystotothetheoldoldcabinetcabinetareareonthetablekeyskeyskeyske…?
One word at a time5 hops, keys → areTheThekeyskeystotothetheoldoldcabinetcabinetareareonthetablekeyskeyskeyske…?

2017, attention

The Group Chat

Every word at once1 step, 45 linksThekeystotheoldcabinetareonthetable
Every word at once1 step, 45 linksThekeystotheoldcabinetareonthetable
The Telephone Line against the Group Chat. The old way passes a note down the line and loses detail on every hop. Attention lets 'are' look straight back at 'keys', however far away it is.

The Group Chat

Attention throws the line away. Put every word of the sentence into one Group Chat. Every word can read every other word’s message directly, in a single step, no matter how far apart they sit.

But a word does not read everyone equally. For each word, the model decides how much to listen to each of the others, as a share of its focus that adds up to 100%. That share is the “attention”. A word then updates its own meaning with a blend of what it heard, weighted by those shares.

Google’s 2017 write-up showed this with a sentence I still find the clearest test. In “The animal didn’t cross the street because it was too tired”, “it” is the animal. Change “tired” to “wide” and “it” becomes the street. French gives the two nouns different genders, so a translator has to get this right. Try it:

Try it

Who is “it”?

Theanimaldidn'tcrossthestreetbecauseitwastootired
Theanimaldidn'tcrossthestreetbecauseitwastootired

looks at

58%

animal

looks at

9%

street

the rest

33%

everything else

Change the last word and watch 'it' change its mind. The weights are illustrative, but real models do this: Google's 2017 write-up used this exact sentence.

That is the whole idea. Every word looks around the Group Chat, decides who matters, and rewrites its own meaning from what it heard. A model does this in layers, dozens of times over, so by the top layer each word carries its entire context with it.

One small honesty: models read tokens, which are words or pieces of words. “Unbelievable” might be three tokens. I will keep saying “words” because the picture is the same.

The Fuzzy Lookup

If you have written backend code, you already know most of attention. You just know the strict version.

A dictionary lookup like prices["tea"] compares your key with every stored key. One matches exactly, you get its value, and the rest are ignored. Attention does the same lookup, but every key matches a little. It scores each key against what you asked for, turns the scores into shares that add up to 100%, and hands back a blend of all the values. I call this the Fuzzy Lookup.

This is where the three famous letters come from. Each word makes three things from itself. A query: what am I looking for? A key: the label on my drawer, what do I have? A value: what I hand over if someone picks me. “It” sends out a query that roughly means “something that can be tired”, the key on “animal” matches it well, and most of the animal’s value flows into the new meaning of “it”.

What you already know

A normal lookup

prices["tea"]coffee0tea1 matchjuice0answer20all or nothing

What attention does

The Fuzzy Lookup

it asks: who could be tired?match scoreshareanimal58%street9%it8%tired7%7 others18%new "it"≈ animal
it asks: who could be tired?match scoreshareanimal58%street9%it8%tired7%7 others18%new "it"≈ animal

Every word makes three things from itself

Query, key and value

QueryWhat am I looking for?"it" asks for something that can be tired.
KeyWhat do I have?The label on each word's drawer. "animal" says: a living thing, a noun.
ValueWhat do I hand over?What a word passes on when it is picked. The blend of these becomes the new "it".
The Fuzzy Lookup. A dictionary returns the one value whose key matches exactly. Attention scores every key, turns the scores into shares that add up to 100%, and hands back a blend.

Nobody writes these queries and keys by hand. Each word turns into its query, key and value by passing through three tables of numbers, and the model learns those tables during training. The Fuzzy Lookup is the fixed part. What gets looked up is learned.

The Picture in the Paper

The paper has two diagrams that every course on this topic copies. Here they are as printed. Read them from the bottom up.

Figure 1 confuses almost everyone the first time, because it shows two towers. That is because the 2017 model was a translator. The left tower, the encoder, reads the English sentence. The right tower, the decoder, writes the German one word at a time, glancing across at the encoder as it goes. GPT and every chat model since kept only the writer. Flip the switch to see what was dropped.

Figure 1, the original

The Transformer

Figure 1 of Attention Is All You Need. Two towers. The left, the encoder, has input embedding plus positional encoding, then N layers of multi-head attention and feed forward, each followed by add and norm. The right, the decoder, has output embedding plus positional encoding, then N layers of masked multi-head attention, a multi-head attention that reads the encoder, and feed forward, each with add and norm, then linear and softmax to output probabilities.Encoder: GPT drops itReads the encoder: dropped

Figure 2, left

One head

Figure 2, left: scaled dot-product attention. Q and K go into MatMul, then Scale, an optional Mask, and SoftMax. The result and V go into a second MatMul.

Figure 2, right

Many heads

Figure 2, right: multi-head attention. V, K and Q each pass through a linear layer, h copies of scaled dot-product attention run in parallel, their outputs are concatenated and pass through a final linear layer.
The original figures from Vaswani et al., 2017, reproduced under the permission Google gives in the paper for scholarly and journalistic use. The 2017 model was a translator: the left tower reads English, the right tower writes German. GPT keeps only the writer.

What is left is surprisingly small: one block, repeated. Here it is again, redrawn and set moving.

The left one is a single layer. First the Group Chat: every word reads the others. Then a feed-forward step, where each word thinks on its own about what it just heard. Andrej Karpathy describes the pair as communication followed by computation. Between them, “add & normalise” keeps the original signal and the update side by side, so nothing is lost on the way up. The paper stacked six of these layers. Modern models stack dozens.

The word “masked” matters. A model like GPT writes one word at a time, so during training each word may only read the words before it. Hiding the future is what turns a reader into a writer: the only thing left to learn is the next word.

Figure 1, redrawn

One Transformer layer

× N layersPick the next wordscores → probabilitiesAdd & normaliseFeed forwardeach word thinks aloneAdd & normaliseMasked multi-head attentionthe Group ChatWords → numbers+ where each word sitsthecatsatnext word?on

Figure 2, redrawn

Inside one attention head

Blend the valuesMatMul with VSoftmaxshares add to 100%Maskno peeking aheadScaledivide by √dScore every pairMatMul Q · KQlooking forKlabelsVcontentsoutputnew meaning

Multi-head attention

Run eight heads at once, then join them

h1h2h3h4h5h6h7h8Join8 views, one answer
h1h2h3h4h5h6h7h8Join8 views, one answer
The diagrams from the paper, redrawn and set moving. The left is the right half of its Figure 1, the half that GPT-style models keep. The right is its Figure 2. Read both from the bottom up.

The right diagram is one attention head, step by step: score every pair, scale the scores down, hide the future, turn scores into shares, blend the values. It is the Fuzzy Lookup again, drawn as a pipeline. The original model ran 8 of these heads side by side, so one head can track who did what while another tracks which adjective belongs to which noun.

Why It Scaled

Here is the part most explanations skip, and I think it is the most important one.

A graphics card is thousands of small calculators that want to work at the same time. The Telephone Line cannot use them well. Word six waits for word five, so most of the chip sits idle. The Group Chat hands every word to the chip at once. Every score in the grid can be computed at the same moment.

Same sentence, same chip

The race that decided everything

One at a time8 stepsw1w2w3w4w5w6w7w8All at once1 stepw1w2w3w4w5w6w7w8
One at a time8 stepsw1w2w3w4w5w6w7w8All at once1 stepw1w2w3w4w5w6w7w8

2017 base model

12hours

On one machine with 8 graphics cards. The big version took 3.5 days.

The result

28.4

BLEU on English to German, more than 2 points above every earlier system, ensembles included.

Karpathy, 2022

“A general-purpose differentiable computer.”

His three reasons: it can express a lot, it trains well, and it runs in parallel.

Why the Group Chat scaled. A graphics chip is thousands of small calculators that want to work at the same time. The Telephone Line makes them wait for the word before; attention hands them every word at once.

That is why the 2017 paper could report 28.4 BLEU on English to German, more than 2 points above every earlier result, after 3.5 days of training. The base model, at 65 million parameters, trained in about 12 hours. In 2022 Karpathy called the Transformer “a general-purpose differentiable computer”, and the last of his three reasons was exactly this: it runs in parallel.

Attention did not make models smarter in one jump. It made them trainable at a scale nobody could reach before, because it turned language into the shape of work that chips are built for. Everything after 2017 follows from that.

The Three Dials

Once training was parallel, labs could ask a simple question: what happens if we just make it bigger?

OpenAI tried. GPT-1 in 2018 was a Transformer trained to guess the next word in a few thousand books. It had 117 million parameters. GPT-2, in February 2019, had 1.5 billion and wrote such convincing text that OpenAI released it in stages. GPT-3, in 2020, had 175 billion and could do new tasks just from a few examples in the prompt.

In January 2020, Jared Kaplan and colleagues at OpenAI published Scaling Laws for Neural Language Models. They turned three dials: the size of the model, the amount of text, and the computing power spent on training. I call them the Three Dials. Turn any one up, and the model’s error falls along a straight line on a log chart, with some trends holding over more than seven orders of magnitude. The shape of the model, how deep or wide, barely mattered.

Dial one

Bigger model

errorparameters →

Dial two

More data

errorwords read →

Dial three

More compute

errorcompute →

Then they turned all three

Each bar drawn to scale

GPT-12018117MGPT-220191.5BGPT-32020175B
GPT-12018117MGPT-220191.5BGPT-32020175B

GPT-3 is 1,500 times the size of GPT-1, two years later. The design barely changed in between. They turned the dials.

The Three Dials. Kaplan and colleagues at OpenAI turned each dial separately and saw the error fall along a straight line on log scales, with some trends holding over more than seven orders of magnitude. Sketches of the shape, not their data.

A straight line is a prediction. For the first time, a lab could say how good a model would be before spending the money to train it. That turned AI from research into something closer to engineering, and it is how labs could justify each larger training run before paying for it.

The same paper also tested the Telephone Line. The older recurrent models stopped improving after fewer than 100 tokens of context, while the Transformer kept getting better across the whole context. That is the link I wanted to make in this essay. Scaling laws needed a design that could use the chips and use long context. The Group Chat was the first that could do both.

The dials had to be balanced, though. In 2022, DeepMind’s Chinchilla showed most big models were starved of data. Their 70-billion-parameter model, trained on 1.4 trillion tokens, beat the 280-billion-parameter Gopher with the same compute. Rich Sutton had written the moral in 2019, in The Bitter Lesson: methods that make use of computation win, “and by a large margin”. Ilya Sutskever had said a version of it in 2015: train a large enough network on enough data and “you will almost necessarily succeed”.

The Group Chat Bill

Nothing is free. If every word reads every other word, the work grows with the square of the length. Ten words means 100 scores. A thousand words means a million. Double the chat and the bill goes up four times. I call this the Group Chat Bill.

Why long chats are expensive

Double the words, four times the work

4 words16 scores8 words64 scores16 words256 scores
4 words16 scores8 words64 scores16 words256 scores

A 1M-token chat

1012

A trillion match scores, in every layer, for every head. This is the bill every new design tries to cut.

The Group Chat Bill. Everyone reading everyone means the work grows with the square of the length. Double the words and the bill goes up four times.

There is a second cost, and backend developers will recognise it. When a model writes, it adds one word at a time, and each new word must read every word before it. Recomputing every old key and value each time would be wasteful, so the model keeps them in memory. This is called the KV cache, and it is literally a cache. It grows with every word, and it has to sit in the chip’s fastest memory. Together with the Group Chat Bill, it is why long context is expensive.

Cutting the Bill

Almost every change to attention since 2017 is a way of paying less of the Group Chat Bill. Once you see the KV cache as a cache, the list reads like a set of caching strategies. Share the cache between heads. Compress it. Read only recent entries. Fetch only the entries that matter. Or replace it with a running summary of fixed size.

Sebastian Raschka keeps the best reference I have found for this: an LLM Architecture Gallery with diagrams of more than a hundred models, and a visual guide to attention variants. Here is my version, one tile per idea.

Multi-head · 2017

Many readers at once

thebigdogchasedacathead 1: what is it like?head 2: what did it do?head 3: which one?

The original paper ran 8 heads side by side. Each learns to look for something different.

Grouped-query · 2019, 2023

Share the cache

K VK V8 heads2 caches, 4× less memory

Heads share their keys and values in groups. Llama 2 and 3 use it, with quality close to the original.

Sliding window · 2023

Read only the recent past

Only the last fewEach word reads a bandof recent words.Mistral 7B: last 4,096

Stack enough layers and the window reaches further back. Gemma 3 mixes 5 windowed layers to 1 full one.

Sparse · 2025

Pick the few that matter

Pick the fewA cheap scorer pickswhich words to read.DeepSeek: 2,048 each

DeepSeek V3.2 adds a cheap “lightning indexer” and cut its API prices by more than half.

Latent · 2024

Zip the cache

full cachezipstoredunzipped

DeepSeek-V2 stored a compressed version and shrank the cache by 93.3%. Kimi K2 uses it too.

Linear · Kimi Delta, 2025

Keep a running summary

growing cachefixed summarymemorywords read →

No cache that grows: a fixed-size memory is updated word by word. Cheap, but it forgets details.

Hybrid · 2025, 2026

Mix cheap and full

3 cheap, 1 fullCheap layers carrya running summary.Kimi K3, Qwen3-Next

Kimi Linear: up to 75% less cache and up to 6× faster at a million tokens. Kimi K3 is built this way.

FlashAttention · 2022

Same maths, less walking

fast memoryon the chipslow memorysame answer

Exact attention, computed in blocks so the chip stops fetching from slow memory. 3× faster GPT-2 training.

The other half · Mixture of Experts

Ask only two experts

wordrouterE1E2E3E4E5E6E7E88 experts, 2 used per word
wordrouterE1E2E3E4E5E6E7E88 experts, 2 used per word

Each layer is a Group Chat followed by a thinking step. MoE splits the thinking step into experts. Kimi K2 has 1 trillion parameters but uses 32 billion per word.

Cutting the Group Chat Bill. Almost every change to attention since 2017 is a decision about the cache: share it, shrink it, read less of it, or replace it with a running summary.

Notice what linear attention does. It keeps one fixed-size summary and updates it word by word. That is the Telephone Line again, back in a smarter form. The difference is that these new versions can still be trained in parallel, and they are mixed with a few full Group Chat layers that can still look anywhere. I find it funny that the idea attention replaced came back once someone made it fit the chips.

From GPT-2 to Kimi K3

Put the dates side by side and three directions appear. Models got bigger. Attention got cheaper. And from 2024, models were given time to think. Every line below still has the 2017 Group Chat at its centre.

From one paper

The family tree

BiggerCheaper attentionLonger thinking
2017
Transformerattention only, 65M
2018
GPT-1117M
2019
GPT-21.5BMulti-queryone shared cache
2020
Scaling lawsthe Three DialsGPT-3175B
2022
Chinchillamore data, smaller modelFlashAttentionsame maths, faster
2023
Grouped-queryLlama 2Sliding windowMistral 7B
2024
Latent attentionDeepSeek-V2o1thinks before answering
2025
DeepSeek-R1learned to think by RLKimi K21T, 32B per wordSparse attentionDeepSeek V3.2Kimi Linearrunning summaries
2026
Kimi K32.8T, hybrid 3:1DeepSeek V4compressed sparse
Nine years, three directions. Every model on this list still has the 2017 Group Chat at its centre. What changed is how big it got, how cheaply it reads, and how long it is allowed to think.

Raschka has a careful comparison of GPT-2 against modern models, and the surprise in it is how little changed. Positions are now encoded by rotating queries and keys. A few small parts were swapped for simpler or better ones. The feed-forward step was split into experts. The core is the same: query, key, value, softmax, blend.

Seven years apart

What changed after GPT-2

GPT-2, 2019Most models, 2026
Where each word sitsa learned position listpositions rotate Q and K (RoPE)
Cache per headevery head keeps its ownshared (GQA) or zipped (MLA)
How far it readsevery layer reads everythingcheap layers mixed with full ones
The thinking stepone block for every wordmany experts, a few per word
Small partsGELU, LayerNorm, dropoutSwiGLU, RMSNorm, no dropout
The coreQ, K, V, softmax, blendQ, K, V, softmax, blend
GPT-2 against a 2026 model, after Sebastian Raschka’s side-by-side comparisons. The Group Chat survived every change. Most of the edits make it cheaper to run.

The newest models take these changes furthest. DeepSeek’s V4 uses compressed and sparse attention that, its report says, needs 10% of V3.2’s cache at a million tokens. Kimi K3 goes further still, and it is worth its own section.

How Kimi K3 Is Different

Moonshot AI released Kimi K3 in July 2026. It is the clearest picture I know of where the Group Chat has ended up. Sebastian Raschka’s architecture notes call it “essentially a scaled-up production version” of Moonshot’s earlier Kimi Linear model: the same design, taken from 48 billion parameters to 2.8 trillion.

Start with the layers. GPT-2 ran the full Group Chat in every layer. K3 runs it in 24 of its 93. The other 69 use Kimi Delta Attention, which keeps a running summary of fixed size instead of a cache that grows with every word. The technical report lays them out in blocks of three summary layers and one full layer, with one more full layer at the very top.

Layer by layer

GPT-2 against Kimi K3

GPT-2 XL, 2019 48 layers, all full attention

Kimi K3, 2026 69 running-summary, 24 full

Full Group ChatRunning summary (KDA)
Every layer of each model, one square each. GPT-2 runs the full Group Chat in all 48. Kimi K3 runs it in 24 of 93; the other 69 keep a running summary of fixed size. An extra full layer at the very top means the model always finishes with a full look.

Four changes make it work, and none of them throws attention away. Two of them cut the Group Chat Bill. One is new to me: K3 uses the Group Chat on its own layers. Normally each layer simply adds up everything below it. In K3, a layer uses attention to decide which earlier blocks to listen to, which the report calls Attention Residuals.

1 · Kimi Delta Attention

Most layers keep a running summary

thecatsatonthesame size, always

Each word fades the memory a little and rewrites part of it. The memory never grows, however long the chat.

2 · No position numbers

Order comes from forgetting

thecatsatonthemat
older, fainternewer, louder

The full layers get no position information at all. The summary layers forget older words faster, and that is enough to tell order. Raschka calls it the first frontier-level model to do this.

3 · Attention Residuals

A Group Chat between layers

block 1block 2block 3block 4this layerpicks inputs

Normally a layer adds up everything below it equally. In K3, each layer chooses which earlier blocks to listen to, with the same softmax as attention. About 4% more training cost, by Raschka’s count.

4 · Experts

16of 896

experts used for each word

Plus 2 shared experts in every layer. That is how a 2.8 trillion parameter model uses about 104 billion per word.

Four of K3's changes, in plain words. The first two shrink the Group Chat Bill. The third points the Group Chat at the model's own layers. The fourth makes the model enormous while each word only pays for a small part of it.

The part I find most striking is the missing position numbers. Every model since 2017 has had to be told where each word sits, because attention on its own cannot see order. K3’s full layers are told nothing. Its summary layers forget older words faster than recent ones, and that fading is enough to carry the order. Raschka calls it the first frontier-level model to work this way.

2.8Tparameters

104B used per word

1Mtokens

context, with no position encoding

27KiB

cache per token, vs 68.6 for K2 (Raschka’s estimate)

2.5×

better scaling efficiency than K2, per the report

Kimi K3 in four numbers, from Moonshot's technical report and Sebastian Raschka's architecture notes.

So the Group Chat did not go away. It became the expensive step a model calls every fourth layer, and always at the end. Moonshot is still adjusting the mix: by Raschka’s account, the K3.1 Pro weights released in November keep the 69 summary layers and switch the 24 full ones to DeepSeek-style sparse attention.

The Fourth Dial

By 2024 the Three Dials were getting expensive to turn. Then OpenAI found another one. Its o1 model writes a long chain of reasoning before it answers, and OpenAI reported that performance “smoothly improves” with more of this thinking time, as well as with more training. I call it the Fourth Dial: compute spent while answering, not while learning.

2024: a new dial

Three dials, then a fourth

Model size
Data
Training compute
Thinking time

AIME 2024, a hard maths exam

Same question, more thinking

GPT-4o answers at once12%
o1 thinks first, one try74%
o1 majority of 64 tries83%
o1 best of 1,000, re-ranked93%

DeepSeek-R1-Zero, 2025

15.6→71.0%

Same exam, trained by rewarding right answers. Its answers grew longer by themselves.

The Fourth Dial. OpenAI reported that o1 'smoothly improves' with more thinking time as well as more training. DeepSeek showed the same with a model whose design is public: same engine, longer answers.

OpenAI did not say what o1 is built on. DeepSeek did. DeepSeek-R1, in January 2025, was built on the same base as their V3 model. They trained it by rewarding right answers, with no worked examples to copy, and its answers grew longer by themselves. The paper even has a section called the “aha moment”, where the model stops, writes “wait”, and rethinks its approach.

This is why I think attention is the most important part of the architecture. A reasoning model is the same Group Chat, run for longer. Every word of its thinking is a new member of the chat, and every later word can read it. The Group Chat Bill and the KV cache are why long thinking costs what it does.

Is Attention Still All You Need?

The strongest case against my point deserves a fair hearing.

First, attention is not where most of a model’s knowledge sits. Most parameters live in the feed-forward step. In Kimi K2, the model has 1 trillion parameters, mostly in its experts. Second, data and training matter as much as design. Chinchilla won with the same design and better balance. R1 won with the same design and a new way of training. Third, the newest models are moving away from full attention. In K3 three of every four layers are not full attention at all. Raschka goes further and writes that models using full attention in every layer have “effectively disappeared” in the second half of 2026. That is his read of the field, and I have not checked it model by model.

I agree with all three. And I still think the claim holds, for a historical reason. Scaling laws are patterns that people observed, not laws of nature, and they were observed on Transformers. Attention was the first design that let all Three Dials turn at once. Everything since, including the hybrids that use less of it, is a way of keeping those dials turning more cheaply.

Under the Hood

This section is for readers who want the mechanics. Skip it and you lose nothing from the argument.

For the backend reader

The Fuzzy Lookup, in code

// Q, K, V: one row per word
function attention(Q, K, V) {
  const d = K[0].length;
  return Q.map((q) => {
    // 1. score every key
    const s = K.map((k) =>
      dot(q, k) / Math.sqrt(d));
    // 2. scores → shares (sum 1)
    const w = softmax(s);
    // 3. blend the values
    return blend(V, w);
  });
}

The formula in the paper

softmax(QKT / √d) V

QKᵀ is step 1, every query against every key. Softmax is step 2. Multiplying by V is step 3.

Single-head attention without a library, leaving out the mask and the learned matrices that make Q, K and V. Each step is a loop over every pair, which is why GPUs, built for exactly this, matter so much.

Q, K and V are not three inputs. They are three learned projections of the same word vector: Q = xW_Q, K = xW_K, V = xW_V. Each head has its own three matrices, which is how different heads learn to ask different questions.

Why divide by √d? A dot product of two long vectors gets large just because the vectors are long. Large scores push softmax towards giving one word nearly 100%, and training stalls. Dividing by the square root of the vector length keeps the scores in a calm range.

The mask sets every score for a future word to minus infinity before softmax, so its share becomes exactly zero. That is why training is parallel and generation is not. In training every position is predicted at once. In generation the next word does not exist yet.

Attention has no sense of order. Shuffle the words and the scores do not change. Order has to be added. GPT-2 added a learned vector for each position. Most models now use RoPE, which rotates each query and key by an angle that depends on its position, so the score between two words depends on how far apart they are.

The weights are not explanations. Attention maps are tempting to read like a mind, and the “it” example above is clean because I chose a clean example. Real heads are messier, and many do things nobody has named.

If you want to see it run, the Transformer Explainer runs a real GPT-2 in your browser, Brendan Bycroft’s LLM visualisation shows every multiplication in 3D, and Karpathy’s Let’s build GPT writes one from scratch in two hours.

What I Am Watching

One number: the ratio of cheap layers to full Group Chat layers. Kimi Linear and Qwen3-Next settled on 3 to 1. If the next generation pushes that to 7 to 1 without getting worse at finding a fact buried deep in a long document, then the future is mostly running summaries with an occasional full look. If it cannot, full attention stays the part you cannot remove.

A paper about translating English into German gave every word the right to read every other word. That one change made language fit on the chips, and the chips did the rest.

Next time a model answers you, every word of that answer came out of a group chat. Which word was it listening to?

Sources and Further Reading

  • Vaswani et al., Attention Is All You Need (2017). The results, the 8-GPU training times, N = 6 layers, 8 heads, 65M and 213M parameters.
  • The authors: affiliations and the random-order footnote from the paper PDF. Vaswani: Essential AI, Nvidia (reported). Shazeer: back to Google, to OpenAI. Parmar: Anthropic. Uszkoreit: Inceptive. Jones: Sakana AI. Gomez: Cohere and Aleph Alpha. Kaiser: OpenAI. Polosukhin: NEAR.
  • Google Research, Transformer: A Novel Neural Network Architecture for Language Understanding (2017). The animal and street example.
  • Bahdanau, Cho and Bengio, Neural Machine Translation by Jointly Learning to Align and Translate (2014). The first attention, and the bottleneck.
  • OpenAI: GPT-1 (2018), GPT-2 and its paper (2019), GPT-3 (2020), Learning to Reason with LLMs (2024).
  • Kaplan et al., Scaling Laws for Neural Language Models (2020). Hoffmann et al., Chinchilla (2022).
  • Sutton, The Bitter Lesson (2019). Sutskever, O’Reilly interview (2015). Karpathy, on the Transformer (2022).
  • Cheaper attention: Multi-Query, Grouped-Query, Llama 2, Mistral 7B, Gemma 3, FlashAttention, DeepSeek-V2 (MLA), DeepSeek V3.2 sparse attention, Kimi Linear, Qwen3-Next (vendor figures).
  • Experts and big models: Switch Transformer, DeepSeek-V3, Kimi K2, Kimi K3 technical report (HTML) and blog, launch coverage in Fortune, DeepSeek-V4.
  • Reasoning: DeepSeek-R1 (2025).
  • Sebastian Raschka: LLM Architecture Gallery, From GPT-2 to gpt-oss, A Visual Guide to Attention Variants, From Full to Hybrid Attention, Kimi K3 architecture notes and its gallery card.
  • Other explainers worth your time: Jay Alammar’s Illustrated Transformer, 3Blue1Brown’s attention lesson, the Transformer Explainer, Bycroft’s LLM visualisation, Karpathy’s Let’s build GPT.