From a language model to REINFORCE: what a reward adds
One tiny language model, three steps. First, just watch it work. Then train it the ordinary way, on text. Then take the text away, keep only a score, and see that the only change is a weight on each of the model’s own samples.
1. a bare language model 2. train it on text 3. no text, only a score 4. what it is aiming at
A tiny language model, trained on text and on reward
Step 4: the 27 completions as columns, with the base model probability, the preference factor, and their normalized product. A language model that writes three tokens a, b or c, one at a time. For the latest completion, the probability the model gave each possible next token at each position, with the chosen token highlighted. Step 1: sampling. Step 2: one training update on a written example raises the probability of its tokens. Step 3: the model's own samples, each weighted by a reward, drive the same update; a chart compares training on weights of one against training on reward.
Sample one Sample 10 A different model
Train on the next example 20 examples Start over
reward: ends in c number of c’s
One step (8 samples) Run Start over
watch: weight = reward weight = 1