What is a transformer?
A transformer is a neural network architecture introduced in 2017 that uses self-attention to model relationships between every pair of tokens in an input in parallel. It replaced recurrent networks (RNNs) and powers all modern LLMs — GPT, Claude, Gemini, Llama — because attention scales to long sequences and trains efficiently on GPUs.