Attention is seven questions wearing one name

Change the mask, share the key-value cache, then assemble a mechanism from seven design choices. Causal attention, GQA, FlashAttention and RoPE each answer a different one.

Inside a text encoder

Follow a sentence from token lookup, through attention that reads both ways, to one pooled vector you can compare with cosine similarity.