{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"one-architecture-ate-everything","title":"One architecture ate everything","url":"https://addaly.com/learn/ai-actually-explained/one-architecture-ate-everything","position":47,"of":92,"minutes":9,"answer":"The transformer enabled parallel computation across known training positions and direct masked attention to context. Autoregressive generation still proceeds token by token, and successful adaptations to other domains require specialised design and evaluation.","keyIdea":"The transformer enabled parallel computation across known training positions and direct masked attention to context. Autoregressive generation still proceeds token by token, and successful adaptations to other domains require specialised design and evaluation."},"body":{"format":"markdown","text":"## Eight authors and a translation problem\n\nIn June 2017 eight authors published \"Attention Is All You Need\", introducing the transformer and evaluating machine translation. It was part of a wider history of attention and sequence modelling. Its later use in many language models made the paper influential, but the design does not underlie every chatbot or every AI system.\n\nEarlier lessons explained why parallelisable training mattered. This lesson examines the recurrent and convolutional sequence models the transformer was compared with, how its attention works, and why related designs were adapted to several other domains.\n\n## What it replaced\n\nRecurrent networks were an important approach to sequence modelling before 2017, alongside convolutional and other designs. A recurrent state carries information from earlier positions to later ones. Long short-term memory, introduced in 1997, added mechanisms for retaining and updating information; it was not the only earlier design.\n\nRecurrence creates a dependency across positions within a sequence, which can limit training parallelism. Preserving distant information through recurrent states can also be difficult, although gates and attention helped. There is no general rule that a forty-word sentence erases its first ten words, nor that GPUs doing recurrent work must be mostly idle.\n\nDuring training, the transformer can compute representations for many known sequence positions in parallel within a layer. Attention connects positions allowed by a mask: an encoder may use the full input, while a causal decoder can use only earlier positions and its current input position. Layers still depend on earlier layers. At ordinary generation time the next output token is not yet known, so autoregressive decoding remains sequential. Direct connections to distant context help, but do not guarantee correct recall.\n\nThe model also needs information about position, because the same words in a different order can mean something different. The original transformer added positional encodings to token representations. Later designs use other position mechanisms. Parallel computation does not mean that order is absent from the computation or from the causal mask.\n\n## The 2018 fork\n\nTwo influential 2018 developments used related parts of the architecture differently. BERT used an encoder and masked-word pretraining, together with an additional sentence objective in its original version. GPT used a decoder-style, next-token objective. These are useful landmarks, rather than an exhaustive two-way split of the field. Google described applying BERT to Search in 2019; its release in 2018 did not instantly replace all search ranking.\n\nGenerative systems attracted public attention because they produce text people can inspect. Encoder-based models also remain useful for representation and classification tasks. Different products can combine these approaches with other components; a product's quiet or visible interface does not identify its architecture.\n\n## Pretrain, then adapt and evaluate\n\nLarge-scale pretraining followed by adaptation became especially influential with these models. Transfer learning was older than the transformer, and some tasks still benefit from specialised models. A broadly trained model can provide a useful starting point; supervised instruction training or preference optimisation can then alter its behaviour for an assistant. That does not make one model optimal for every text task.\n\n## Adaptations beyond text\n\nVision Transformer in 2020 represented images as sequences of patches and achieved strong classification results with large-scale pretraining. Whisper's 2022 paper described an encoder-decoder transformer trained on 680,000 hours of audio. AlphaFold2 achieved a major protein-structure prediction advance at CASP14 in 2020 using a specialised architecture with attention. These are adaptations with domain-specific inputs, objectives and components, not proof that every problem is the same sequence or that protein science was solved.\n\n> Figure: Parallel training, positions and masked attention. Steps: 1. Known training positions enter together (Representations at many known positions can be computed in parallel within a layer; later layers still wait on earlier results.); 2. Position information represents order (The original design added positional encodings, so sequences with the same words in different orders can be represented differently.); 3. Attention connects allowed positions (An encoder can use the whole input; a causal decoder masks later positions. Direct connections do not guarantee correct recall.); 4. Layers combine learned transformations (Attention and feed-forward sublayers refine representations; no fixed grammar-to-meaning sequence is guaranteed.); 5. Other domains adapt the design (Vision Transformer uses image patches; Whisper uses audio representations; AlphaFold2 adds specialised structure and components.). A transformer can process many known training positions in parallel within a layer. Attention obeys a mask, position information represents order, and layers remain dependent. Ordinary autoregressive generation still produces one token after another. Applications to other domains adapt inputs, objectives and components.\n\n## The cost the design carries\n\nIn standard dense self-attention, the number of position pairs grows quadratically: doubling sequence length gives four times as many pairs. This describes one component, not a universal fourfold increase in total runtime or cost. Masks, caches, efficient attention implementations and alternative architectures change the practical calculation. State-space models such as Mamba, introduced in 2023, explore other sequence-computation trade-offs; comparing them requires a specified task, model and resource budget."},"check":{"question":"Which advantage did the original transformer offer over recurrent processing during training?","options":[{"text":"It guaranteed understanding of grammar, making task evaluation unnecessary once enough chips were connected.","correct":false,"tempting":"Architecture alone does not establish reliable understanding or remove evaluation."},{"text":"It removed the need for training examples because attention supplied the correct output itself.","correct":false,"tempting":"Attention is trained using data; it does not supply labels automatically."},{"text":"It allowed parallel computation across known positions, while masks and layer dependencies still constrained attention.","correct":true},{"text":"It generated every future token simultaneously, eliminating the sequential dependency of ordinary autoregressive decoding.","correct":false,"tempting":"Known training targets differ from future tokens not yet generated."}]},"prev":{"slug":"the-chip-built-for-games","title":"The chip that was built for games","url":"https://addaly.com/learn/ai-actually-explained/the-chip-built-for-games"},"next":{"slug":"bigger-kept-working","title":"Bigger kept working, and the argument about why","url":"https://addaly.com/learn/ai-actually-explained/bigger-kept-working"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'One architecture ate everything', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/one-architecture-ate-everything (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"One architecture ate everything","courseTitle":"AI, Actually Explained","module":{"index":5,"slug":"how-it-got-here","title":"How it got here, and what changed in 2022"},"answer":null,"keyIdea":"The transformer enabled parallel computation across known training positions and direct masked attention to context. Autoregressive generation still proceeds token by token, and successful adaptations to other domains require specialised design and evaluation.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"flow","title":"Parallel training, positions and masked attention","caption":"A transformer can process many known training positions in parallel within a layer. Attention obeys a mask, position information represents order, and layers remain dependent. Ordinary autoregressive generation still produces one token after another. Applications to other domains adapt inputs, objectives and components.","steps":[{"label":"Known training positions enter together","detail":"Representations at many known positions can be computed in parallel within a layer; later layers still wait on earlier results."},{"label":"Position information represents order","detail":"The original design added positional encodings, so sequences with the same words in different orders can be represented differently."},{"label":"Attention connects allowed positions","detail":"An encoder can use the whole input; a causal decoder masks later positions. Direct connections do not guarantee correct recall."},{"label":"Layers combine learned transformations","detail":"Attention and feed-forward sublayers refine representations; no fixed grammar-to-meaning sequence is guaranteed."},{"label":"Other domains adapt the design","detail":"Vision Transformer uses image patches; Whisper uses audio representations; AlphaFold2 adds specialised structure and components."}]},"alt":"Figure: Parallel training, positions and masked attention. Steps: 1. Known training positions enter together (Representations at many known positions can be computed in parallel within a layer; later layers still wait on earlier results.); 2. Position information represents order (The original design added positional encodings, so sequences with the same words in different orders can be represented differently.); 3. Attention connects allowed positions (An encoder can use the whole input; a causal decoder masks later positions. Direct connections do not guarantee correct recall.); 4. Layers combine learned transformations (Attention and feed-forward sublayers refine representations; no fixed grammar-to-meaning sequence is guaranteed.); 5. Other domains adapt the design (Vision Transformer uses image patches; Whisper uses audio representations; AlphaFold2 adds specialised structure and components.). A transformer can process many known training positions in parallel within a layer. Attention obeys a mask, position information represents order, and layers remain dependent. Ordinary autoregressive generation still produces one token after another. Applications to other domains adapt inputs, objectives and components."}},"blocks":[{"t":"h2","id":"eight-authors-and-a-translation-problem","runs":[{"text":"Eight authors and a translation problem"}]},{"t":"p","runs":[{"text":"In June 2017 eight authors published “Attention Is All You Need”, introducing the transformer and evaluating machine translation. It was part of a wider history of attention and sequence modelling. Its later use in many language models made the paper influential, but the design does not underlie every chatbot or every AI system."}]},{"t":"p","runs":[{"text":"Earlier lessons explained why parallelisable training mattered. This lesson examines the recurrent and convolutional sequence models the transformer was compared with, how its attention works, and why related designs were adapted to several other domains."}]},{"t":"h2","id":"what-it-replaced","runs":[{"text":"What it replaced"}]},{"t":"p","runs":[{"text":"Recurrent networks were an important approach to sequence modelling before 2017, alongside convolutional and other designs. A recurrent state carries information from earlier positions to later ones. Long short-term memory, introduced in 1997, added mechanisms for retaining and updating information; it was not the only earlier design."}]},{"t":"p","runs":[{"text":"Recurrence creates a dependency across positions within a sequence, which can limit training parallelism. Preserving distant information through recurrent states can also be difficult, although gates and attention helped. There is no general rule that a forty-word sentence erases its first ten words, nor that GPUs doing recurrent work must be mostly idle."}]},{"t":"p","runs":[{"text":"During training, the transformer can compute representations for many known sequence positions in parallel within a layer. Attention connects positions allowed by a mask: an encoder may use the full input, while a causal decoder can use only earlier positions and its current input position. Layers still depend on earlier layers. At ordinary generation time the next output token is not yet known, so autoregressive decoding remains sequential. Direct connections to distant context help, but do not guarantee correct recall."}]},{"t":"p","runs":[{"text":"The model also needs information about position, because the same words in a different order can mean something different. The original transformer added positional encodings to token representations. Later designs use other position mechanisms. Parallel computation does not mean that order is absent from the computation or from the causal mask."}]},{"t":"h2","id":"the-2018-fork","runs":[{"text":"The 2018 fork"}]},{"t":"p","runs":[{"text":"Two influential 2018 developments used related parts of the architecture differently. BERT used an encoder and masked-word pretraining, together with an additional sentence objective in its original version. GPT used a decoder-style, next-token objective. These are useful landmarks, rather than an exhaustive two-way split of the field. Google described applying BERT to Search in 2019; its release in 2018 did not instantly replace all search ranking."}]},{"t":"p","runs":[{"text":"Generative systems attracted public attention because they produce text people can inspect. Encoder-based models also remain useful for representation and classification tasks. Different products can combine these approaches with other components; a product’s quiet or visible interface does not identify its architecture."}]},{"t":"h2","id":"pretrain-then-adapt-and-evaluate","runs":[{"text":"Pretrain, then adapt and evaluate"}]},{"t":"p","runs":[{"text":"Large-scale pretraining followed by adaptation became especially influential with these models. Transfer learning was older than the transformer, and some tasks still benefit from specialised models. A broadly trained model can provide a useful starting point; supervised instruction training or preference optimisation can then alter its behaviour for an assistant. That does not make one model optimal for every text task."}]},{"t":"h2","id":"adaptations-beyond-text","runs":[{"text":"Adaptations beyond text"}]},{"t":"p","runs":[{"text":"Vision Transformer in 2020 represented images as sequences of patches and achieved strong classification results with large-scale pretraining. Whisper’s 2022 paper described an encoder-decoder transformer trained on 680,000 hours of audio. AlphaFold2 achieved a major protein-structure prediction advance at CASP14 in 2020 using a specialised architecture with attention. These are adaptations with domain-specific inputs, objectives and components, not proof that every problem is the same sequence or that protein science was solved."}]},{"t":"h2","id":"the-cost-the-design-carries","runs":[{"text":"The cost the design carries"}]},{"t":"p","runs":[{"text":"In standard dense self-attention, the number of position pairs grows quadratically: doubling sequence length gives four times as many pairs. This describes one component, not a universal fourfold increase in total runtime or cost. Masks, caches, efficient attention implementations and alternative architectures change the practical calculation. State-space models such as Mamba, introduced in 2023, explore other sequence-computation trade-offs; comparing them requires a specified task, model and resource budget."}]}],"check":{"question":[{"text":"Which advantage did the original transformer offer over recurrent processing during training?"}],"options":[{"text":[{"text":"It guaranteed understanding of grammar, making task evaluation unnecessary once enough chips were connected."}],"correct":false,"tempting":[{"text":"Architecture alone does not establish reliable understanding or remove evaluation."}]},{"text":[{"text":"It removed the need for training examples because attention supplied the correct output itself."}],"correct":false,"tempting":[{"text":"Attention is trained using data; it does not supply labels automatically."}]},{"text":[{"text":"It allowed parallel computation across known positions, while masks and layer dependencies still constrained attention."}],"correct":true,"tempting":null},{"text":[{"text":"It generated every future token simultaneously, eliminating the sequential dependency of ordinary autoregressive decoding."}],"correct":false,"tempting":[{"text":"Known training targets differ from future tokens not yet generated."}]}],"order":[1,3,0,2],"why":null},"prev":{"slug":"the-chip-built-for-games","title":"The chip that was built for games","minutes":9},"next":{"slug":"bigger-kept-working","title":"Bigger kept working, and the argument about why","minutes":10}}}