The Two Transformer Lineages
Every major LLM traces back to one of two design choices made in 2017–2018. The original "Attention Is All You Need" paper introduced a full encoder-decoder stack — an encoder that reads all input tokens in parallel and a decoder that generates output tokens one at a time. BERT took just the encoder half for classification and span-prediction tasks. GPT took just the decoder half and showed you could do almost everything with next-token prediction.
Today, the vast majority of capable open-weight and proprietary models — Llama 3, Mistral, GPT-4, Gemini Ultra, DeepSeek-V3 — are decoder-only. Encoder-decoder models (T5, Flan-T5, Gemini's early versions) still dominate translation, summarization, and tasks where you always have a fixed input before generation begins.
The lineage matters because it dictates the attention mask, training objective, KV-cache shape, and even how you fine-tune.
