Skip to main content
ModelTerms

Comparison

Decoder vs Encoder-Decoder

Decoder and Encoder-Decoder are both common AI/LLM terms but cover different ideas. Here is a quick side-by-side.

When you would reach for Decoder

Decoder comes up when the question is fundamentally about architecture.

GPT-4 generating a paragraph token by token.

When you would reach for Encoder-Decoder

Encoder-Decoder comes up when the question is fundamentally about architecture.

T5: every NLP task framed as text-to-text.

Frequently asked

What is the difference between Decoder and Encoder-Decoder?

Decoder: A decoder is a transformer module that generates a sequence one token at a time, using causal self-attention so each token only sees earlier ones. GPT-style LLMs are decoder-only. Encoder-Decoder: An encoder-decoder model has a separate encoder that reads the input and a decoder that generates the output, with cross-attention linking them. T5 and the original transformer are encoder-decoders.

When should I use Decoder vs Encoder-Decoder?

Decoder is the right concept when you are focused on architecture. Encoder-Decoder applies when you are focused on architecture.

Are Decoder and Encoder-Decoder the same thing?

No. Decoder is architecture; Encoder-Decoder is architecture. They are related but address different parts of the AI stack.