Reference 14 stops to get here · leads to 1

Attention Mask

A binary mask indicating which tokens should be attended to, used to handle padding and causal masking.

Your route here

14 stops · basics first
  1. Token ✓ understood

    The unit of text a language model reads and writes: a word, part of a word, or a character, drawn from the model's fixed vocabulary.

  2. Tokenization ✓ understood

    Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.

  3. Special Token ✓ understood

    Reserved tokens with special meanings like [CLS], [SEP], [MASK], [PAD] used in various model architectures.

  4. Padding Token ✓ understood

    A special token used to make sequences the same length in a batch, typically ignored during computation.

  5. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  6. Neural Network ✓ understood

    A model built from layers of simple units, each taking a weighted sum of its inputs and applying a nonlinearity; training adjusts the weights so the whole stack maps inputs to useful outputs.

  7. Dataset ✓ understood

    A collection of data examples used for training, validating, or testing machine learning models.

  8. Feature ✓ understood

    A single measurable property of an example, such as a house's floor area or how many links an email contains, used as an input to a model.

  9. Deep Learning ✓ understood

    A subset of machine learning that uses neural networks with multiple layers (deep neural networks) to learn hierarchical representations of data.

  10. Representation Learning ✓ understood

    Letting a model learn its own internal description of the data, such as embeddings or layered visual features, instead of relying on features designed by hand.

  11. Embedding ✓ understood

    A list of numbers (a vector) that represents a word, sentence, image or other item, learned so that similar items end up close together.

  12. Attention Mechanism ✓ understood

    A technique that lets a neural network weigh every part of its input when producing each output, focusing on the parts most relevant at that step.

  13. Self-Attention ✓ understood

    An attention step in which every token in a sequence looks at every token in that same sequence and builds a new representation from a weighted mix of them.

  14. Masking ✓ understood

    Hiding some positions from a model, either to control what attention may look at (causal and padding masks) or to create a fill-in-the-blank training task.

  15. Attention Mask · you are here ✓ understood

A binary mask indicating which tokens should be attended to, used to handle padding and causal masking.

This concept is essential for understanding large language models and forms a key part of modern AI systems.

  • Attention
  • Padding
  • Masking

Where it sits

Attention Mask

Leads to

Causal Mask

Explore nearby