Introduction
Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1
12 cards in “1.2 What LLMs learn from token prediction” · whole deck
1.2 What LLMs learn from token prediction
- How do children manage to learn roughly 7–10 new words a day, and why is this relevant to LLMs?Most vocabulary is acquired as a by-product of reading, through rich contextual processing rather than one word at a time. This suggests that meaning can be learned from text exposure alone, which is what LLMs do.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 8
- State the distributional hypothesis.Some aspects of meaning can be learned solely from the texts we encounter, based on the words a word co-occurs with: words that occur in similar distributions (with similar neighboring words) tend to have similar meanings.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 8
- How would the distributional hypothesis let you learn the meaning of difficult if you already knew hard?Difficult appears near the same context words as hard (steep hills, decisions), so you can infer that difficult means something similar to hard.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 8
- What is pretraining?Training a language model to predict the next word, again and again, over a (very) large corpus, thereby inducing knowledge of language, concepts and the world.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 9
- Give examples of the different kinds of knowledge a model can pick up from next-word prediction.Ontological facts (“roses, dahlias and peonies” → flowers), lexical scales (“not just big, it was” → enormous), math (“the square root of 4 is” → 2), world facts (author of A Room of One’s Own → Virginia Woolf), and also harmful biases (“The professor said that” → he).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 9
- How can pretraining make a model unfair?If the data repeatedly pairs, say, professors with male pronouns, the model learns that association and may act unfairly toward different groups of people.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 9
- What is a prompt, and what is conditional generation?A prompt is a text string a user gives an LM to get it to do something. Conditional generation is generating tokens whose probability is high conditioned on the prompt and on the tokens generated so far.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 9
- Why does conditional generation lead an LLM to answer questions?Answers are high-probability continuations of questions, because the model was trained on lots of text where answers follow questions (FAQs, tables, Q&A). After “Q: Who wrote ‘The Origin of Species’? A:”, Charles and then Darwin become likely next tokens.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 9
- Besides pretraining, what further training makes models good at following questions and instructions?Instruction tuning: training on hundreds of thousands of instructions or questions paired with responses, so the model learns that instructions are followed by appropriate answers and generalizes to new ones.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 10
- What is the Shannon game?A text-prediction game (from Shannon, and Miller & Selfridge, around 1950): a player guesses a passage one unit (letter or word) at a time, left to right; after each guess they are told the correct unit and continue.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 10
- What was Shannon’s original purpose for the prediction game?To study how much information natural language contains, following his interest in information theory and data compression.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 10
- In the Shannon game, where do players need correcting most often, and what does that reveal?At the beginnings of words and where many continuations are possible (e.g. adjectives after “a” or “the”). It shows where in text the information is concentrated: what is hard to predict carries the most information.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 1, §1.2, p. 10
Source
- Daniel Jurafsky and James H. Martin. Speech and Language Processing. 3rd edition (draft). https://web.stanford.edu/~jurafsky/slp3/