Skip to main content
Independent Digital Museum of Artificial IntelligenceELEL

Exhibit 5.3

2017 · research architecture

The Transformer

The Transformer was introduced in 2017 as an attention-based sequence architecture, dispensing with recurrence and convolution in its proposed core design. It is not identical to every later language model.

Technical diagram of the full Transformer architecture.
Technical diagram of the Transformer architecture. Creator: Daniel Voigt Godoy (dvgodoy), CC BY 4.0, via Wikimedia Commons. · Technical diagram of the Transformer architecture. Creator: Daniel Voigt Godoy (dvgodoy), CC BY 4.0, via Wikimedia Commons. · Daniel Voigt Godoy (dvgodoy), CC BY 4.0, via Wikimedia Commons. · Image source

Interactive exhibit · Transformer microscope

Watch an attention head calculate relationships

Type or choose a sentence. Then select a token and inspect, step by step, how it is compared with every other token.

What this should make clear: attention is not one general list of “important words”. Each position computes its own distribution of weights.

1. Select the token making the “query”

2. Switch attention head

3. Select a relationship to inspect the calculation

Token + position
Q, K, V and attention
Context vector
Following layers

What is real: the scaled dot-product attention and softmax calculation runs locally in your browser.

What is pedagogical: the four-dimensional vectors and three heads are synthetic, not weights from GPT, BERT or another trained model. To explore subword tokenisation as well, open the full LAB-04 experiment.

New interactive exhibit · Museum Reconstruction Experience

How the Transformer works

See step by step how the Transformer translates a sentence: tokens, vectors and position, attention, 6 encoder layers, the decoder that writes one token at a time, and the output probabilities. BERT and the GPT models were built on this architecture.

  • Specified in the original paper
  • Schematic rendering of the architecture
  • Illustrative values

Every part states what is documented, what is reconstructed from published descriptions and what is illustrative or simulated. The stages describe the digital reconstruction.

In 3D Room 5 you open it with the “How it works · step-by-step reconstruction” button in the showcase panel.

Text description of the reconstruction
  1. From words to tokens. In 2017 eight researchers at Google presented the Transformer in the paper “Attention Is All You Need”, for machine translation. The first step is to cut the sentence into tokens, that is, words or pieces of words. For English–German translation the vocabulary had about 37,000 shared tokens. Certain: the paper, the translation task and the vocabulary size (byte-pair encoding). Illustrative: the example sentence “The cat sat on the mat” and its split into whole words.
  2. Numbers and position. Each token becomes a vector of 512 numbers (an embedding). The Transformer does not read word order by itself, so a “position signature” made of sines and cosines of different frequencies is added to each vector. The wave you see is computed with the paper’s formula. Certain: a 512-dimensional vector and the formula PE(pos, 2i) = sin(pos / 10000^(2i/512)). Schematic: 12 of the 512 dimensions are shown. Illustrative: the embedding values, which in practice are learned.
  3. Attention: every word looks at all the others. The heart of the Transformer is self-attention. Each token makes three vectors: a query (Q), a key (K) and a value (V). It compares its query with the keys of all the others and takes a weighted average of their values: softmax(QKᵀ/√64)·V. This way “sat” can “pay attention” to “cat”. It happens with 8 heads in parallel, each focusing on different relations. Certain: the scaled attention formula, the 8 heads and d_k = 64. Illustrative: the thickness of the lines; the weights here are chosen to explain, not computed by a trained model.
  4. The encoder: 6 layers. The encoder has 6 identical layers. Each has multi-head attention and a feed-forward network with 2048 neurons, with residual connections and normalisation. Because all tokens are processed together rather than one by one, as in older recurrent networks, training on graphics cards became much faster. Certain: N = 6, d_model = 512, d_ff = 2048, residual connections and layer normalisation. Schematic: the layers are shown as slabs and the rising light shows the order of computation.
  5. The decoder writes the translation. The decoder also has 6 layers. It writes the German sentence one token at a time: “Die”, “Katze”, “saß”… Each new token looks only at what has already been written (the “mask” hides what comes next) and, through cross-attention, at the parts of the English sentence it needs. The token produced is fed back as input for the next step. Certain: 6 decoder layers, masked self-attention, cross-attention and generation one token at a time. Illustrative: the word alignment that lights up; a real model spreads its attention in more complex ways.
  6. Probabilities and legacy. At each step the Transformer gives a probability to every token in the vocabulary and chooses among the most likely. The base model had about 65 million parameters, the big one about 213 million, trained in 3.5 days on 8 graphics cards. It achieved the best results of its time in English–German translation. The same architecture became the basis of BERT, the GPT series and ChatGPT. Certain: the parameters, training time and the BLEU score of 28.4 (big model, English–German, WMT 2014), according to the paper. Illustrative: the probability bars. GPT and BERT use only one of the two halves (decoder or encoder).
  • Encoding the sentence: Words → tokens → vectors + position → 6 encoder layers. In each layer every token “looks at” all the others through self-attention and then passes through a small neural network. All tokens are processed at the same time.
  • Generating the translation: The decoder produces one token at a time. It looks only at the tokens it has already written (masked self-attention) and at the encoder’s output (cross-attention). At the end a linear layer and the softmax function give a probability for every word in the vocabulary.

