# Transformer (2017)

> A translation model built only from attention, and the architecture behind every large language model since.

Page: https://mralbu.github.io/ai-datasets/p/transformer

## Key facts

- Title: Attention Is All You Need
- Authors: Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, Illia Polosukhin
- Venue: NeurIPS 2017
- Category: Text
- Paper: https://www.alphaxiv.org/abs/1706.03762

## Why it matters

Without recurrence, a whole sequence can be processed in parallel, so Transformers make full use of GPUs and keep improving as they get bigger. BERT, GPT and nearly every language, vision and speech model that followed use this architecture with few changes.

## The idea

Drop recurrence entirely. Each layer lets every position attend to every other position through several attention heads in parallel, followed by a small feed-forward network, with residual connections and position encodings to keep word order.

## The result

28.4 BLEU on WMT 2014 English–German, more than 2 BLEU above the previous best including ensembles, after 3.5 days of training on eight GPUs.

## The data

- [WMT14 English–German (2014)](https://mralbu.github.io/ai-datasets/d/wmt14.md): 4.5M English–German sentence pairs: the benchmark in the Transformer paper.

## Builds on

- [Attention for translation (2014)](https://mralbu.github.io/ai-datasets/p/bahdanau-attention.md)
- [ResNet (2015)](https://mralbu.github.io/ai-datasets/p/resnet.md)

## Led to

- [BERT (2018)](https://mralbu.github.io/ai-datasets/p/bert.md)
- [GPT-2 (2019)](https://mralbu.github.io/ai-datasets/p/gpt-2.md)
- [T5 (2019)](https://mralbu.github.io/ai-datasets/p/t5.md)
- [Conformer (2020)](https://mralbu.github.io/ai-datasets/p/conformer.md)
- [DETR (2020)](https://mralbu.github.io/ai-datasets/p/detr.md)
- [Informer (2020)](https://mralbu.github.io/ai-datasets/p/informer.md)
- [RAG (2020)](https://mralbu.github.io/ai-datasets/p/rag.md)
- [ViT (2020)](https://mralbu.github.io/ai-datasets/p/vit.md)
- [wav2vec 2.0 (2020)](https://mralbu.github.io/ai-datasets/p/wav2vec2.md)
- [CLIP (2021)](https://mralbu.github.io/ai-datasets/p/clip.md)
- [FT-Transformer (2021)](https://mralbu.github.io/ai-datasets/p/ft-transformer.md)
- [PatchTST (2022)](https://mralbu.github.io/ai-datasets/p/patchtst.md)
- [TabPFN (2022)](https://mralbu.github.io/ai-datasets/p/tabpfn.md)
- [Whisper (2022)](https://mralbu.github.io/ai-datasets/p/whisper.md)

## Part of

- [Pretrain, then fine-tune](https://mralbu.github.io/ai-datasets/t/pretrain-then-finetune.md) (step 3 of 5)
- [Scaling language models](https://mralbu.github.io/ai-datasets/t/llm-scaling.md) (step 1 of 5)
