Transformers replace recurrence with Self-Attention, letting every token compare its Query (Q) against all Keys (K) simultaneously to compute attention weights and aggregate Values (V).
Lower focuses intensely on top matches; higher diffuses weight across all tokens.
Click any token tag to inspect which words it attends to most strongly.
Words convert to numerical vectors + sinusoidal position tags to capture order without sequential RNN loops.
Linear projections yield Q, K, V. Parallel heads attend to syntax, co-reference, and long-range semantics simultaneously.
Skip connections ($x + \text{Sublayer}(x)$) and LayerNorm stabilize deep gradients across 12 to 100+ stacked blocks.
Position-wise 2-layer MLPs process attended representations, projecting knowledge before next layers or final output.