AI engineering glossary · Transformers LLM architecture

What is decoder?

Decoder: The part of a Transformer that generates output one token at a time, using causal self-attention over what it has produced so far and, in encoder-decoder models, cross-attention to the encoder output. It ends with a layer that converts vectors into next-token probabilities.

Level: beginnerTopic: Transformers LLM architecture

Decoder: an example

A translation decoder produces Hindi tokens one by one, each conditioned on earlier Hindi tokens and the English encoding.

Related terms

More Transformers LLM architecture terms

Where you learn it

Decoder is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.