Loading...
Self-attention lets each token look at every other token in the same input and decide how much each one matters for its meaning.
Standard attention compares every token with every other token, so compute and memory grow with the square of the input length.
It runs several attention operations in parallel, so each head can focus on different relationships, like grammar or meaning.