A world model predicts how actions change state. A planner compares candidate sequences and corrects its plan with observations. This tutorial explains latent dynamics and verifies replanning after a map error with a grid simulator.
Synthetic data is generated by a model or a program and then used for training. It keeps helping only with an outside signal: a verifier, a stronger teacher or fresh real data. Two experiments show recursive training losing the tail and only a verifier letting self-training bootstrap.
After SFT a model follows instructions, but its answers are not always the ones people prefer. Preference optimization aligns it using comparisons: RLHF trains a reward model and optimizes with PPO, while DPO reduces the pipeline to a classification-style loss on preference pairs.
Since o1 and DeepSeek-R1, making a model think longer before answering has become the main line of post-training. Why verifiable rewards (RLVR) can replace a reward model, how GRPO drops the value model, and the recipe and pitfalls of R1-Zero and R1.
A reward model scores a prompt-and-response pair with one number, trained on pairwise comparisons; RLHF, rejection sampling and best-of-n all use it. This page derives the Bradley–Terry loss, measures the accuracy ceiling set by label noise, and reproduces overoptimization in simulation.
Reasoning RL joins generation, grading, learning, and weight publication. Asynchronous execution overlaps work and introduces policy lag. A runnable scheduling simulation separates elapsed time, accepted batches, and discarded trajectories.
Policy gradients, baselines, GAE, PPO clipping and the KL penalty are the toolkit behind RLHF and reasoning RL. This page measures each on a toy task small enough to enumerate exactly: how baselines cut variance, why clipping is not a trust region, and where the KL belongs.
GDPO is NVIDIA's January 2026 fix for multi-reward RL. GRPO sums the rewards before normalizing, which can collapse different reward combinations into one advantage; GDPO normalizes each reward first. This post re-enumerates the paper's counts and flags claims that do not check out.
DeepSeek-V3.2 adds DeepSeek Sparse Attention to V3.1-Terminus by continued training: a lightning indexer picks 2048 tokens per query, so core attention drops from O(L²) to O(Lk). Then scaled-up GRPO and 1,800+ synthetic environments. I recompute the numbers and rebuild DSA in miniature.
GSPO (Group Sequence Policy Optimization), from the Qwen team in 2025, replaces GRPO's per-token importance ratios and clipping with one length-normalized ratio per response, and reportedly needs no Routing Replay for MoE models. This post reviews it and verifies its gradients in code.
Using large-k pass@k, this study finds RL improves small-k success while base models often match or exceed coverage at large k, suggesting RL redistributes existing ability more than creating new reasoning.
DAPO, open-sourced by ByteDance Seed and partners, adds Clip-Higher, dynamic sampling, token-level loss and overlong reward shaping to GRPO and reaches 50 on AIME 2024 (avg@32) from a Qwen2.5-32B base, against 30 for naive GRPO. Code checks the mechanisms and numbers behind each trick.
DeepSeek-R1 shows that large-scale reinforcement learning with automatically checkable rewards lets a base model grow long chains of thought; a cold start and four stages make it usable. We recompute the paper's data and cost tables, list what does not add up, and cover later corrections.
rStar-Math co-evolves a 7B policy and process reward model over four rounds. MCTS generates stepwise trajectories and step preferences train the verifier, reaching 58.8% on MATH without GPT-4 distillation.
Genie learns latent actions and a video world model from unlabeled platformer videos, turning images into controllable 2D environments without ground-truth action labels.
DeepSeekMath 7B continues pretraining on 120B tokens of web math, then uses GRPO, reinforcement learning without a value model, to reach 51.7% on MATH with no tools or voting. This post covers the corpus pipeline, ablations, GRPO's math and a unified view of SFT, RFT, DPO, PPO and GRPO.
OpenAI compares outcome and process supervision on MATH. A reward model trained on 800K human step labels (PRM800K) solves 78.2% of problems at best-of-1860, against 72.4% for an outcome reward model and 69.6% for majority voting. A small simulation shows why step labels save data.
DreamerV3 (Hafner et al., 2023) learns a world model and trains an actor and critic on imagined latent trajectories. With symlog, twohot regression, free bits and percentile return normalization, one hyperparameter set beats or matches specialists on 150+ tasks and finds a Minecraft diamond.
OpenAI's 2022 InstructGPT paper: supervised fine-tuning on about 13,000 human demonstrations, a reward model trained on human rankings of about 33,000 prompts, then PPO. A 1.3B InstructGPT beat the 175B GPT-3 in labeler evaluations. This breakdown checks the data, loss and results, and their limits.
Decision Transformer (Chen et al., 2021) recasts offline RL as conditional sequence modeling: a causal GPT trained on return, state and action tokens, prompted with a target return. We recompute its tables, rerun its shortest-path toy, and show where return conditioning fails.
OpenAI ran the full RLHF pipeline on Reddit TL;DR summaries: collect human pairwise comparisons, train a reward model, then optimize the policy with KL-penalized PPO. A 1.3B human-feedback model beat a supervised model 10 times larger. Code checks the KL optimum and over-optimization.
MuZero learns latent transitions, rewards and values useful for planning instead of receiving environment rules. MCTS over this learned model matches AlphaZero in board games and advances Atari performance.
World Models (Ha and Schmidhuber, 2018) split an agent into a VAE for vision, an MDN-RNN for memory and a tiny linear controller trained by evolution strategies, even inside the model's own dream. Code checks the parameter counts and replays dream training on CartPole.
AlphaZero used one algorithm and one set of hyperparameters, given only the rules, to learn chess, shogi and Go from random play via self-play with a neural network and Monte Carlo tree search (MCTS), and beat each world-champion program. This post checks shapes, match statistics and search volume.
PPO makes policy gradients reusable: a clipped probability-ratio objective allows several minibatch epochs on one batch of data, with TRPO-like stability from first-order optimization only. A CartPole experiment compares no clipping with epsilon 0.1, 0.2 and 0.3, 8 seeds each.
DQN pairs Q-learning with a convolutional network and experience replay, learning from raw pixels with one architecture and hyperparameter set on seven Atari games. It beat all prior methods on six and a human expert on three. Code checks parameters, normalized scores and a CartPole replay ablation.