AI & ML

Transformer

A neural network architecture that uses self-attention mechanisms to process sequential data in parallel, forming the foundation of modern LLMs.

The Transformer is a neural network architecture introduced in the 2017 paper "Attention Is All You Need." It revolutionized natural language processing by replacing recurrent neural networks (RNNs) with self-attention mechanisms that can process entire sequences in parallel.

The key innovation is the attention mechanism, which allows the model to weigh the importance of different parts of the input when producing each part of the output. Multi-head attention enables the model to attend to different types of relationships simultaneously.

Transformers consist of encoder and decoder blocks, each containing self-attention layers and feed-forward networks. Models like BERT use the encoder, GPT uses the decoder, and T5 uses both. The architecture scales well with data and compute, enabling the creation of increasingly powerful models.

The Transformer architecture powers virtually all modern AI: LLMs (GPT-4, Claude, Gemini), image models (Vision Transformers), speech models (Whisper), and multimodal models.

Want to learn more?

Explore more developer terms or read in-depth articles on the blog.

Browse all terms