What Is Self-Attention?
Self-attention is attention applied inside one sequence. Each token builds a better representation by comparing itself with the other tokens in the same input.
Self-attention lets tokens in the same sentence look at each other, score what matters, and mix useful context into each token representation.