The Reading Room

Transformers

The Reading Room

What if each word could look directly at the words it needs?

Take the word “bank.” Is it beside a river, or somewhere you keep your money?

Now try a different kind of sentence:

What does “it” refer to?

The animal wouldn't cross the road because it was too busy.

Tap one

What Is a Transformer? How Attention Works

A Transformer is an architecture that lets each position in a sequence draw information directly from other positions — with different strengths — instead of only carrying a message step by step. Attention is the mechanism that makes those direct links.

How does attention work?

Attention lets one position look at others and mix in what it needs. Stronger connections mean more influence; weaker ones matter less. Self-attention is when positions in the same sequence attend to one another.

Why were Transformers invented?

Earlier models often moved information step by step through a sequence, which made long-range links harder and limited parallelism. Transformers were designed so positions could connect more directly — the idea popularized by the “Attention Is All You Need” paper.

Predicting what comes next

With attention and information about order in place, the model builds contextual representations and can predict what comes next in the sequence — the same family of ideas behind modern language models.