Lanugage Models
A language model is a probabilistic model of a token sequence, assigning a probability to text by factorizing a joint distribution over tokens. Given a sequence , an autoregressive language model defines the chain rule
Equivalently, it models the next-token distribution , which can be used both to evaluate text (via likelihood) and to generate text (by sampling tokens sequentially).In practice, directly representing the full joint distribution over all sequences is intractable in both memory and compute. Model architectures therefore impose structure – most commonly a factorization or conditional-independence assumptions – to approximate the true distribution.
decoding