Home Knowledge Base Causal masks

Causal masks prevent attention to future tokens in autoregressive transformer models, enabling left-to-right generation.

Purpose

Implementation

Why autoregressive

Training Efficiency

Inference

Combined with Padding

KV Cache

Decoder-only Models

causal maskautoregressive maskmeasure attention maskdecoder maskmasked attention

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.