Encoder–Decoder
Also known as: Seq2Seq Architecture, Encoder-Decoder
An encoder–decoder model splits sequence work in two:
- The encoder reads the source and builds representations (often bidirectional).
- The decoder writes the target, step by step, using those representations via cross-attention.
Classic neural machine translation used RNN encoders and decoders with a single fixed vector between them—the famous bottleneck that soft attention removed. Transformer encoder–decoder models (T5, BART, and many MT systems) keep the split but pass a full sequence of encoder states to the decoder.
Many chat LLMs instead use decoder-only stacks for simplicity and scaling; the encoder–decoder pattern remains strong for translation, summarization, and other clear source→target maps. Training typically pairs teacher forcing on the target with full source context in the encoder.
See also sequence-to-sequence for the task framing this architecture was built to solve.