Policy gradient
The family of RL updates that push up the probability of actions in proportion to how much better than expected they scored.
The policy is the model. The gradient is computed on the log-probability of what the model sampled, weighted by an advantage: reward minus a baseline.
Above-baseline samples get more likely, below-baseline samples get less likely. PPO, GRPO, and importance-sampling losses are all variations.
In the compiled loop
advantages(rewards) in the compiled file subtracts the group mean from each sample’s reward, then forward_backward applies the weighted loss.
Sources
Schulman et al., 2017 (PPO) · Tinker docs: PPO loss