Transformers
Self-attention-based sequence models that power modern LLMs and vision models.
Overview
The Transformer architecture replaces recurrence with multi-head self-attention:
Multi-Head Attention
Multiple attention heads capture different relationship patterns:
Positional Encoding
Since self-attention is permutation-equivariant, positional information is injected:
Related Topics
Transformers build on Neural Networks and use Gradient Descent for training. They extend to generative models like VAEs and diffusion models.
Learning Path
What should I learn before Transformers?
Start with neural-networks before studying Transformers.
How does Transformers connect to other AI topics?
Transformers belongs to Generative and connects to deep-learning, nlp, attention, self-attention, positional-encoding, optimisation, sequence-modelling.