Main sources:

  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., Polosukhin, I. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems 30. arxiv.org/abs/1706.03762
  • Sennrich, R., Haddow, B., Birch, A. (2016). Neural Machine Translation of Rare Words with Subword Units. ACL 2016. arxiv.org/abs/1508.07909
  • Bahdanau, D., Cho, K., Bengio, Y. (2015). Neural Machine Translation by Jointly Learning to Align and Translate. ICLR 2015. arxiv.org/abs/1409.0473
  • Devlin, J. et al. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. NAACL 2019. arxiv.org/abs/1810.04805
  • Radford, A. et al. (2018). Improving Language Understanding by Generative Pre-Training. OpenAI.

Why it is in the museum

Language is treated as a prediction problem. From Shannon’s statistical sequences, the story leads to Transformers and large language models.

What supports this exhibit

Primary conference paper

The Transformer architecture and its use of self-attention.

Main source: Vaswani, A. et al. (2017), “Attention Is All You Need”, NeurIPS.

Open the source

What to keep in mind: Primary source.

Full documentation
Permanent accession ID
MTN-0028
Exhibition position
5.3
Title
The Transformer
Date
2017 · research architecture
Creator / responsible institution
Vaswani
Evidence type
Primary conference paper
Original / reproduction status
Licensed technical diagram: not a Independent Digital Museum of Artificial Intelligence curatorial rendering
Provenance / custody history
The architecture is documented in Vaswani and colleagues’ “Attention Is All You Need” (2017). The displayed diagram is Daniel Voigt Godoy’s openly licensed Wikimedia Commons drawing (CC BY 4.0), not the paper’s original figure. The technical source and the image author are distinct.
Primary documentary source
Vaswani, A. et al. (2017), “Attention Is All You Need”, NeurIPS.
Image rights
Technical diagram of the Transformer architecture. Creator: Daniel Voigt Godoy (dvgodoy), CC BY 4.0, via Wikimedia Commons. · Daniel Voigt Godoy (dvgodoy), CC BY 4.0, via Wikimedia Commons. · /img/commons/Transformer__full_architecture.png
Certainty
Claim-level certainty has not yet been reviewed.
Last curatorial review
2026-10-14
Next review
2027-10-16
Visual documentation review
2026-10-12 · v7.85.4

Relationships to other exhibits

This record separates the evidence from its visual representation and records provenance, rights and curatorial relationships.

What is known, and how confidently

  1. Documented

    Vaswani and colleagues submitted “Attention Is All You Need” in June 2017 and presented it at NeurIPS 2017.

    Vaswani et al. (2017), Attention Is All You Need, NeurIPS / arXiv

  2. Documented

    The original Transformer uses attention mechanisms in place of recurrent or convolutional networks commonly used in earlier sequence models.

    Vaswani et al. (2017), Attention Is All You Need, NeurIPS / arXiv

  3. Educational simplification

    Attention diagrams can explain relations between positions in a sequence but do not reveal the full reasoning of any particular modern LLM.

    Vaswani et al. (2017), Attention Is All You Need, NeurIPS / arXiv

Primary and technical sources

What the image or diagram shows

The interactive attention display is a teaching example, not a recording of actual model weights.

Provenance and rights

The specific image’s provenance and licence were not independently reverified in this phase, beyond explicitly cited records. Rights to third-party images must not be assumed.

AI conversation

The exhibit conversation is a separate AI feature. The exact model per response and independent expert validation of each result have not been verified. Citations alone do not guarantee accuracy.

Scope and limits

Curatorial reading of selected primary or institutional sources and inspection of local code. Not independent scientific, legal or museum certification.

Citation & editorial transparency

Suggested citation

Independent Digital Museum of Artificial Intelligence. (2026). “The Transformer”. https://www.mouseiotn.eu/en/exhibits/transformer/

Curated by: Konstantinos Koustas · Permanent accession ID: MTN-0028 · Exhibition position: 5.3 · Last curatorial review: 2026-10-14.

Original curatorial text licence: CC BY-SA 4.0. This licence does not cover third-party material listed separately.

If you spot an error, keep the collection number and main source. The correction and reclassification process is described in the Collections Policy.

Follow the thread

Continue from here

The collection is not a set of isolated pages. See how this object connects to what came before or after.

Open the connections map

Interactive exhibit

Talk to the exhibit

Curatorial dialogue · AI

The suggested questions open curated extracts. You can also submit a question when the live service is available.

The exhibit’s “voice” is a curatorial reconstruction, not an authentic statement or actual consciousness. Documented fact, interpretation, reconstruction and uncertainty remain distinct.

Preset questions use the exhibit record in your browser. If you submit a free-text question, its text, the exhibit ID and language go to the museum API and may be forwarded to an external AI provider. Answers can contain errors. Do not enter personal information. Privacy.