Model Post-Training
1. Panorama

2. Base Model
2.1 Introduction
The pretraining use massive training text to help LLM acquire the following abilities:
1 | language patterns |
You give LLM a string of token and it will output other tokens. This is called ==next-token prediction==. After pretraining, the LLM learns basic ability. And we call LLM in this phase ==Base Model==.
The training goal is:
max logPθ(xt|x < t)
2.2 Problem
The problem of base model is that it can continue but it can’t follow the instruction:
1 | User: |
The base model may continue:
1 | User: |
or just generate contents not qualified.
3. Level 0: Instruction Following
3.1 Introduction
We want LLM learns how to follow the instruction. So we can use SFT (Supervised Fine-Tuning) to do this.
Supervised mans that we have a answer to supervise the
LLM. The training data structure is simple:
1 | (prompt, answer) |
e.g.
1 | Prompt: |
We hope to:
max Pθ(Answer|Prompt)
SFT in essence is supervised learning /
behavior cloning.
We have:
1 | input (Explain the TCP three-way handshake.) |
In essence we make the LLM imitate the expert:
1 | Expert trajectory: |
1 | Expert trajectory: |
3.2 Problems
3.2.1 Q1: LLM Only Learn the Answer (CoT SFT)
By normal SFT, LLM learns how to answer question according to the data it learned.
e.g. There’s a math problem:
1 | 2x + 3 = 7 |
the training data is:
1 | 2x = 4 |
The LLM didn’t try other ways. It just imitate the expert trajectory.
We use ==Chain-of-Thought== to solve this problem: Not only train the answer, but also train the reasoning process.
e.g.
1 | Question: |
So the SFT data is now:
1 | Question |
instead of:
1 | Question |
Now the training data is like this:
1 | Q: |
P(this reasoning trajectory|Q)
When encountering such questions, LLM can follow this reasoning pattern to solve them.
3.2.2 Q2: LLM Don’t Know the Optimized Reasoning Path (Preference Learning)
The trajectory is provided by Human. The LLM only imitates the trajectory, it never knows that if the trajectory is best.
e.g.
1 | User: |
LLM might generate 2 answers:
1 | Answer 1: |
1 | Answer 2: |
Which answer is better?
Obviously most people will choose latter, so we can collect:
1 | Question |
This data is called ==Preference Data==.
Why we need ==Preference Learning==?
e.g. problem:
1 | Explain what is mutex? |
LLM:
1 | Answer A |
All of the 3 answers might be correct, but :
1 | A: Too wordy |
The tradition SFT is hard to express “B is better than A”.
4. Level 1: Preference Alignment
4.1 RLHF (Reinforcement Learning from Human Feedback)
==RLHF== (Reinforcement Learning from Human Feedback) makes LLM output answers more approach to human preference.
1 | Human Preference |
It can be divided into 3 steps:
4.1.1 Train a Reward Model
Collect performance data like:
1 | Question |
And train a Reward Model. The goal of the model is to assess “How good the answer is”
e.g.
1 | RewardModel(question, answer) |
output:
1 | A → 0.2 |
Then the model learns B is more preference-aligned.
4.1.2 LLM Generates Answer
Input question to LLM, and it will output a answer. Then send
Question + Answer to Reward Model, the Reward
Model will judge the answer’s quality.
1 | Question + Answer |
4.1.3 Improve Reward by RL
Now we hope that the future answer will get higher reward:
1 | Generate a good answer |
4.2 PPO (Proximal Policy Optimization)
PPO is a classic RLHF algorithm. After getting reward(s) by reward model, PPO is used to update LLM’s weight.
Its core thought is :
- Need to make LLM more inclined to generate high-reward responses, while ensuring that a single update does not deviate too far from the original model.
…
4.3 DPO (Direct Preference Optimization)
4.3.1 Difference
Tradition RLHF:
1 | 1. train a reward model |
DPO:
1 | Skip the explicit Reward Model and PPO, train model with "Human Preference Data" directly. |
The data DPO can see is the same as RLHF’s:
1 | Prompt |
The tradition RLHF:
1 | Preference |
The DPO:
1 | Preference |
4.3.2 How does DPO know which answer is better?
Assume:
1 | Prompt = x |
we hope:
1 | π(y_w | x) ↑ |
but if we do it directly, the LLM might deviate too far
5. Level 2: Reasoning Training
5.1 Why RL?
The earlier post-training process of ChatGPT-style model is:
1 | Pretraining |
The LLM’s goal is to answer precisely, more like human. But it cannot resolve a problem it never trained.
Tradition LLM:
1 | Question |
Reasoning LLM:
1 | Question |
The key is not “introduce CoT” but “regard reasoning itself as the optimization objective”.
Why Reasoning Training needs RL?
Tradition SFT:
1 | Question |
SFT will tell LLM: You need to imitate this reasoning path.
But in some complex problems:
1 | Question |
Human cannot write every correct path, so we need LLM itself to inference the path and judge the result.
We have two RL ways to improve the reasoning ability:
- RLHF (Reinforcement Learning from Human Feedback)
- RLVR (Reinforcement Learning with Verifiable Reward)
5.2 RLHF
e.g.
1 | Q: Prove a certain mathematical conclusion. |
Then we have a preference data:
1 | A > B |
Then we can train a reward model.
1 | Human Preference Data |
Reward may includes:
1 | Reward = |
5.3 RLVR
RLVR (Reinforcement Learning with Verifiable Rewards) means that use “Verifiable Rewards” for reinforcement learning.
RLVR are suitable for Reasoning Tasks because many reasoning tasks’ final result is verifiable:
1 | Mathematics: |
1 | Problem |
LLM can try different pathes:
1 | Path A → Wrong → 0 |
One problem:
The RLVR only verifies the final the result. The intermediate reasoning process may be incorrect.
1 | Reasoning: |
Then the verifier will give it reward:
1 | Reward = 1 |
Outcome Verification ≠ Process Verification !
5.4 Combination of RLHF and RLVR
1 | Reasoning LLM |
e.g.
Reward = Rewardverifier + λRewardhuman
5.5 PPO & GRPO
RLHF and RLVR are two algorithms for calculating rewards.
PPO and GRPO are algorithms for updating LLM.
1 | Reasoning Training |
6. Agentic Fine-Tuning
There are many popular training methods in Agent area, including:
1 | Agent Model Post-Training |
6.1 Imitation Learning (SFT)
Imitation Learning is basically SFT.
ℒSFT = −∑tlog Pθ(tokent ∣ token < t)
6.1.1 Trajectory SFT
Core Process:
1 | Expert Agent Trajectory |
Trajectory:
1 | task |
- SWE-Gym (ICML 2025), Rejection Sampling / Self-Improvement
- SWE-Lego (arXiv:2601.01426, 2026)
6.1.2 Critical-Step SFT
A trajectory includes many steps, but not all steps are necessary. There’s one way only to SFT the critical steps in trajectories.
- ATLaS — (Findings ACL 2025), only train critical steps
6.1.3 Synthetic Trajectory
One problem of SFT is that high-quality training data is few, so there’s a research direction is to compose Synthetic Trajectory.
- SWE-smith, Synthetic Trajectory
6.1.4 Distillation
Distillation is to extract ==reasoning trajectories== form different teachers and distill into a student model.
1 | Teacher A |
- Agentic-R1 (EMNLP 2025)
6.2 Preference Learning (mainly DPO)
DPO is prevail in LLM post-training area, but in Agent area it’s not as popular as SFT and Online RL.
SFT makes LLM realize what is right answer. Preference Learning just tells LLM: A is better than B.
1 | Task |
Train:
1 | πθ(A|x) ↑ |
The most popular Preference Learning method in Agent area is DPO (Direct Preference Optimization).
The basic DPO process:
1 | Prompt |
It doesn’t need traditional reward model…
The traditional DPO compare different trajectories. Nowadays the tendency is to research which certain step makes trajectory better.
1 | Trajectory-level |
- HPL (ICLR 2026): Solving the Granularity Mismatch: Hierarchical Preference Learning for Long-Horizon LLM Agents
- Online DPO (ICLR 2025)
- SDPO (ACL 2025)
6.3 Online Agentic RL
Reinforcement Learning categories can be divided into 2 kinds: Online and Offline.
The tendency is to use Online one.
Online RL requires Agent to generate real trajectories, and calculate reward and update policy.
- RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning (ICML 2025)
- WebAgent-R1 (EMNLP 2025)
- DeepResearch (EMNLP 2025)
6.3.1 Reward Design
The reward is a criterion to judge how good a trajectory is.
There are many ways to calculate reward:
1 | Reward |
RLVR (Reinforcement Learning Verifiable Reward) is an important type, because many engineering problems are verifiable.
- SWE-RL (NeurIPS 2025)
- WebAgent-R1 (EMNLP 2025)
==Process Reward== is to solve a problem:
1 | Step 1 |
The final answer is correct, but LLM doesn’t know if step 3 is important.
1 | Outcome Reward |
- Rewarding Progress (ICLR 2025)
- PURE (NeurIPS 2025)
- ReasonFlux-PRM (NeurIPS 2025)
6.3.2 RL Optimization Algorithm
After calculating the reward of a trajectory, we need to update the weights of LLM.
1 | Reward |
6.3.2.1 GRPO
Basic GRPO process:
1 | Question x |
The GRPO doesn’t need a value/critic model which is necessary for PPO.
6.3.2.2 PPO
- RLEF (ICML 2025 Spotlight)
- Open-Reasoner-Zero (NeurIPS 2025)
- SPPO (ACL 2026)
- Memory-R1 (ACL 2026)
6.3.2.3 PMD
PMD (Policy Mirror Descent) is another technology roadmap used by KIMI. But is not as popular as GRPO/PPO.
6.4 Offline Agentic RL
- OREO (ACL 2025): Offline Reinforcement Learning for LLM Multi-step Reasoning
- Reward-Weighted Fine-Tuning (NeurIPS 2025): Offline RL by Reward-Weighted Fine-Tuning for Conversation Optimization