What Is a Decoder-Only Model?
The architecture behind GPT, Claude, and nearly every modern chat assistant: a single stack that reads and generates text in one continuous pass.
One stack, doing everything
A decoder-only model uses a single transformer stack for both understanding the input so far and generating what comes next, one token at a time, each new token conditioned on everything before it. There's no separate "read the input first" phase like an encoder-decoder model — reading and writing happen in the same continuous process.
Why it became the default
This design maps naturally onto the next-token-prediction objective that pretraining uses, and it scales cleanly to open-ended tasks — a conversation, a long document, freeform code — where there's no fixed, separate "input" to fully digest before responding starts.
The tradeoff
Because generation happens strictly left to right, a decoder-only model can't revise an earlier token in light of a later one the way some other architectures can — once a token is generated, it's part of the fixed context for everything after it. In practice this hasn't limited quality much at scale, which is a large part of why the architecture won out.
Frequently Asked Questions
What is a decoder-only model?
A transformer architecture that uses a single stack to both read context and generate output, one token at a time — the design behind most modern LLMs, including GPT and Claude.
Why do most LLMs use decoder-only architecture instead of encoder-decoder?
It maps naturally onto next-token-prediction pretraining and handles open-ended tasks like conversation well, without needing a separate fixed input to process before generation starts.