Skip to content

architectures

Attention Mechanism

A component in neural networks that allows the model to dynamically focus on the most relevant parts of the input when producing each part of the output. Attention computes weighted sums of input representations, where weights reflect relevance.

In practice

When translating 'The cat sat on the mat,' attention helps the model focus on 'cat' when generating the corresponding word in French.