Attention — механизм нейронной сети, который назначает разный уровень важности частям входных данных при формировании выхода. Он помогает моделям фокусироваться на релевантных токенах, признаках или областях и является ключевым строительным блоком transformer-архитектур. Attention может снижать необходимость представлять всю входную информацию одинаково, взвешивая контекст по релевантности задаче.
A mechanism used in a neural network that indicates the importance of a particular word or part of a word. Attention compresses the amount of information a model needs to predict the next token/word. A typical attention mechanism might consist of a weighted sum over a set of inputs, where the weight for each input is computed by another part of the neural network. Refer also to self-attention and multi-head self-attention, which are the building blocks of Transformers. See LLMs: What's a large language model? in Machine Learning Crash Course for more information about self-attention.