Causal Language Modeling

Also known as: CLM

Category: NLP / Language Processing

A pre-training objective where the model predicts the next token based only on the preceding tokens, using a left-to-right autoregressive approach.

Full Explanation

Causal language modeling (CLM) trains a model to predict each token in a sequence conditioned only on the tokens that came before it, enforced by a causal attention mask that prevents attending to future positions. This is the training objective used by the GPT series and most decoder-only language models. The term "causal" refers to the fact that information flows only forward in time, mirroring the causal structure of sequential text generation. CLM is naturally suited for text generation tasks since the model learns exactly the conditional probabilities needed for autoregressive generation. The training loss is the negative log-likelihood of each token given its prefix. Despite seeing only left context during training, large causal language models develop strong capabilities across understanding and generation tasks.

Related Terms

More in NLP / Language Processing

Explore More

  • AI Tools Library — Discover AI tools related to Causal Language Modeling
  • AI Education — Courses to learn about NLP / Language Processing
  • AI News — Latest news and updates