Glintwell
Post-training

From text predictor to helpful model

A pretrained model can continue any text, but it does not follow instructions, hold a conversation or reason carefully on its own. Post-training teaches it to. Today it is where much of a model's ability is unlocked.

Stage 1

Supervised fine-tuning

Show the model examples of a prompt and a great answer, in a fixed chat format, and train it to produce the answer. The loss is counted only on the answer, not the prompt.

  • Quality beats quantity. A few thousand carefully written examples can teach the format and style. Broad skill needs hundreds of thousands to a few million examples across writing, coding, math, reasoning, multilingual chat and tool use.
  • Where examples come from: people write them; strong models write them and people or automatic checks filter them; or the model being trained writes many answers and only the verified-correct ones are kept (rejection sampling).
  • Mix carefully. Too much of one skill makes others slip. Teams track a broad set of tests after every change to the mix.
  • Chat format: special tokens mark the system message, user turns, model turns and tool calls. Pick it once and keep it.
Stage 2

Learning from preferences

It is easier for people to say which of two answers is better than to write a perfect one. Preference learning uses those comparisons.

  • Reward model plus reinforcement learning. The classic method: train a reward model to predict which answer people prefer, then optimize the language model against it with a reinforcement learning method (often PPO), while a penalty keeps it close to where it started.
  • Direct preference optimization. Skip the separate reward model. Train directly on pairs of a preferred and a rejected answer, pushing up the odds of the first relative to the second. It is simpler and stable, and became the most common open method. Many variants exist: some need only a thumbs up or down, some drop the reference model, some add length control.
  • AI feedback. A strong model judges answers against a written list of principles, replacing much of the human labeling.
  • Watch for reward hacking. Models learn to please the judge rather than be right: longer answers, flattery, confident tone. Length controls, varied judges and held-out human checks help.
Stage 3

Reinforcement learning with checkable answers

For math, code and logic, you don't need a judge at all: you can check the answer. The final number matches, or the code passes its tests. This makes reinforcement learning cheap, honest and hard to fool.

  • Group relative policy optimization. For each prompt, sample a group of answers (say 16). Score each one. An answer's advantage is how much better it scored than the group's average. No separate value model is needed, which saves memory and simplifies training. This method was published in 2024 by a Chinese team for math and became the standard for reasoning training.
  • Practical fixes published since: let the update raise unlikely tokens more than lower likely ones (so the model keeps exploring), skip prompts where every answer is right or every answer is wrong (they teach nothing), average the loss over tokens rather than answers so long answers count fairly, and penalize answers that run past the length limit gently.
  • Good prompts matter most. Use problems the model solves sometimes but not always. Drop the ones it always gets right, and gradually make the set harder.
  • Rewards: correctness, plus small rewards for following the answer format and for staying in the user's language.
Stage 4

Reasoning models

A reasoning model writes out a long chain of thought before it answers: trying ideas, checking its work, backing up when it is wrong. In early 2025 an open Chinese report showed that this behavior can emerge from reinforcement learning alone on a pretrained model, with only checkable rewards. As training went on, the model's answers got longer and it began to re-check and correct itself on its own.

A published recipe in four stages

  1. Cold start: fine-tune on a few thousand clean, readable long reasoning examples, so the model starts with a good format.
  2. Reasoning RL on math, code, science and logic with checkable rewards, plus a reward for keeping one language.
  3. Rejection sampling: generate many answers with the improved model, keep the correct and readable ones (hundreds of thousands), add general chat data, and fine-tune again.
  4. Final RL over everything: checkable rewards for reasoning tasks and preference rewards for general helpfulness and safety.

What else has been learned

  • Thinking on and off. One model can answer quickly or think at length, switched by an instruction, and can be given a thinking budget in tokens.
  • More thinking, better answers, roughly in proportion to the log of the tokens spent, up to a point. Forcing the model to keep going when it tries to stop can improve hard answers.
  • Small datasets can go far: about a thousand very hard, well-chosen problems with careful solutions taught strong reasoning to a mid-size model.
  • Overthinking is a real cost: reasoning models can spend thousands of tokens on easy questions. Length penalties and mixed training help.
Stage 5

Tools and agents

  • Models learn to call tools (search, a code runner, a calculator, other programs) through a fixed format for tool calls and tool results.
  • Training data is built at scale by simulating thousands of tools and tasks, letting models attempt them, and keeping successful runs that a checker or judge approves.
  • Reinforcement learning in real environments, such as fixing real software issues with tests that must pass, trains models to take many steps, read errors and recover.
  • Long multi-step tasks stress memory and context length, so agent models are usually trained with long context from the start.
Stage 6

Safety and behavior

  • Teach the model to decline clearly harmful requests and to help fully with everything else. Over-refusing is a failure too.
  • Write down the principles the model should follow and use them to generate and judge training data.
  • Test with people and automated attackers who try to break the rules, and add what they find to training.
  • Keep honesty central: the model should say when it does not know.
Under the hood

Post-training infrastructure

  • Reinforcement learning spends most of its time generating answers, not learning from them. So training systems run a fast inference engine for rollouts next to the trainer, and copy new weights over after each update.
  • Asynchronous setups keep generating with slightly older weights while the trainer updates, so no chip waits.
  • Very long reasoning answers make batches uneven; systems split and pack them to keep chips busy.
  • Several open frameworks for this, and for fine-tuning in general, have been published by Chinese teams, along with step-by-step guides in Chinese.