For a task such as translation, a model must process the input before generating an output. A full transformer combines an encoder, which processes input, with a decoder, which generates output. The decoder receives the encoder’s representation through a multihead attention block. Attention replaces recurrence as the architecture’s central mechanism, allowing inputs to be processed in parallel rather than sequentially as in an LSTM. section 2.3.3 section 2.3
Choose the arrangement and training plan together:
- Use the full encoder–decoder arrangement when both input processing and generation matter, as in translation or summarization. T5 is an example. The full arrangement is bulkier and slower than either half alone. section 2.3.3
- Expect substantial training demands: transformers are memory-intensive and require large amounts of data and VRAM. Parallelism makes large-scale computation practical, but does not remove those costs. section 2.3.3 section 5.2
- When training from scratch, choose the layer arrangement for the task, dataset and available compute; then prepare and tokenize diverse text before optimizing the model. section 5.2.1
Figure 2.7 A full transformer visualized. A full transformer combines the encoder and the decoder and does well on all of the tasks of each, as well as conditional generation tasks such as summarization and translation. Because transformers are bulkier and slower than each of their halves, researchers and businesses have generally opted to use those halves over the whole transformer.
The diagram shows where encoder output enters the decoder and why the combined arrangement suits conditional generation. section 2.3.3
Strong language-model performance is not the same as complete linguistic understanding. Even state-of-the-art transformers are described here as making semantic approximations; typical uses do not model pragmatics or phonetics. section 2.3.3



























