25 side-by-side comparisons of the concepts interviewers ask about most. Understand the tradeoffs, know when to use what, and never confuse the two again.
Encoder-only understands text (BERT); decoder-only generates it (GPT, Llama); encoder-decoder maps input to output (T5, translation). Most modern LLMs are decoder-only.
Attention parallelizes training and reaches long-range dependencies in one hop, which is why transformers displaced RNNs for nearly all sequence modeling.