Transformers · Level 3 of 5
Attention Mask
A rule controlling which positions contribute to attention.
Masks can hide padding, enforce causality, or restrict connectivity.
Example
Padded positions are excluded from attention weighting.
Listen to the definition and example
Audio transcript
Attention Mask. A rule controlling which positions contribute to attention. Masks can hide padding, enforce causality, or restrict connectivity. For example: Padded positions are excluded from attention weighting.
Explore this concept
Why it matters
This helps you trace how token representations exchange and transform information.
Start with
Quick recall question
Try answering before looking back at the definition.