Request a demo
All articles Guide

Reinforcement fine-tuning on your own GPUs: GRPO and reward functions you can test

When supervised fine-tuning is not enough, InsightDLM trains with GRPO against reward functions you define and test in the console: JSON schemas, field matches, rules and rubric judges that run inside your cluster.

November 19, 2026 · 7 min read

Supervised fine-tuning teaches a model to imitate good answers. That works well when you have good answers to imitate. It works less well when what you care about is easier to check than to write: valid JSON with the right fields, a label that matches the reviewer's, an amount within a cent, an answer that cites the policy form and promises nothing. For those tasks InsightDLM offers reinforcement fine-tuning with GRPO (group relative policy optimisation): the model tries several answers, a reward function scores them, and training pushes it towards the answers that scored better than their siblings.

How GRPO trains

For each prompt the model samples a group of answers (eight by default) using a vLLM engine on the same GPUs. Each answer is scored by your reward. An answer's advantage is how far its score is above or below the group's average, so the model learns from contrasts it produced itself. A KL penalty against the starting model stops it drifting into answers that game the reward. InsightDLM runs GRPO with LoRA adapters by default, on top of a model you have already fine-tuned with SFT.

Reward functions you can test before you train

A reward is defined once in the console and referenced by name from the recipe. Three kinds exist:

KindWhat it checksGood for
ruleAny weighted mix of: JSON schema, exact field match, several fields match, regex, required or forbidden keywords, length band, numeric value within tolerance. Combined by weighted mean, minimum, or all-or-nothing.Extraction, classification, structured outputs, format discipline
judgeA rubric and criteria scored by a judge model you run in your cluster, called through your own gatewayGrounded answers, tone, completeness: things a rule cannot see
learnedDerived from the accept and reject decisions reviewers made in the Curation Studio (defined in the console)Capturing house style from review history
The reward editor for a made-up triage reward: a rule reward with a JSON schema check (category and severity required, severity one of low, medium, high, critical) weighted 2 and a field match on category and severity weighted 3; on the right, two test samples scored: the first, valid JSON with matching fields, scores 1; the second, a sentence instead of JSON, scores 0 with reasons.
Test a reward on sample answers before spending GPU hours. The same code scores answers during training. Sample data.

The important property is that the console and the training job run the same reward code. If a reward gives a sentence-instead-of-JSON answer a zero in the test panel, it will do the same in training. Most failed reinforcement runs are reward bugs found too late; testing a handful of good and bad answers first catches most of them in minutes.

Four templates to start from

  • Structured extraction: valid JSON matching a schema, plus per-field accuracy against the reference.
  • Single-label classification: exact match on the predicted label.
  • Grounded answer: a judge rubric for faithfulness to the provided context, completeness and compliant tone (for an insurer: no promises of coverage).
  • Format and length discipline: length band and forbidden phrases, aggregated by minimum so one failure fails the answer.

Launching a run

The Launch training run dialog with a GRPO recipe selected, a reviewed dataset, the GPU pool left to best fit, the Triage label extraction reward selected, and a fit table showing the L40S pool fits at 33.8 of 48 GB per GPU on 8 GPUs, about 0.68 hours.
A GRPO run on a 9B model: the reward is chosen at launch and the fit check accounts for the rollout engine's memory. Simulator and sample data.
  1. Fine-tune with SFT first, so the model already produces the right shape of answer most of the time. GRPO improves a reasonable model; it rarely rescues a poor one.
  2. Create a recipe with method grpo. The template sets group size, prompt and completion lengths, temperature, the KL coefficient and colocated vLLM rollouts.
  3. Choose the reward at launch (or name it in the recipe). The fit check adds the memory the rollout engine needs.
  4. Watch the mean reward curve on the run page. A curve that shoots to 1.0 early usually means the model has found a loophole in the reward; read some samples before you trust it.
  5. Evaluate the new version against the same golden set as the SFT version. Promotion gates apply as usual, including no regression against production.

Hardware

GRPO needs more memory than SFT on the same model because the rollout engine shares the GPU. As planning guidance, a 7–9B model with LoRA runs on one 48 GB GPU; with QLoRA on a 24 GB GPU it runs, but slowly. Larger models use the multi-node grpo-ray driver, which puts rollouts and training on separate GPU groups.

Example · Harborline Mutual (fictional)

Triage labels that are always valid JSON

After SFT the claims-triage model produced the right label most of the time, but a small share of answers were prose, or JSON with a severity outside the agreed list, which the adjuster workbench could not parse. The team defined a rule reward (schema valid, category and severity match the reviewer's label) and ran GRPO on the SFT model. The question they let the evaluation answer: does the share of unparseable answers fall without the label accuracy getting worse?

Where it runs. Rule rewards and their test panel run in the control plane. GRPO training runs in the engine's job image (TRL's GRPO trainer, or verl on Ray for multi-node). Judge rewards call a judge route on your gateway, and learned rewards are defined in the console. The curves and fit figures on these screens come from the simulator, not from a training run.

Scope a domain model with us

Bring one bounded task, a sample of the data behind it and the answers a good model should give. We set up the project, the dataset review and the evaluation suite with you.

Request a demo