Browse Foundations

What Is an Encoder-Decoder Model?

The architecture behind translation and summarization: one half reads the whole input, the other half writes the output — two specialized stacks instead of one.

Two stacks, two jobs

An encoder-decoder model splits the work in two: the encoder reads the entire input and compresses it into a rich internal representation, then the decoder generates the output step by step, referring back to that representation the whole time. It's a natural fit for tasks where the output isn't just "continue this text" but a genuinely different sequence — translating a sentence into another language, or condensing a document into a summary.

How it differs from a decoder-only model

Most modern chat-style LLMs are decoder-only — a single stack that both reads and writes in one pass. Encoder-decoder models keep the two phases separate, which historically made them a strong fit for tasks with a clear, fixed input (a sentence to translate) and less natural for open-ended conversation.

Where it's still used

Encoder-decoder designs remain common in dedicated translation and summarization systems, where the clean separation between "understand the input fully first" and "generate the output" plays to their strength — even as general-purpose chat assistants have mostly moved to decoder-only architectures.

Frequently Asked Questions

What is an encoder-decoder model?

A neural network architecture split into two parts: an encoder that reads and represents the full input, and a decoder that generates the output based on that representation — commonly used for translation and summarization.

Do chatbots like ChatGPT use encoder-decoder architecture?

No — most modern chat assistants use a decoder-only architecture, a single stack that reads and generates in one continuous pass, rather than separate encoder and decoder stacks.

Keep Exploring