AI fundamentals

Transformer

AI-assisted editorial review:

The Transformer is a neural network architecture introduced by a Google research team in 2017. Instead of reading text one word at a time, it uses self-attention to compute how tokens in a sequence relate to one another, and it processes those relationships in parallel.[1][2] Decoder models can restrict attention to earlier tokens and still generate new tokens sequentially.

What does Transformer mean in simple terms?

Older language models read a sentence word by word, in order, and had to carry earlier words forward step by step. A Transformer lays the whole passage out at once and asks, for each word, "which other words matter most for understanding this one?" Google's example is the word "bank" in "I arrived at the bank after crossing the river": the model can look straight at "river" and decide it means a riverbank.[2] Think of reviewing a long chat thread by putting the whole conversation on one screen instead of scrolling line by line. The GPT models behind ChatGPT, Google's Gemini, and NAVER's HyperCLOVA are all built on this architecture, so a basic grasp of it makes news about large language models much easier to follow.[4][6][12]

How can Transformer be explained with an analogy?

It is like spreading an entire report on the table so that every word can point directly to any other word it depends on.

Where is Transformer used?

Case 1

Google — A new benchmark in machine translation

The 2017 paper reported 28.4 BLEU on the WMT 2014 English-to-German translation task, more than 2 BLEU above the best previous results, including ensembles. On English-to-French, it set a single-model record of 41.8 BLEU after 3.5 days of training on eight GPUs, a small fraction of the training cost of earlier top models.[1] Google's August 2017 blog post added that the architecture fits modern parallel hardware well and can speed up training by up to an order of magnitude.[2]
Result: 28.4 BLEU on WMT 2014 English-to-German, more than 2 BLEU above the previous best (paper abstract).[1]

Case 2

NAVER HyperCLOVA and LG EXAONE — Korean-centric Transformer models

NAVER's research paper describes HyperCLOVA as a Korean variant of an 82-billion-parameter GPT-3-style model, trained on a Korean-centric corpus of 560 billion tokens.[6] In December 2024, LG AI Research published EXAONE 3.5, a set of decoder-only Transformer models in 32B, 7.8B, and 2.4B sizes, with a vocabulary of roughly half Korean and half English, described in the report as publicly available for research use.[7] Commercial use requires checking the provider's terms separately. Companies working mainly in Korean now have more model options built on the same core architecture.
Result: HyperCLOVA trained on a Korean-centric corpus of 560B tokens (NAVER paper, 2021).[6]

Case 3

OpenAI ChatGPT — Transformer models reach everyday office work

GPT stands for Generative Pre-trained Transformer. OpenAI scaled the approach from 1.5 billion parameters in GPT-2 to 175 billion in GPT-3.[4][9] ChatGPT, released on November 30, 2022, was fine-tuned from a model in the GPT-3.5 series and brought this technology to tasks such as drafting text, summarizing notes, and fixing code.[5] Google likewise describes Gemini 1.5 as built on its Transformer and mixture-of-experts research.[12]
Result: GPT-3 reached 175B parameters, 10x more than any previous non-sparse language model (paper abstract).[9]

Case 4

Hugging Face Transformers — A shared toolkit for the industry

Hugging Face's open-source transformers library describes itself as a model-definition framework for text, vision, audio, video, and multimodal models, and says more than 1 million model checkpoints on its Hub can be used with it.[3] Its definitions are compatible with major training frameworks and inference engines, which lets teams switch models without rewriting everything.[3]
Result: About 164,000 GitHub stars for the repository (checked October 13, 2026).[13]

Try it today

  1. Open the original paper (arXiv 1706.03762) and look at Figure 1, the Transformer architecture diagram, and save it for your team.[1]
  2. Read Google's August 2017 blog post and note two numbers: 28.4 BLEU on English-to-German and 3.5 days of training on eight GPUs for English-to-French.[1][2]
  3. Open the Hugging Face transformers documentation home page and note which modalities and tasks it supports.[3]
  4. For each AI tool your team uses, write one line on whether it is an encoder-only, decoder-only, or encoder-decoder Transformer, and check the vendor's own documentation before you write it down.
  5. At your next team meeting, explain in one sentence why the Transformer replaced RNNs as the standard for language models.[2]

Limits and direction

