AI GLOSSARY
Causal Masking
Causal masking protects the direction of information flow used for next-token prediction.
Simple explanation
During next-token training, each position should predict from only the allowed prefix. A causal mask hides future positions so training matches the autoregressive generation setup.
Technical explanation
During next-token training, each position should predict from only the allowed prefix. A causal mask hides future positions so training matches the autoregressive generation setup.
Example
Trace how Token position becomes Allowed context through causal mask.