Skip to content

What is a transformer?

The 2017 architecture underneath essentially every model you have heard of.

By Fiqhro Dedhen3 min readEdited by Fiqhro Dedhen

A transformer is a neural network architecture introduced in 2017. The "T" in GPT stands for it. Essentially every large language model in use today — whichever company made it — is a transformer or a close relative.

The idea it replaced

Earlier language models read text in order, one word at a time, carrying a summary of what came before. That approach had two problems: it was slow to train because it couldn't be parallelised, and it tended to lose the thread over long passages.

The transformer's contribution was attention: instead of reading sequentially, look at every token in the input simultaneously and learn which ones are relevant to which. In "the trophy didn't fit in the suitcase because it was too big", attention is what lets the model connect "it" to "the trophy" rather than "the suitcase".

Because every position is processed at once, training parallelises across thousands of chips. That property — not raw cleverness — is most of why models got big so fast.

The catch

Comparing every token to every other token means the work grows with the square of the input length. Double the input, quadruple the comparisons. This is the direct cause of context window limits, and the reason long prompts cost real money. A great deal of research since 2017 has gone into making attention cheaper without making it worse.

How we got from there to here

YearWhat landedWhy it mattered
2013Word vectors (embeddings)Established that meaning could be represented as geometry
2017The transformerAttention replaces sequential reading; training parallelises
2020Few-shot prompting at scaleShowed that scale alone produced new capabilities
2020RAGAttach a retrieval step so models can cite real documents
2022Instruction tuning with human feedbackTurned raw text predictors into usable assistants
2022Chain-of-thoughtPrompting for intermediate steps improves reasoning

What it means for you

Very little, day to day — and that is the point. You don't need to understand attention to use a model, any more than you need to understand TCP to load a web page.

It's worth knowing exactly one implication: transformers predict likely continuations of text. They are not looking anything up unless something has explicitly given them a document to look at. That single fact explains most of what people find confusing about model behaviour, including hallucination.

What we addedA dated timeline from the original paper to the present, showing which now-familiar ideas arrived when.

This article was researched and drafted with AI assistance from the sources listed below, then checked and edited by Fiqhro Dedhen before publication. How we work.

Sources

3 cited · 3 primary

  1. 1
    PrimaryarXiv (Vaswani et al.)
    Attention Is All You Need

    The original architecture paper, published June 2017.

    arxiv.org · accessed 17 Jul 2026

  2. 2
    PrimaryarXiv (Brown et al.)
    Language Models are Few-Shot Learners

    The GPT-3 paper — evidence that scaling the architecture produced new capabilities.

    arxiv.org · accessed 17 Jul 2026

  3. 3
    PrimaryHugging Face
    BERT

    Reference implementation docs for an early, influential transformer.

    huggingface.co · accessed 17 Jul 2026

Primary sources are the company, paper or repository itself. Reporting is established press, used to corroborate. Community is used to find stories, never to establish facts.