Decoder-Only Architecture

Category: Neural Networks & Architectures

A transformer variant that uses only the decoder with causal self-attention, generating output tokens autoregressively.

Full Explanation

Decoder-only architectures use only the decoder portion of the transformer with causal (left-to-right) self-attention masking, where each position can only attend to previous positions. This makes them naturally suited for autoregressive text generation, where tokens are generated one at a time from left to right. GPT, LLaMA, Mistral, and most modern large language models use the decoder-only architecture. Despite lacking a separate encoder, decoder-only models process input by treating it as a prefix that conditions the generation. They have proven to be highly effective and scalable, achieving state-of-the-art performance on a vast range of tasks through in-context learning and instruction following. The simplicity of the decoder-only design (one uniform stack of transformer blocks) contributes to efficient training and scaling.

Related Terms

More in Neural Networks & Architectures

Explore More

  • AI Tools Library — Discover AI tools related to Decoder-Only Architecture
  • AI Education — Courses to learn about Neural Networks & Architectures
  • AI News — Latest news and updates