The Sequential Bottleneck of RNNs and LSTMs

Before 2017, sequence modeling meant recurrent networks. LSTMs and GRUs processed tokens strictly one step at a time, compressing everything seen so far into a fixed-size hidden vector. Even with gating mechanisms and Bahdanau attention bolted onto encoder-decoder models, training speed remained fundamentally bound by sequence length: step t could not begin until step t−1 finished.

That sequential dependency had two severe consequences. Long-range dependencies still decayed across hundreds of steps, and hardware utilization hit a wall just as GPUs were becoming vastly better at dense matrix multiplications than serial loops.

Self-Attention as a Hardware-Native Primitive

Vaswani et al. made a deceptively simple bet: drop recurrence and convolutions altogether, and let every token attend directly to every other token in a single layer. With scaled dot-product attention, information travels between any two positions in O(1) graph hops rather than O(n), while every position across the entire sequence computes in parallel through batched GEMMs.

Multi-head attention let the network learn distinct subspace projections simultaneously—some heads tracking syntactic agreement, others resolving coreference or positional offsets—while residual connections and layer normalization stabilized deep stacks of identical blocks.

Why Decoder-Only Won the Scaling Race

The original paper introduced an encoder-decoder design tailored for machine translation. Yet within a few years, the industry converged overwhelmingly on causal decoder-only stacks for general intelligence. Predicting the next token under a causal mask uses 100% of tokens in every training window for supervision, unifies pre-training and generation into one objective, and maps cleanly onto KV-cached autoregressive decoding.

Almost a decade later, nearly every frontier model—dense or sparse, text or multimodal—still runs on the exact same residual stream + attention + MLP skeleton laid down in 2017.