Where did the Transformer come from?
Vaswani and colleagues introduced the Transformer in the 2017 paper "Attention Is All You Need" [1]. At the time, the leading sequence transduction models were built on complex recurrent or convolutional neural networks. The new architecture dropped recurrence and convolution altogether and relied on attention alone [1]. On the WMT 2014 English-to-German translation task it reached 28.4 BLEU while taking far less time to train [1].
How does a Transformer work?
It has two halves. An encoder turns the input text into an intermediate representation, and a decoder turns that representation into useful text [3]. Self-attention asks, for each token, how much every other token in the input affects how this one should be read [3].
A 2017 Google Research post explains why that matters. A recurrent network reads text one word at a time, so linking two distant words takes many sequential steps; a Transformer needs only a small, constant number of steps and parallelises well on hardware such as GPUs and TPUs [2]. The post's example is the word "bank", which can mean a financial institution or a riverside. When the sentence mentions a river, the Transformer can connect "bank" to "river" in a single step and pick the right meaning [2].
Where are Transformers used?
Machine translation was the first target [1]. Today large language models are built on the architecture, and a full Transformer can contain hundreds of billions or even trillions of parameters [3].