Attention mask

Attention mask: A matrix or vector limiting which positions may contribute to attention for each token. It supports padding, causality and custom constraints. Excluded positions receive very negative values before softmax to eliminate their weight. This perspective connects the definition with practical behaviour in artificial intelligence systems.

In italiano: Attention MaskLegge I · Embedding, feature e spazi vettoriali

It supports padding, causality and custom constraints. Excluded positions receive very negative values before softmax to eliminate their weight.