In ordinary dense attention, the attention-matrix size and computation grow with the square of the input length, so costs rise sharply for long documents.[11] That is why long contracts, large codebases, and long videos are often split into chunks or handled with retrieval-augmented generation (RAG) and intermediate summaries. Training large Transformer models is also expensive: NVIDIA describes a 530-billion-parameter model that needed thousands of GPUs running for weeks.[4] Language models built on Transformers can also produce plausible-sounding but wrong answers, so important outputs still need human checking.[5]

Development is moving in two directions. The first is more efficient attention. FlashAttention speeds up exact attention by reducing GPU memory reads and writes, and enables longer contexts.[11] In February 2024 Google announced Gemini 1.5 Pro with a context window of up to 1 million tokens in preview.[12] The second is new kinds of data. The transformers library now covers text, vision, audio, video, and multimodal models,[3] and DeepMind's AlphaFold2 applied a Transformer to amino acid chains to predict how proteins fold.[4] The EXAONE 3.5 and Gemini 1.5 announcements still describe Transformer-based designs.[7][12]

How has Transformer evolved?

2017-06-12
Attention Is All You Need
Google researchers publish the Transformer, built only on attention.[1]
2018-10-11
BERT
A bidirectional Transformer encoder sets new results on 11 language tasks.[8]
2020-05-28
GPT-3
A 175B-parameter model shows strong few-shot learning.[9]
2024-09-12
Reasoning models
OpenAI o1 is trained to think through a chain of thought before answering.[10]

Which concepts are related to Transformer?

  • Next step
    LLMMany modern LLMs use Transformers trained at large scale.[9]
  • Foundation
    Neural NetworkThe Transformer is a type of neural network architecture.[2]
  • Foundation
    EmbeddingInput tokens are converted into embeddings before attention is applied.[2]
  • Related concept
    Deep LearningThe broader field that the Transformer belongs to.
  • Key unit
    TokenThe basic unit of input a Transformer processes.[12]

Transformer vs RNN/LSTM

ComparisonTransformerRNN/LSTM
ProcessingAttends to the whole sequence at once[2]Reads tokens one after another[2]
ParallelismWell suited to parallel training on GPUs and TPUs[2]Sequential steps limit parallel training[2]
Long-range linksAny position can attend directly to any other[2]More steps needed as words get farther apart[2]
Training costReached top translation quality at a fraction of earlier training cost[1]Slower to train at large scale[2]
Main usesLLMs and multimodal models[3]Earlier standard for translation and language modeling[2]

Which sources explain Transformer?

  1. arXiv (Vaswani et al.) — Attention Is All You Need (2017-06-12) — https://arxiv.org/abs/1706.03762
  2. Google Research Blog — Transformer: A Novel Neural Network Architecture for Language Understanding (2017-08-31) — https://research.google/blog/transformer-a-novel-neural-network-architecture-for-language-understanding/
  3. Hugging Face — Transformers documentation — https://huggingface.co/docs/transformers/en/index
  4. NVIDIA Blog — What Is a Transformer Model? (2022-03-25) — https://blogs.nvidia.com/blog/what-is-a-transformer-model/
  5. OpenAI — Introducing ChatGPT (2022-11-30) — https://openai.com/index/chatgpt/
  6. arXiv (NAVER, Kim et al.) — What Changes Can Large-scale Language Models Bring? Intensive Study on HyperCLOVA (2021-09-10) — https://arxiv.org/abs/2109.04650
  7. arXiv (LG AI Research) — EXAONE 3.5: Series of Large Language Models for Real-world Use Cases (2024-12) — https://arxiv.org/abs/2412.04862
  8. arXiv (Devlin et al.) — BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (2018-10-11) — https://arxiv.org/abs/1810.04805
  9. arXiv (Brown et al.) — Language Models are Few-Shot Learners (2020-05-28) — https://arxiv.org/abs/2005.14165
  10. OpenAI — Learning to reason with LLMs (2024-09-12) — https://openai.com/index/learning-to-reason-with-llms/
  11. arXiv (Dao et al.) — FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness (2022-05-27) — https://arxiv.org/abs/2205.14135
  12. Google — Our next-generation model: Gemini 1.5 (2024-02-15) — https://blog.google/technology/ai/google-gemini-next-generation-model-february-2024/
  13. GitHub — huggingface/transformers repository — https://github.com/huggingface/transformers