P(a∣b)P(a \mid b)

P(a | b) — conditional probability

The vertical bar reads "given". P(a | b) is "the probability of a given b": how likely a is when you already know b is true.

P(wt∣w1,…,wt−1)P(w_t \mid w_1, \dots, w_{t-1}) is the whole job of a language model: the probability of each possible next token, given all the tokens so far. It is a full list of probabilities, one for every token in the vocabulary, not a single word. Sampling picks one token from that list.

w<tw_{<t} is shorthand for the same list of earlier tokens, w1,…,wt−1w_1, \dots, w_{t-1}.

Example

P(mat∣the cat sat on the)=0.4P(\text{mat} \mid \text{the cat sat on the}) = 0.4

Read: the probability that the next word is "mat", given the words so far, is 0.4. (Made-up number.)

Where the course uses it

Related terms