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:
| Kind | What it checks | Good for |
|---|---|---|
| rule | Any 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 |
| judge | A rubric and criteria scored by a judge model you run in your cluster, called through your own gateway | Grounded answers, tone, completeness: things a rule cannot see |
| learned | Derived from the accept and reject decisions reviewers made in the Curation Studio (defined in the console) | Capturing house style from review history |

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

- 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.
- Create a recipe with method
grpo. The template sets group size, prompt and completion lengths, temperature, the KL coefficient and colocated vLLM rollouts. - Choose the reward at launch (or name it in the recipe). The fit check adds the memory the rollout engine needs.
- 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.
- 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.
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?


