Skip to main content

Transformer

Transformer

  • Core concepts
  • Stage 4 · Under the Hood
  • refs checked 2026-11-19
What problem it solves

The architecture underneath every mainstream large model today.

What it is
A neural network structure built around the attention mechanism, handling the relationships across a whole passage of text. It processes a sentence in parallel rather than one word at a time — which is why it scales to trillions of parameters.
Each token reads the whole context through attention; a feed-forward network transforms each position, then the model emits next-token probabilities.
Each token reads the whole context through attention; a feed-forward network transforms each position, then the model emits next-token probabilities.
Why it matters

It is the root of large models. Understand it and the origin of context windows, hallucination and the KV cache becomes clear.

Sources
  • Attention Is All You Need (paper) ↗
  • How do Transformers work? (Hugging Face NLP course) ↗
Use this term in a task

Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.

Task handbooks → · Filter three candidates →