Factual fine-tuning · 2026 study

Learn new facts.
Keep the assistant.

InstructReplay reuses the initial model’s own assistant turns during factual fine-tuning to preserve how it responds.

Main results

Mean across six settings · percentage points

General forgetting ↓ lower is better

Naive SFT28.07
InstructReplay2.44

Domain acquisition ↑ higher is better

Naive SFT15.23
InstructReplay15.49
Both comparisons use the same 0–30 pp scale.
Model families
3
Domains
2
General benchmarks
5
Adaptation baselines
7

Main comparison

Highest trade-off score in all six settings.

InstructReplay outscored all seven adaptation baselines on S = A − F in each setting. Across the four transfer settings, its lead over the strongest baseline ranged from 5.16 to 24.11 points.

Per-setting results

Download CSV
Domain and modelSFT ASFT FReplay AReplay FReplay SBest baseline S
CommonCorpus · developmentSmolLM3-3B7.6225.105.664.661.01−5.83 · Self-Rewrite
CommonCorpus · developmentQwen3-4B8.7920.339.961.408.566.82 · Self-Rewrite
CommonCorpus · transferPhi-4-mini-instruct9.5723.519.962.747.222.06 · Self-Rewrite
PMC · transferSmolLM3-3B20.9042.9722.464.2618.20−5.91 · RAFT
PMC · transferQwen3-4B18.5519.7318.750.1718.589.79 · RAFT
PMC · transferPhi-4-mini-instruct25.9836.8126.171.3924.7811.86 · RAFT

A is the signed gain on 512 closed-book domain questions. F averages the nonnegative drops on five General benchmarks. Scores are in percentage points relative to the initial model.

See the change on each General benchmark
MethodIFEvalMMLUMATH-500BBHHumanEval+
Naive SFT−44.9−0.4−28.0−36.0−30.5
InstructReplay−2.6−1.3−0.2−0.7−1.0

These signed means differ from F, which clips gains before averaging the drops. MMLU is scored by option likelihood. Detailed results and protocol notes

Method

Replay the assistant turn.

Factual QA teaches short domain answers. Replay keeps the adapted model close to its original behavior on the general prompts and response prefixes where that behavior was expressed.

  1. Generate once

    Run 9,600 general instructions through the initial model’s native chat template and save the sampled replies as exact tokens.

  2. Pair the inputs

    Train on one domain QA sequence and one saved assistant turn per pair. Reuse the replay buffer for another domain on the same checkpoint.

  3. Match the reference

    Learn domain answers by cross-entropy. Apply forward KL to match the frozen initial model’s full next-token distributions on response positions in replay.

Loss = domain cross-entropy + 0.25 × replay forward KL

Each term averages over response tokens in a sequence before averaging over sequences.

Controlled comparisons

Where replay happens matters.

Applying the reference loss to the initial model’s assistant turns preserved instruction following better than applying it to domain answers or unprompted samples.

Mean IFEval drop by KL context

Domain answers43.3
BOS samples14.2
Assistant turns2.6
Percentage points across six settings. BOS replay and assistant-turn replay matched response-token budgets. Domain-KL saw fewer positions.

The model’s own answers retain more

With the same prompts and token loss, replaying answers from the initial model resulted in 3.1 pp forgetting. Replaying the tested dataset’s answers gave 7.5 pp.

On the initial model’s answers, soft targets gave 2.4 pp forgetting at the same replay weight.

See all controls

Reproduce

Run it yourself.

Try the evaluation math on your CPU or browser. To fine-tune, bring a local checkpoint, licensed data, and the benchmark scorers.

Try the calculation

Change five benchmark scores and domain counts, then export the same inputs for the Python CLI.

Open the playground

Fine-tune on your data

Generate replay once, train on paired inputs, and compare the initial and adapted checkpoints using the same protocol.

Training guide

Study scope. Three 3–4B-class families, two domains, 300 optimization steps, and shared General benchmark questions. Domain acquisition uses model judges without human calibration. The study leaves safety behavior, long-context use, and larger models open.

Share what happened in your run.

Successful, partial, and failed reproductions help show where the recipe transfers. The issue form captures the checkpoint, training setup, and evaluation protocol so others can compare results.