# Encoder-Decoder Architecture

- **Canonical URL:** https://getaimath.com/dictionary/encoder-decoder-architecture/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is Encoder-Decoder Architecture?

**In one sentence:** An encoder-decoder architecture is a model design with two parts: one that reads and understands the input, and one that writes the output.

The encoder turns the input into meaningful numbers, and the decoder uses those numbers to produce something new. This setup works especially well when the input and output are different, like translating English to French, or turning speech into text.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Encoder-Decoder Architecture?

A translation model reads a German sentence with its encoder and writes the English version with its decoder.

## Why does Encoder-Decoder Architecture matter?

This design is still popular for translation, summarizing and speech recognition, such as Whisper and T5.

## Related Concepts

- [Decoder](https://getaimath.com/dictionary/decoder/): A decoder is the part of a model that produces output, one piece at a time, such as writing a sentence word by word.
- [Autoregressive Model](https://getaimath.com/dictionary/autoregressive-model/): An autoregressive model creates output one piece at a time, using everything it has created so far to choose the next piece.
- [Encoder](https://getaimath.com/dictionary/encoder/): An encoder is the part of a model that reads an input and turns it into a set of numbers that capture its meaning.
- [Causal Language Model](https://getaimath.com/dictionary/causal-language-model/): A causal language model predicts the next word using only the words that came before it, never the ones after.
- [GPT (Generative Pre-trained Transformer)](https://getaimath.com/dictionary/gpt-generative-pre-trained-transformer/): GPT stands for Generative Pre-trained Transformer, a family of language models by OpenAI that generate text after being pre-trained on huge amounts of data.
- [Masked Language Model](https://getaimath.com/dictionary/masked-language-model/): A masked language model learns by filling in blanks: some words in a sentence are hidden and the model guesses them using words on both sides.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/encoder-decoder-architecture/)
