Technology Sep 10, 2026 · 5 min read

You Thought Training an AI Model Was Enough. Then There's Post-Training

Hello, I'm Rijul, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product. When you think of AI models being trained, it's not merely...

DE
DEV Community
by Rijul Rajesh
You Thought Training an AI Model Was Enough. Then There's Post-Training

Hello, I'm Rijul, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product.

When you think of AI models being trained, it's not merely about having a large set of data and training the model on it.

When you are putting the model as the brain for a chatbot, there is additional training required so that it can respond appropriately to questions.

This process is called post-training.

Let me walk you through it and give you a basic idea of how this works.

You Have a Raw Pretrained Model: What Next?

You have successfully pre-trained an AI model, and the model is good at predicting the next token based on the internet data it has learned from.

Now, this is a knowledgeable model.

But it's not necessarily helpful.

When asked a question, it could refuse to answer, continue the text in an unexpected way, or not follow the instruction properly.

So what we have here is essentially a text predictor.

But we need to turn it into an assistant.

First, let's understand Supervised Fine-Tuning.

Supervised Fine-Tuning

Think of SFT as showing the model thousands of worked examples:

"Here's a question, and here's exactly how a helpful assistant should answer it."

Humans, or sometimes strong existing models, create these example responses, and the model is trained on them using a process similar to pretraining.

This is a relatively direct way of teaching the model how we want it to behave.

It teaches things like following instructions, producing the expected format, and responding in a helpful way.

The main limitation is that the model is limited by the quality of the responses it is given.

And when you are thinking at a large scale, creating perfect answers for every possible question doesn't always scale.

Now, in this technique, we are giving the model examples of the responses we want.

There is another technique where, instead of giving just one ideal answer, we give the model preferences between different responses.

For example:

Question
   ↓
Response A: Better
Response B: Worse

The model can then learn which type of response is preferred.

For this, we will explore DPO and PPO.

Proximal Policy Optimization (PPO)


PPO is a reinforcement learning technique that can be used for post-training language models.

A simplified view looks like this:

  • Train a separate reward model using examples of human preferences, so that it can predict how good a response is.
  • Use the reward model to provide a reward signal while training the language model.

The language model is then optimized to produce responses that receive higher rewards.

Direct Preference Optimization

  • DPO was designed as a simpler alternative to the traditional reward-model-based approach.
  • There is no separate reward model in the DPO training process.
  • Instead, we directly tune the language model using preference data, teaching it to prefer one response over another.

DPO is generally easier to implement and can be cheaper than a PPO-based approach because it avoids training and maintaining a separate reward model during the preference optimization process.

Wrapping Up

It's important to understand that simply training a model on a large amount of data won't necessarily make it ready for the real world.

We need to perform the appropriate post-training steps so that the model becomes more useful, follows instructions, and responds in the way we expect from an assistant.


Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.

I'm building LiveReview, a blast-radius aware AI code review built for your business-critical systems.

Instead of presenting every diff with equal emphasis, LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.

Spend code review effort where business risk is highest — not spread evenly across every diff.

⭐ Star it on GitHub:

GitHub logo HexmosTech / LiveReview

Blast-Radius Aware AI Code Review for Business-Critical Systems

LiveReview

gitleaks.yml osv-scanner.yml govulncheck.yml semgrep.yml dependabot-enabled mcp-testcases.yml

LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems

LiveReview is an AI code reviewer that scores every hunk of a diff by blast radius: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.

blast-radius-demo.mp4

LiveReview's Blast Radius & Review Priority scoring, live in the diff viewer.
















The exact math, not a black box Visualize blast radius at a glance Every factor that feeds the score

How does Blast Radius scoring work? (a more technical explanation)

Here's the goal:

  • A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.
  • A 300-line UI change in one file, fully covered by…




Click below to try LiveReview with your codebase:

LiveReview Banner

DE
Source

This article was originally published by DEV Community and written by Rijul Rajesh.

Read original article on DEV Community
Back to Discover

Reading List