what's a transformer?
The transformer is the neural network architecture, introduced in 2017, that powers modern LLMs and most state-of-the-art image, audio, and video generators via self-attention.
before transformers, sequence models (RNNs, LSTMs) processed tokens one at a time, which was slow to train and bad at long-range dependencies. the transformer replaces recurrence with self-attention: each token computes weighted relationships to every other token in the input in parallel. this is the “Attention Is All You Need” thesis.
the architecture is massively parallelizable on GPUs, which is the technical precondition for scaling to GPT-scale models. without parallelism, you can't train trillion-parameter models in any reasonable wall-clock time.
transformers now power GPT, Claude, Gemini, Llama (see LLM); and, through “diffusion transformers” (DiT), they also underlie Stable Diffusion 3, Sora, Veo, and most modern image / video generators (see diffusion model). vision transformers (ViT) replaced CNNs for many image-understanding tasks.
detection-side, most AI-text detectors are themselves fine-tuned transformers, scoring whether text looks like a transformer wrote it.
“transformer” is the architecture; LLM is what you get when you train a large transformer on text. the same architecture trained on pixels yields image models, on audio yields speech models.
self-attention has a quadratic cost in sequence length. context windows used to be small because of this, and long-context models (1M+ tokens) require workarounds like sparse attention, sliding windows, and mixture-of-experts routing.
most current AI detectors share architecture with what they're detecting. they're transformers trained to classify transformer output. when a new generator architecture ships, detectors lag until they retrain on the new style.
the common misconception is “transformers are how AI thinks.” they're a pattern-matching architecture optimized for next-token prediction. they don't reason, plan, or have beliefs in any rigorous sense. the appearance of reasoning is a learned behavior from training on large amounts of data.
questions
what is a transformer in AI?
the transformer is the neural network architecture from 2017’s ‘Attention Is All You Need’ that powers modern LLMs and most leading image, audio, and video generators. its core move is self-attention. each token weighs its relationship to every other token at once, in place of the one-at-a-time passes that older RNNs ran. that parallelism maps onto GPUs and opened the door to GPT-scale training.
what’s the difference between a transformer and an LLM?
’transformer’ names the architecture. an LLM is what a large transformer becomes once you train it on text. train the same architecture on pixels and you get image models, on audio and you get speech models. the same architecture underlies GPT, Claude, Gemini, Llama, and, through diffusion transformers, Sora, Veo, and Stable Diffusion 3.
do transformers actually think or reason?
a transformer matches patterns in service of next-token prediction. it holds no beliefs and runs no internal plan. the appearance of reasoning is a learned behavior from training on large amounts of data, not a property of the architecture.
why do AI detectors lag behind new models?
most AI detectors are fine-tuned transformers trained to flag transformer output, so detector and target share the same machinery. a new generator ships, and the detector trails it until someone retrains on the new style. that retraining lag keeps AI detection a cat-and-mouse game.
sources.
- 01Vaswani et al., Attention Is All You Need — NeurIPS 2017 (arXiv:1706.03762)The original paper.
- 02
- 03Peebles & Xie, Scalable Diffusion Models with Transformers (DiT) — ICCV 2023 (arXiv:2212.09748)Diffusion transformers — the architecture under Sora, SD3.
- LLM →what you get when you train a large transformer on text. same architecture, different training data.
- diffusion model →the image / video architecture. modern versions (Sora, Stable Diffusion 3) are diffusion transformers.
- perplexity →the signal detectors use to spot transformer-generated text. low perplexity, low burstiness.