Traditional RNNs process words sequentially step-by-step, making them slow and vulnerable to vanishing gradients over long distances. Transformers process all tokens simultaneously in parallel.
Each token is projected into three representations: Query (Q) (what am I looking for?), Key (K) (what do I contain?), and Value (V) (what content do I pass along if matched?).
Multiple attention heads operate in parallel. One head learns pronoun references ("it" ➔ "animal"), another tracks grammar, while others capture topical polysemy ("river bank" vs "financial bank").