A log probability is the logarithm of a probability assigned to an event or token. In policy-gradient implementations, differences between new and reference log probabilities provide a convenient route to per-token probability ratios. section 6.3.1
Advantages determine how the policy uses log probabilities during optimization:
- Positive advantage: increase the log ratio, making the sampled completion more likely. section 6.3.1
- Negative advantage: reduce the likelihood of the sampled completion when the updated policy made it more likely. section 6.3.1
- Zero advantage: produce zero loss and leave the policy unchanged. section 6.3.1
Policy-gradient loss
A compact implementation uses pg_loss = -advantages * ratio. The ratio is commonly computed from the difference between new and reference log probabilities; summed token log probabilities indicate how likely the completion is under the model. section 6.3.1







