Zenaique
Glossary · Architecture

Causal Mask

Also known as: Autoregressive mask, Triangular mask

Attention mask that hides future tokens so each position can only see itself and prior tokens.

An attention mask that prevents each position from attending to future positions, enforcing autoregressive generation. Implemented by adding -∞ to disallowed positions in the attention scores before softmax.

In practice

Why decoder-only models can be trained on full sequences in parallel. Expect questions on its memory/compute implications.

Related topics

Related terms