11.7. The Transformer Architecture — Dive into Deep Learning 1.0.3 documentation
We have compared CNNs, RNNs, and self-attention in Section 11.6.2. Notably, self-attention enjoys both parallel computation and the shortest maximum path length. Therefore, it is appealing to design deep architectures by using self-attention. Unlike earlier self-attention models that still rely on RNNs for input representations (Cheng et al., 2016, Lin et al., 2017, Paulus et al., 2017), the Transformer model is solely based on attention mechanisms without any convolutional or recurrent layer (Vaswani et al., 2017). Though originally proposed for sequence-to-sequence learning on text data, Transformers have been pervasive in a wide range of modern deep learning applications, such as in areas to do with language, vision, speech, and reinforcement learning. As an instance of the encoder–decoder architecture, the overall architecture of the Transformer is presented in Fig. 11.7.1. As we can see, the Transformer is composed of an encoder and a decoder. In contrast to Bahdanau attention for
11.7. The Transformer Architecture — Dive into Deep Learning 1.0.3 documentation 11.7. The Transformer Architecture ¶ Colab [pytorch] Open the notebook in Colab Colab [mxnet] Open the notebook in Colab Colab [jax] Open the notebook in Colab Colab [tensorflow] Open the notebook in Colab SageMaker Studio Lab Open the notebook in SageMaker Studio Lab We have compared CNNs, RNNs, and self-attention in Section 11.6.2 . Notably, self-attention enjoys both parallel computation and the shortest maximum path length. Therefore, it is appealing to design deep architectures by using self-attention.
Explore this link on the map →saved by
related reading
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- transformer_attention.pdfarxiv.org
- The Illustrated Transformer – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- 1706.03762arxiv.org
- Everything About Transformerskrupadave.com
- Transformers from scratch | peterbloem.nlpeterbloem.nl
- Transformer (deep learning) - Wikipediaen.wikipedia.org
- AutoEncoder (三)- Self Attention、Transformer | by Moris | NLP & Speech Recognition Note | Mediummedium.com
- Attention is all you need: Discovering the Transformer paper | Towards Data Sciencetowardsdatascience.com
- Transformers Explained Visually (Part 3): Multi-head Attention, deep dive | Towards Data Sciencetowardsdatascience.com
- A Mathematical Framework for Transformer Circuitstransformer-circuits.pub
- Transformer (deep learning) - Wikipediaen.wikipedia.org