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.
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.
is shorthand for the same list of earlier tokens, .
Example
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
- 3.3 Joint and Conditional Probability · Module 3, Probability and Informationfirst use
- 8.2 Encoder-Only: BERT and Masked Language Modeling · Module 8, Three Families: Encoder, Encoder-Decoder, Decoder
- 8.4 Decoder-Only: Predicting the Next Token · Module 8, Three Families: Encoder, Encoder-Decoder, Decoder
- 13.1 Perplexity and Its Limits · Module 13, Evaluation
- 20.1 Supervised Instruction Tuning · Module 20, Adaptation: Fine-Tuning, LoRA, Distillation
- 21.1 A Reinforcement Learning Primer · Module 21, Preference Learning: RL, RLHF and DPO
- 21.2 Policy Gradients · Module 21, Preference Learning: RL, RLHF and DPO
- 21.3 PPO · Module 21, Preference Learning: RL, RLHF and DPO
- 21.5 RLHF End to End · Module 21, Preference Learning: RL, RLHF and DPO
- 21.6 Direct Preference Optimization · Module 21, Preference Learning: RL, RLHF and DPO
- 26.4 Training on Images and Text Together · Module 26, Vision-Language Models
- 27.3 The CTC Objective and Its Recursion · Module 27, Recognition: OCR and Speech With CTC