The Transformer Architecture
Last Updated on October 31, 2024 by Editorial Team
Author(s): Derrick Mwiti
Originally published on Towards AI.
This member-only story is on us. Upgrade to access all of Medium.
In 2017, Ashish Vaswani et al wrote a paper that would change the natural language processing (NLP) scene forever, and most recently even computer vision. The authors proposed an efficient way to solve NLP problems without using Recurrent or Convolutional Neural Networks.
The architecture they proposed– the Transformer– would later be used to build state-of-the-art language models that have since taken over the world. This architecture is the precursor of the current wave of generative language models that have now become the new world assistants. To understand how we got here, we have to back to 2017 where it all started, and look at the Transformer architecture in detail.
In this dive, we review the Transformer architecture to make it easier to understand language models based on it.
The Transformer was a game changer because it didn’t require recurrence or convolutions. These were replaced by attention, making training faster through parallelization. The transformer eschews recurrent networks, using a pure attention mechanism instead.
The Transformer is made up of stacked self-attention and fully-connected layers in the decoder and encoder. In the following sections, we discuss the building blocks of… Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.
Published via Towards AI
Towards AI Academy
We Build Enterprise-Grade AI. We'll Teach You to Master It Too.
15 engineers. 100,000+ students. Towards AI Academy teaches what actually survives production.
Start free — no commitment:
→ 6-Day Agentic AI Engineering Email Guide — one practical lesson per day
→ Agents Architecture Cheatsheet — 3 years of architecture decisions in 6 pages
Our courses:
→ AI Engineering Certification — 90+ lessons from project selection to deployed product. The most comprehensive practical LLM course out there.
→ Agent Engineering Course — Hands on with production agent architectures, memory, routing, and eval frameworks — built from real enterprise engagements.
→ AI for Work — Understand, evaluate, and apply AI for complex work tasks.
Note: Article content contains the views of the contributing authors and not Towards AI.