Transformer architecture is a deep neural network design built around self-attention. The original form uses an encoder to represent input text and a decoder to generate output text, supporting translation and later LLM designs. section 1.4
Its main components divide the language-processing flow into:
- Encoder: processes input tokens into contextual numerical representations. section 1.4
- Decoder: uses encoded representations to generate output text one word at a time. section 1.4
- Self-attention: weighs tokens relative to one another to capture long-range dependencies and contextual relationships. section 1.4
Figure 1.4 A simplified depiction of the original transformer architecture, which is a deep learning model for language translation. The transformer consists of two parts: (a) an encoder that processes the input text and produces an embedding representation (a numerical representation that captures many different factors in different dimensions) of the text that the (b) decoder can use to generate the translated text one word at a time. This figure shows the final stage of the translation process where the decoder has to generate only the final word (“Beispiel”), given the original input text (“This is an example”) and a partially translated sentence (“Das ist ein”), to complete the translation.
Trace the encoder-decoder data flow through a translation example, ending with the decoder predicting “Beispiel” from partial context. section 1.4



























