Skip to content
ai

Decoder

Transformer Decoder

Definition

The decoder is the component of a transformer that generates output sequences token-by-token using causal (masked) self-attention to prevent attending to future tokens, plus cross-attention over encoder outputs in encoder-decoder architectures. GPT-style models are decoder-only, using causal self-attention without cross-attention.

Decoders are responsible for the autoregressive generation behavior of modern LLMs.


Ship secure code faster

Crash Override integrates security into the developer workflow. No context switching, no waiting on reviews.