Architecture / Building blocks

Self-attention

Every token looks at every other token and decides what matters to it.

Each token asks a question (a query), advertises what it contains (a key) and offers information (a value). It then gathers the values of the tokens whose keys best match its query.

Industrial example: Why a race car is designed as one system

On a race car, the front wing shapes the air that reaches the floor and the rear wing. Change one part and the others feel it. Self-attention lets every region of the car consult every other region, and learn how strongly they influence each other.

References

Related