WorksComputer Science
InstructReplay: Replaying Assistant Turns to Preserve General Behavior During Factual Fine-Tuning
Abstract
Fine-tuning an instruction-tuned language model on new facts often erodes its general abilities. We find that standard fine-tuning lowers instruction-following, reasoning and coding benchmarks by 35 points on average, and that these losses track a collapse in answer length: fine-tuned models at least halve their responses, and the further a response drifts from the initial model's length, the more often it fails. We propose InstructReplay: the initial model answers a set of general instructions once, and during fine-tuning the model is kept close to the initial model on these answers. Across three model families and two domains, InstructReplay reduces the average decline on five general benchmarks from 28.1 to 2.4 points and keeps answer length close to the initial model's, while learning the new facts as well as standard fine-tuning. It balances learning and retention better than seven adaptation methods in all six settings. Controlled comparisons attribute the gain to replaying the model's own answers to general instructions rather than to the form of the loss.
Introduction
Practitioners often adapt an instruction-tuned language model to a domain by fine-tuning it on question–answer pairs that state new facts. The facts are learned, but at a cost elsewhere. Fine-tuned on recent biomedical articles, SmolLM3-3B answers 21 points more of the new questions correctly, yet its instruction-following accuracy on IFEval falls from 71% to 9%. Fine-tuning is known to be an inefficient way of adding knowledge [7, 24]. We study how to preserve general assistant behavior during closed-book factual fine-tuning.
Where does the damage occur? Standard fine-tuning sharply lowers accuracy on every benchmark that requires the model to generate an answer, from instruction following to mathematics, reasoning and code, yet barely changes MMLU, which we score by option likelihood. The adapted models also stop answering at length. Their responses shrink toward the short domain answers they were trained on, and the more a method shortens responses, the more accuracy it loses (§ 3). The adapted models thus stop behaving as the assistants they were, even though likelihood-based probes change little.
Replaying an earlier model’s predictions is a standard remedy for such losses ([17, 5]). A distillation penalty, however, constrains the model only at the prefixes where it is applied, so the choice of replay inputs decides which behavior is protected. Recent self-generated replay for instruction-tuned models samples from a beginning-of-sequence (BOS) token, outside the chat template ([20]), and context-free synthetic data likewise avoids external prompts ([3]). Self-synthesized rehearsal does use instruction contexts, but it synthesizes and refines them and trains on the refined outputs ([12]). What has not been isolated is which ingredients of replay matter: where the reference model is matched, whose responses are replayed, and in what form.
To study this question, we introduce InstructReplay, a minimal form of instruction-context replay (Figure 1). The initial model answers 9,600 general instructions once, and during domain training the model matches the frozen initial model’s full next-token distributions on these saved responses. We compare it with seven domain-adaptation methods and with three controlled variants. The first keeps the objective but applies it elsewhere, to samples generated from a beginning-of-sequence token or to the domain answers themselves. The second matches sampled tokens instead of full distributions, and the third replays the instruction dataset’s own answers instead of the model’s. Our findings are:
Figure 1. Overview of InstructReplay. (a) Before training, the frozen initial model answers each general instruction once under its chat template, and these assistant turns form the replay buffer; the dataset’s own answers are not used. (b) In each step the student matches ’s full next-token distribution at every saved prefix of the replayed turns while it learns domain answers with cross-entropy; the two losses share the student’s weights. (c) Equal-weight mean acquisition and forgetting over six model–domain settings, combining the adaptation methods in Table 3 and replay controls in Table 4. The green star marks InstructReplay; shading indicates .
Factual fine-tuning mainly damages generative behavior. Standard fine-tuning lowers the four generative benchmarks by 35 points on average and at least halves response length, while likelihood-scored MMLU barely moves (§ 3).
Instruction-context replay removes most forgetting while keeping acquisition on par with standard fine-tuning. Replaying the model’s own answers to general instructions reduces the average general decline from 28.1 to 2.4 points, and its acquisition stays within two points of standard fine-tuning in every setting (§ 6.1).
What is replayed matters more than how it is matched. Moving the same constraint from the domain answers to unprompted samples and then to the model’s own instruction responses reduces the average IFEval decline from 43 to 14 and then to about 3 points. Under sampled targets, replaying the dataset’s answers to the same instructions instead of the model’s own more than doubles forgetting, from 3.1 to 7.5 points, whereas soft and sampled targets perform similarly (§ 6.2).
Related Work
Learning new facts by fine-tuning. Facts that a model does not already know are learned more slowly than known ones and, once learned, increase hallucination ([7]), and retrieval augmentation outperforms unsupervised fine-tuning for knowledge injection ([24]). We take closed-book fine-tuning as given and study its cost to general behavior.
Preserving earlier behavior. Parameter-space penalties such as EWC protect weights deemed important for earlier tasks ([13]); low-rank adaptation ([11]) learns less and forgets less than full fine-tuning ([4]). Function-space methods instead match an earlier model’s outputs: Learning without Forgetting distills the old model on new-task inputs ([17]), Dark Experience Replay stores logits alongside rehearsed examples ([5]), and label annealing distills the initial model on the fine-tuning data itself ([33]). Rehearsing a small share of earlier tasks preserves abilities in sequentially fine-tuned language models ([27]). Forgetting after fine-tuning often reflects a shift in how the model responds rather than a loss of capability ([14, 35]), and updates driven by a model’s own on-policy outputs forget less than supervised fine-tuning on external targets ([29, 6]). Our Domain-KL baseline places the distillation term on domain answers, as label annealing does, and therefore isolates the choice of context.
Choosing what to replay. When the original training data are unavailable, replay must be constructed. Self-Synthesized Rehearsal generates and refines synthetic instructions ([12]); GeRe replays general text and compares label, logit and feature targets ([34]); Bansal and Sanghavi [3] train on context-free
| Benchmark | accuracy (pp) mean [min, max] | Median words | Median words SFT |
| Generated answers | |||
| IFEval | [, ] | 190 | 20 |
| MATH-500 | [, ] | 242 | 42 |
| BBH | [, ] | 122 | 54 |
| HumanEval+ | [, ] | 46 | 23 |
| Answer-option likelihood | |||
| MMLU | [, ] | – | – |
synthetic responses; and Marek et al. [20] apply frozen-reference forward KL to self-generated replay, sampled from BOS for instruction-tuned models. § 5.3 defines our BOS replay control.
Changing the domain supervision. Another line keeps the data but changes the targets: Self-Distillation Fine-Tuning rewrites gold answers with the initial model (Yang et al. [32]), on-policy self-distillation trains on the model’s own responses (Shenfeld et al. [28]; ); Agarwal et al. [1]), RAFT refines answers and adds adaptive distillation (Li et al. [16]), and DFT reweights target tokens (Wu et al. [31]). Both methods are called SDFT; we call the offline one Self-Rewrite.
Where Does Factual Fine-Tuning Hurt?
We first characterize the damage that motivates our method, using standard fine-tuning (Naive SFT) in the setup of §5. Three instruction-tuned models are each fine-tuned separately on 9,600 question–answer pairs from two domains and evaluated on five general benchmarks against the unchanged initial model .
The damage is concentrated in generation. Table 1 contrasts the four benchmarks that require the model to generate an answer with MMLU, which we score by the likelihood of the answer options. The generative benchmarks fall by 35 points on average, whereas MMLU stays within three points in every setting. On BIG-Bench Hard, the share of answers that the task-aware parser cannot extract rises from 6% to 45% (Appendix Table 12), so much of the loss comes from answers
| Benchmark | accuracy (pp) mean [min, max] | Median words | Median words SFT |
| Generated answers | |||
| IFEval | [, ] | 190 | 20 |
| MATH-500 | [, ] | 242 | 42 |
| BBH | [, ] | 122 | 54 |
| HumanEval+ | [, ] | 46 | 23 |
| Answer-option likelihood | |||
| MMLU | [, ] | – | – |
Table 1. Standard fine-tuning on domain facts versus , over six model–domain settings. Benchmarks that require a generated answer collapse and responses shorten; MMLU, scored by the likelihood of its answer options, barely moves and produces no response to measure. Median words (whitespace-separated) average the per-setting medians.
| Prompt: Write a letter to a friend in all lowercase letters ask them to go and vote. | |
| 155 words, ✓ | dear [friend’s name], i hope this letter finds you well and in good spirits. i wanted to take a moment to reach out and ask you to consider casting your vote in the upcoming election. … |
| Naive SFT 8 words, × | Please go and vote in the upcoming election. |
| InstructReplay 195 words, ✓ | dear friend, i hope this letter finds you well. i wanted to take a moment to ask you to consider going and voting in the upcoming election. … |
that no longer follow the task’s answer format.
Responses become short, and shortening predicts the loss. Median responses to IFEval prompts shrink from 190 to 20 words, and MATH-500 solutions from 242 to 42; Table 2 shows an example in which a request for a letter receives a single sentence. This matches the training data: domain answers average about 30 tokens, while the initial models’ answers to general instructions average about 340. Across the 60 adapted models, a model’s median response length relative to its is strongly rank-correlated with its accuracy change (Figure 2a). Spearman’s is 0.77 on IFEval, 0.81 on MATH-500 and 0.84 on BIG-Bench Hard (Appendix § 18).

Figure 2. (a) IFEval accuracy change versus median response length relative to for the 60 adapted checkpoints (Spearman ; Appendix Figure 7 adds MATH-500 and BBH). (b) Failure rate on questions that answers correctly, by the length of each response relative to ’s on the same question, pooled over the same checkpoints (Appendix Table 26).
| Prompt: Write a letter to a friend in all lowercase letters ask them to go and vote. | |
| 155 words, ✓ | dear [friend’s name], i hope this letter finds you well and in good spirits. i wanted to take a moment to reach out and ask you to consider casting your vote in the upcoming election. … |
| Naive SFT 8 words, × | Please go and vote in the upcoming election. |
| InstructReplay 195 words, ✓ | dear friend, i hope this letter finds you well. i wanted to take a moment to ask you to consider going and voting in the upcoming election. … |
Table 2. An IFEval prompt and SmolLM3’s responses on PMC (truncated; ✓/×: constraint met or not). After standard fine-tuning the model answers in one sentence, like its short training answers, and breaks the lowercase constraint (red); InstructReplay keeps ’s letter.
The losses are not only word-count failures. Naive SFT’s IFEval pass rate falls by 11 points on length constraints but by 55 points or more on constraints that require structure or specific content, such as formats, required openings and endings, and combined constraints (Appendix Table 25). Among questions that answers correctly, the failure rate of adapted models is lowest, below 20%, when a response stays within 25% of ’s length, and far higher when it is much shorter or much longer (Figure 2b). What predicts failure is thus departure from ’s response, of which shortening is the most common form.
Hypothesis. Fitting short domain answers shifts the model’s behavior in assistant turns toward terse, direct answers, which breaks instruction following and chain-of-thought formatting; knowledge probed by likelihood is affected far less. If the hypothesis holds, a retention penalty should be most effective when it is applied in the contexts where assistant behavior is exercised.
InstructReplay
Objective
Let be the initial instruction-tuned model with next-token distribution , and the distribution of its trainable copy. The domain data contain questions and source-supported answers. Before training, samples one response to each prompt of a general instruction collection under its native chat template, giving a fixed replay buffer . Let denote the response-token positions of a sequence. The domain loss is the per-sequence mean cross-entropy
and the replay loss matches ’s full-vocabulary distribution at every saved prefix :
We minimize with equal numbers of domain and replay sequences in every update. The reference is frozen, and inference uses only the adapted model. Appendix § 9 gives the local properties of .
Why instruction contexts?
Forward KL at a fixed prefix has logit gradient . It pulls the student toward the reference only at the prefixes in the replay set and affects other contexts only through shared parameters, so the choice of prefixes determines what is preserved. Near , the replay loss is a quadratic penalty whose curvature is built only from the logit Jacobians at the replayed prefixes (Appendix § 9). It resists parameter changes that alter the model’s outputs in those contexts and leaves other directions unconstrained. Domain-answer prefixes, as in Domain-KL, lie in exactly the contexts that is changing. BOS-conditioned samples are free-form continuations generated without the chat template, which an instruction-tuned model rarely encounters at inference. Responses to general instructions under the native template place the constraint on assistant turns spanning instruction following, reasoning, mathematics, code and translation. These are the contexts in which general benchmarks and users query the model, and in which § 3 located the damage. § 6.2 tests this ordering, comparing instruction and BOS contexts at a matched response-token budget.
We use soft targets because they exert no pull where the student already agrees with the reference, whereas a sampled token yields a nonzero gradient at every prefix (Appendix § 9). A token sampled from still gives an unbiased estimate of the forward-KL gradient, so the two targets differ in variance rather than in what they preserve, and we expect the choice of prefixes, not the form of the target, to matter most. § 6.2 compares soft and sampled-token targets at the same replay coefficient.
Experimental Setup
Models, domains and replay data
We adapt SmolLM3-3B (Bakouch et al., [2]), Qwen3-4B (Qwen Team, [26]) and Phi-4-mini-instruct (Microsoft, [21]); each domain adaptation starts from the unchanged checkpoint . Each domain provides 9,600 training question–answer pairs and 512 evaluation questions that ask about taught facts in new wording, without a source passage. CommonCorpus energy/engineering (PleIAs, [25]) draws on technical documents; PMC biomedical (National Library of Medicine, [22]) uses CC BY 4.0 articles published online between May and August 2026, after all three models were released. Appendix § 10 describes construction, examples and the extent to which some questions cue part of the answer.
The replay collection holds 9,600 prompts from UltraData-SFT ([23]), split equally across instruction following, academic tasks, mathematics, code and translation and selected without reference to model scores. Each model samples its own responses (temperature 1, at most 512 tokens); the dataset’s own assistant answers are used only by the Gold replay control (§ 5.3).
Measuring acquisition and forgetting
Acquisition. Three judges from different model families (Qwen3.8-27B, Gemma-4-31B-it, GPT-OSS-20B) compare each greedy answer with a source-supported fact card; an answer is confirmed when at least two judges validly find all core facts supported. With and confirmations for the adapted model and out of questions, acquisition is . Unresolved and ineligible questions stay in the denominator; on CommonCorpus, a fixed fact-card rule makes 374 of the 512 questions eligible (Appendix § 10.§ 4).
Forgetting. We measure general ability on fixed subsets of IFEval ([36]), MMLU ([9]), MATH-500 ([10, 18]), BBH ([30]) and HumanEval+ ([19]), using the same questions across models and methods. Subset sizes and selection procedures are detailed in Appendix § 10.§ 5. With and the adapted and initial scores on benchmark , forgetting is the mean decline , and is the largest single decline. We summarize the trade-off by , but report and throughout and show in § 6.3 that the conclusions hold for any weighting that puts forgetting at more than 0.31 times acquisition.
Baselines and controls
Domain-adaptation baselines. Naive SFT and LoRA-SFT train on the gold answers; Self-Rewrite, SDFT and RAFT change the domain supervision; DFT reweights target tokens; and Domain-KL adds our KL term () on domain-answer prefixes. Appendix § 11 and Table 13 give their implementations.
| Method | Training input and target | Reference / teacher | Training objective / main change |
| Naive SFT | Domain question and supplied answer | None | Full-parameter CE |
| LoRA-SFT | Same domain pairs | None | Rank-16 adapters; learning rate |
| Self-Rewrite | Domain question and M0 rewrite; original-answer fallback | Initial model for offline rewriting | CE on fixed rewritten answers |
| SDFT | Current-student domain responses with demonstrations | Teacher EMA, updated each optimizer step | Full-vocabulary forward KL, temperature 1 |
| DFT | Domain question and supplied answer | Detached current-student probability | Target-token probability weights CE |
| RAFT | Refined answer and student domain responses | Frozen M0 with answer-conditioned context | CE plus top- forward KL; rank-local loss EMA ratio |
| Domain-KL | Domain gold-answer prefixes | Frozen initial model | CE plus 0.25 forward KL on domain prefixes |
| InstructReplay | Domain pairs plus saved general-instruction responses | Frozen initial model | Domain CE plus 0.25 forward KL on instruction prefixes |
| BOS replay | Domain pairs plus BOS-generated responses | Frozen initial model | Same replay objective; BOS contexts and matched response tokens |
| Hard | Domain pairs plus the same instruction responses as InstructReplay | No teacher in the optimized replay loss | Domain CE plus 0.25 next-token CE on replay |
| Gold replay | Domain pairs plus the collection’s own answers to the same instructions | None | Domain CE plus 0.25 next-token CE on replay |
Table 13. Baseline configuration matrix: inputs, targets and references under the shared training protocol. Method-specific adaptations are described in Appendix § 11.§ 2. BOS replay, Hard and Gold replay are controlled variants of InstructReplay that change only the replay context, the target or the source of the replayed answers; they are not tuned baselines.
Replay controls. Three controls keep InstructReplay’s , 1:1 ratio and schedule and change one component at a time. BOS replay changes the context: it applies the KL to samples generated from a beginning-of-sequence token without the chat template, the sampling used by Marek et al. [20]. This comparison evaluates BOS sampling under our training protocol, not their full method; Appendix § 16 lists the configuration differences. Hard changes the target: it keeps InstructReplay’s saved responses but replaces the KL with next-token cross-entropy. Both match InstructReplay’s number of response tokens sequence by sequence. Gold replay changes the author of the replayed answers: it keeps Hard’s prompts and loss but trains on the collection’s own assistant answers, truncated to 512 tokens.
Training. Every method runs 300 optimizer steps with 32 domain sequences per step, so all methods see the same domain examples and are evaluated at the same step; replay methods add 32 replay sequences per step. Full-parameter methods use a constant learning rate of and LoRA uses (Appendix § 11). The replay ratio, and the schedule were tuned on CommonCorpus with SmolLM3 and Qwen3 and transferred unchanged to Phi-4-mini and to PMC.
Study design and uncertainty
PMC tests the same recipe, unchanged, on a second domain. For question-sampling uncertainty we use a paired cluster bootstrap that resamples domain questions by shared source and general-benchmark questions within benchmark strata, with Bonferroni correction over all 36 pairs among the eight methods and in each setting (Appendix § 14).
Results
Main comparison
Instruction-context replay removes most forgetting and keeps acquisition on par with standard fine-tuning. InstructReplay has the highest in all six settings (Table 3). The gain comes almost entirely from reduced forgetting. Averaged over the six settings, InstructReplay’s general decline is 2.44 points against 28.07 for Naive SFT, and it stays below 4.7 in every setting, whereas the lowest-forgetting baseline in each setting loses at least 3.73. No general benchmark loses more than 3 points on average under InstructReplay, whereas standard fine-tuning loses 28 or more on each generative benchmark. Its acquisition is within 1.95 points of Naive SFT or higher in every setting, and its average of 15.49 is second only to RAFT’s 16.15. InstructReplay Pareto-dominates 35 of the 42 baseline points in the – plane (Figure 3); each exception acquires at most 3.1 points more but forgets at least 2.33 points more.
| Method | CommonCorpus: SmolLM3 | CommonCorpus: Qwen3 | CommonCorpus: Phi-4-mini | PMC: SmolLM3 | PMC: Qwen3 | PMC: Phi-4-mini | Mean of six | Mean of six |
| Naive SFT | −17.49 | −11.54 | −13.94 | −22.07 | −1.17 | −10.83 | 15.23 | 28.07 |
| LoRA-SFT | −16.02 | −8.63 | −7.88 | −9.90 | −0.87 | −8.04 | 5.11 | 13.67 |
| Self-Rewrite | −5.83 | 6.82 | 2.06 | −11.76 | 8.44 | 7.50 | 12.73 | 11.52 |
| SDFT | −10.82 | −0.72 | −0.88 | −10.65 | −9.29 | −1.48 | 8.53 | 14.17 |
| DFT | −30.55 | −20.04 | −24.10 | −42.25 | −26.24 | −23.15 | 2.90 | 30.62 |
| RAFT | −10.23 | 6.80 | 0.80 | −5.91 | 9.79 | 11.86 | 16.15 | 13.96 |
| Domain-KL | −13.83 | −6.60 | −4.79 | −15.31 | −7.66 | 9.04 | 14.03 | 20.55 |
| InstructReplay | 1.01 | 8.56 | 7.22 | 18.20 | 18.58 | 24.78 | 15.49 | 2.44 |
| vs. best baseline | +6.84 | +1.74 | +5.16 | +24.11 | +8.80 | +12.93 |
Table 3. Acquisition–retention score (pp; has ), with six-setting means of acquisition and forgetting . In each column, bold marks the best value and underlining the second best (highest or , lowest ); in the columns the underlined entry is therefore the strongest baseline. The shaded row is InstructReplay. Figure 3 shows the per-setting decomposition; Table 14–Table 15 give all raw scores.

Figure 3. Acquisition versus forgetting for every method, including the two replay controls (open markers). Upper left is better; the shaded region has and the dashed line marks . Forgetting shares one scale; acquisition scales differ by domain.
The closest competitors are those that also keep the model near its own distribution. Self-Rewrite, which trains on ’s rewrites of the gold answers, is the strongest baseline on CommonCorpus, and RAFT, which adds distillation to refined answers, is the strongest on PMC. The closest case is CommonCorpus Qwen3, where InstructReplay acquires 0.59 points less than Self-Rewrite but forgets 2.33 points less, a margin of 1.74 in . Elsewhere the margin is at least 5.16 points and reaches 24.11, driven by forgetting: on PMC SmolLM3, for example, RAFT forgets 26.42 points against InstructReplay’s 4.26.
InstructReplay keeps the initial model’s answer length. Its median response length stays within 15% of ’s on IFEval, MATH-500 and BBH, whereas standard fine-tuning at least halves it (Appendix § 18). On questions that answers correctly, 69% of InstructReplay’s responses fall in the near- band of Figure 2b, where failures are rarest, against 24% for standard fine-tuning.
Where to constrain and what to match
The location of the constraint drives retention. Table 4 holds the objective fixed and moves it. Placing the KL on domain-answer prefixes barely helps: IFEval still falls by 43 points and responses remain a fifth of their original length. Placing it on BOS-conditioned samples, which are generated without the chat template, recovers about two thirds of the IFEval loss. Placing it on the model’s own answers to general instructions recovers almost all of it, and restores response length to 85% of ’s. Acquisition stays between 14.0 and 15.7 points throughout, so the differences in come from forgetting. At an identical response-token budget, InstructReplay has higher than BOS replay in all six settings, by 1.28 to 11.05 points, and lower in each (Appendix § 16).
| Replay context (method) | Target | Mean change vs. (pp) IFEval | Mean change vs. (pp) MATH | Mean change vs. (pp) BBH | Mean change vs. (pp) MMLU | Mean change vs. (pp) HE | Length IFEval | Mean of six (pp) | Mean of six (pp) | Mean of six (pp) |
| None (Naive SFT) | – | −44.9 | −28.0 | −36.0 | −0.4 | −30.5 | 0.11 | 15.2 | 28.1 | −12.8 |
| Domain-answer prefixes (Domain-KL)* | soft | −43.3 | −12.7 | −23.7 | +0.1 | −21.4 | 0.19 | 14.0 | 20.6 | −6.5 |
| BOS samples, no template (BOS replay) | soft | −14.2 | −6.2 | −6.2 | −0.8 | −15.9 | 0.62 | 15.6 | 9.2 | 6.4 |
| Instruction prompts, dataset answers (Gold replay) | dataset | −7.4 | −4.3 | −6.7 | −5.3 | −10.9 | 0.74 | 15.7 | 7.5 | 8.2 |
| Instruction responses (Hard) | sampled | −4.0 | −0.3 | +0.8 | −0.9 | −5.7 | 0.82 | 15.0 | 3.1 | 11.9 |
| Instruction responses (InstructReplay) | soft | −2.6 | −0.2 | −0.7 | −1.3 | −1.0 | 0.85 | 15.5 | 2.4 | 13.1 |
Table 4. Moving the retention constraint, averaged over six settings. All replay variants use , a 1:1 sequence ratio and 300 steps; BOS replay and Hard also use exactly InstructReplay’s response-token budget, so each differs from it mainly in the replay context or the target; Gold replay differs from Hard mainly in training on the dataset’s answers instead of ’s (2.8M response tokens per model). HE is HumanEval+. Length is the median IFEval response length relative to . In each column, bold marks the best value and underlining the second best (smallest decline, length closest to , highest and , lowest ); the shaded row is InstructReplay. *Domain-KL constrains about one tenth as many positions (0.20–0.36M versus 3.0–3.5M per model). Per-setting scores are in Table 22.
**Self-generated answers reduce average forgetting. Gold replay uses the prompts and loss of Hard but trains on the collection’s own answers. It acquires as much as InstructReplay, 15.7 against 15.5 points on average, and exceeds the strongest of the seven baselines in five of six settings, yet it forgets more than twice as much as Hard, which replays ’s answers with the same loss, 7.5 against 3.1 points. Its is lower than InstructReplay’s in all six settings, by at least 2.06 points. On SmolLM3 it lowers MMLU by 18.2 and 12.3 points, where no other method loses more than 4.6 (Appendix § 16). With the instruction prompts held fixed, self-generated answers preserve general performance better on average than the dataset answers tested here.
Soft and sampled targets perform similarly at the shared coefficient. Replacing the soft targets with the saved tokens themselves, as Hard does, leaves forgetting almost unchanged: 3.1 versus 2.4 points on average. InstructReplay has the higher in five settings and Hard in one, CommonCorpus SmolLM3, by 0.88 points; no difference exceeds 2.29 points. At a fixed prefix, the expected sampled-token gradient equals the forward-KL gradient (Appendix § 9); Hard can omit the reference forward pass from the replay loss. At this shared coefficient, both preserve assistant behavior, while replay context and answer source produce larger differences in average forgetting.
How robust are the conclusions?
Question sampling. Against the strongest baseline, the corrected interval excludes zero in the three PMC settings (Table 5), and across all 42 InstructReplay–baseline pairs it excludes zero in 37 (Appendix § 14). Appendix Table 18 gives the corresponding intervals against the three replay controls.
| Setting | vs. | 95% CI | |
| CC Smol | S-R | 6.84 | [−0.40, 14.11] |
| CC Qwen | S-R | 1.74 | [−5.20, 8.36] |
| CC Phi | S-R | 5.16 | [−2.15, 13.01] |
| PMC Smol | RAFT | 24.11 | [14.28, 32.91] |
| PMC Qwen | RAFT | 8.80 | [1.33, 16.32] |
| PMC Phi | RAFT | 12.93 | [3.58, 21.22] |
Table 5. InstructReplay minus the strongest baseline (S-R: Self-Rewrite; CC: CommonCorpus). The CI is a paired cluster-bootstrap percentile interval, Bonferroni-corrected over all 36 pairs among the eight methods and in each setting.
Training runs. Repeating training three times for InstructReplay, Self-Rewrite and RAFT leaves the ranking unchanged. InstructReplay has the highest mean in every setting and exceeds both baselines in 35 of the 36 run-by-run comparisons (Appendix § 15).
Weighting of acquisition and forgetting. weights acquisition and forgetting equally. Under , InstructReplay has the highest score among the seven baselines in every setting whenever ; the binding case is RAFT on CommonCorpus Qwen3, and on PMC SmolLM3 and Qwen3 it is highest for every . If gains on some benchmarks are instead allowed to offset losses on others, , InstructReplay still has the highest value in every setting.
Answer quality and judging. Requiring every designated detail and no unsupported material claims, which we call full-answer confirmation, leaves InstructReplay ahead of all seven baselines, BOS replay and Hard in all six settings, with acquisition between 6.84 and 31.64 points. Scoring CommonCorpus over its 374 eligible questions only rescales acquisition and leaves InstructReplay ahead of every baseline and BOS replay. On CommonCorpus, BOS replay and Hard each leave 128 questions without a judge majority, against 30 for InstructReplay; Appendix § 10.§ 4 bounds the effect of these labels.
Analysis
Replay source. The diagnosis in § 3 ties the loss of general ability to responses that drift away from ’s. Replay counters this drift best when its targets are ’s own responses in assistant turns. Domain-answer prefixes cover only short factual answers, and BOS samples lie outside the chat template. The dataset’s answers are assistant turns in a different style, so fitting them moves the model away from in another direction (Appendix § 16). Gold replay keeps ’s MATH-500 response length yet loses 4.3 points there, against 0.2 for InstructReplay, so matching length alone does not preserve accuracy. Updates driven by a model’s own outputs have likewise been found to forget less than training on external targets (Shenfeld et al., [29]; Chen et al., [6]).
Knowledge-level changes. InstructReplay keeps assistant behavior close to ’s, and its MMLU score changes little, by points on average. The largest change, on CommonCorpus SmolLM3, does not come from output format, since the four options keep nearly all of the probability mass at the scored position, as they do for . It also varies across training runs (Appendix § 15).
Retention weight. We chose among on CommonCorpus with SmolLM3 and Qwen3, where it gave the highest for both (Appendix § 13). Relative to no replay, which at is identical to Naive SFT, the selected replay weight lowers from 25.10 to 4.66 for SmolLM3 and from 20.33 to 1.40 for Qwen3. Larger weights trade acquisition for retention unevenly: at , Qwen3 forgets slightly less but loses a quarter of its acquisition. Because was selected on these two settings, the four transfer settings, Phi-4-mini and all of PMC, are the fairer test of the recipe, and there InstructReplay leads the strongest baseline by 5.16 points or more in .
Cost. InstructReplay doubles the sequences per step and replays about 3M response tokens per model, roughly an order of magnitude more than its domain tokens. Yet its PMC training takes at most 2.22 GPU-hours per model, against at least 4.83 for RAFT, and the buffer is generated once per model and shared across domains (Appendix § 13).
Conclusion
Fine-tuning small instruction-tuned models on new facts mainly damaged their generative behavior: generative benchmarks collapsed and responses shrank, while likelihood-scored MMLU barely moved. Replaying the initial model on general instructions largely prevented this damage at little cost to acquisition. In the controlled comparisons, assistant-turn replay gave lower average forgetting than BOS-conditioned and domain-answer replay, and self-generated answers gave lower average forgetting than the tested dataset answers. Soft and sampled targets performed similarly at the shared coefficient. For practitioners, about ten thousand general instructions answered once by the model being adapted are an inexpensive safeguard. Small MMLU declines under replay and larger models remain open.
Limitations
Evaluation. Domain acquisition relies on model judges without human calibration, judges of the same families also score RAFT’s training targets, and invalid-vote rates differ between methods. Some evaluation questions cue part of the answer. Publication dates alone cannot rule out that related facts appeared in pretraining.
Coverage of general ability. Our evaluation covers five general benchmarks that overlap in kind with the replay mixture; whether retention extends to abilities absent from the replay data, such as safety behavior or long-context use, remains untested. MMLU is scored by likelihood and is therefore insensitive to generation failures.
Comparisons. The replay controls use the shared settings in § 5.3; configuration differences and the Gold replay formatting diagnostic are detailed in Appendix § 16. Method-specific tuning remains open. The study covers three models from different families, all at the 4B scale, two domains and short training (300 steps), and the six settings share general-benchmark questions and are therefore not independent.
Ethics and Reproducibility
Biomedical scores measure factual answering about research articles and do not support clinical use. PMC sources were selected for CC BY 4.0 licenses; the UltraData repository declares Apache-2.0 and requires compliance with incorporated upstream licenses, and full-text redistribution awaits row-level clearance. The accompanying supplement provides the paper source, result tables, hash-anonymized domain labels, scoring materials and a verification script (Appendix § 17).
Properties of the Retention Loss
For a fixed prefix, let be student logits, , and the frozen reference distribution. Expanding forward KL gives . Differentiation yields and . At , both the loss and its first derivative vanish. Its Hessian is positive semidefinite, since for any vector ,
For smooth logits , the parameter-space Hessian at is . The terms involving second derivatives of the logits vanish because the logit gradient is zero at that point. Choosing a sequence uniformly from , then a position uniformly from , defines
Averaging the fixed-prefix Hessian gives
Here is the logit Jacobian at . The expansion assumes finite logits, twice differentiability near , and a fixed mask and prefix set. The positive-semidefinite Hessian describes local sensitivity on the saved replay contexts and may have a null space.
For a hard token at a fixed prefix, the logit gradient at initialization is . Its expectation is zero and its covariance is , with expected squared norm . At any student distribution , the sampled-token gradient has expectation , the forward-KL gradient, so cross-entropy on tokens sampled from is an unbiased single-sample estimate of the same objective up to the constant entropy of . These identities condition on the prefix and sampling distribution. Capping responses and averaging each sequence by its valid length defines the empirical prefix weighting above, distinct from the unnormalized KL between complete response distributions.
For a retention-only update at the reference point, zero parameter change also requires zero weight decay, fresh optimizer state, and identical deterministic student/reference behavior. In mixed training, the domain gradient can still update the student. Appendix C summarizes implementation checks.
Data and Evaluation Protocol
Domain data construction
CommonCorpus ([25]) energy/engineering passages are organized into source-supported fact groups. A 9,600-row training set and 512 evaluation questions ask about the same taught facts using different formulations.
The PMC Open Access Subset ([22]) supplies 4,500 fixed article candidates: license/date checks retain 2,161 and topic screening retains 1,661. Eligible articles declare CC BY 4.0, online publication from 1 May through 31 August 2026, and acceptance in 2026 or later. Fixed hash selection retains 3,561 of the 4,170 qualified fact groups, the same number as in CommonCorpus. The training questions cover 1,450 articles; the evaluation questions cover 512 taught facts from 440 articles. PMC admission requires M0’s confirmation rate to stay below 30% for each model. The criterion applies to the whole collection and does not select questions from model-specific errors.
For both datasets, Qwen3.5-35B proposes alternate questions for existing answer propositions; Qwen3.8-27B audits evidence support, including a negative control in each request. Generation uses temperature 0, top- 1, and a 512-token limit; audit responses allow 1,024 tokens. The alternate-question generation stage receives an existing training question, its answer proposition and source evidence, without the evaluation question wording. The builder accepts only candidates that pass its lexical checks and all seven checks: evidence answerability, question–answer relevance, answer support, self-contained wording, natural wording, no answer leakage, and meaningful rewording; abstentions are excluded. The supplement’s data cards give the retained counts at each stage.
The supplement’s confirmation-transition table separates previously unconfirmed answers that become confirmed from confirmed answers that lose confirmation. For CommonCorpus Smol Instruct-8B-Reply, these counts are 59 and 30, yielding net acquisition pp. Unconfirmed answers combine valid negative judgments and unresolved cases. For each of the 54 Table 3 rows, the net transition equals ; the supplement provides all transition counts.
For PMC, the initial Smol/Qwen/Phi checkpoints confirm 83/95/57 of 512 answers. The training sources cover genetics/genomics, immunology, neuroscience, oncology and infection research.
The CommonCorpus split is defined by a training manifest with file hashes: 6,889 source tasks define 3,564 source fact groups; normalization removes 213 duplicate tasks and retains 3,561 distinct fact groups. A fact with multiple question formulations supplies a held-out formulation while remaining questions expose that fact in training; singleton facts stay training-only. The 9,600-row pack contains 6,164 retained questions and 3,436 accepted augmentations. The passage filter uses language and engineering keyword profiles; passages are thus selected by vocabulary rather than by subject classification, and the collection includes technical computing articles such as the first example below. Parent records retain source identifiers and license labels. PMC uses the article selection described above; 6,610 retained questions plus 2,990 augmentations form its training set.
Source-linked examples.
A CommonCorpus fact comes from the SPARF article of Hamdi et al. [8], released under CC BY 4.0. The source states: “INGP [46] uses multi-resolution voxel hashing to perform a real-time rendering of radiance fields.” Its scored CORE proposition links multi-resolution voxel hashing to real-time rendering. The evaluation question supplies the mechanism but leaves the real-time effect to be stated; the reference answer also discusses MLP redundancy, outside the scored CORE. This makes the question a test of the effect given a mechanism cue. The training question is “How does INGP perform real-time rendering of radiance fields?” The evaluation question is “How does INGP use multi-resolution voxel hashing to address rendering limitations in radiance fields?” The supplement provides the fact card and both question–answer pairs. The public article contains the quoted passage.
The following case comes from the PMC evaluation. The simvastatin study of Li et al. [15] was released under Creative Commons Attribution. Its abstract states: “In vivo, pmPLGA@SV treatment dramatically reduced the cerebral infarct volume, exhibiting significant superiority over free SV.”
Replay population
The source is openbmb/UltraData-SFT-2605, revision affda6aca75e7cff78e73f93ad08d4c3b01f097c. The 9,600 prompts allocate 1,920 each to instruction following, academic tasks, mathematics, coding, and translation. Mathematics splits equally between Math and Multi-lang-Math. Selection uses deterministic hash ranking and normalized prompt deduplication, preserving the parent train/monitor split, and excludes prompts over 4,096 UTF-8 bytes. Selection is independent of model scores. Prompt lengths range from 27 to 4,078 bytes, with a mean of 779.
Final assistant turns are removed, and the remaining conversation must end with a user message. Earlier system/user/assistant turns remain as input context; 25 of 9,600 prompts contain earlier assistant turns. Each model generates its own targets once, without correctness filtering. A lexical comparison against the General evaluation questions and few-shot examples found no normalized exact, substring, or trigram candidates. The check covers lexical overlap; semantic overlap and pre-training exposure remain unmeasured.
Replay generation and masks
Native chat templates use enable_thinking=False. General-response sampling uses temperature 1, top-p 1, top-k 0, and at most 512 new tokens; generation stops at the model’s EOS and includes that terminal token in supervision. Phi accepts its two native stopping
| Domain | Train/eval questions | Train/eval documents | Train/eval fact groups |
| CommonCorpus | 9,600 / 512 | 961 / 386 | 3,561 / 512 |
| PMC | 9,600 / 512 | 1,450 / 440 | 3,561 / 512 |
Table 6. Dataset sizes. Both domains assess taught facts with rephrased evaluation questions. Source identifiers and construction metadata are in the supplement’s data cards.
IDs. Prompt and padding positions are masked; nonempty response tokens are retained without a separate reasoning-token mask. Materialization rejects rows exceeding the training length limit. In Smol/Qwen/Phi order, response lengths average 363.11/351.59/312.14 tokens, with medians 424/417/329 and 90th/95th percentiles of 512 for all three. Actual length-cap stops occur in 3,960/3,975/3,251 of 9,600 responses; EOS at exactly 512 tokens accounts for the difference from raw length counts. All retained responses contain at least one target token.
Domain scoring
Eligibility and timing. The CommonCorpus rule requires a mechanically valid fact card and usable-card judgments from both Gemma and GPT-OSS. Mechanical validity requires answerability, nonempty facts and requirements, unique fact IDs, at least one CORE fact, and verbatim source quotes. Of 512 records, 68 are marked unanswerable by the card builder, four have no resolved builder result, and 26 fail quote matching. Among the 414 mechanically valid cards, four fail both audits, 24 fail only Gemma’s audit and 12 fail only GPT-OSS’s audit, leaving 374 eligible. These mutually exclusive counts reconstruct the fixed mask distributed with the supplement.
We keep all 512 questions in the denominator, so the maximum attainable CommonCorpus rate is 374/512 = 73.05%. Eligibility uses the question, source evidence, reference answer and fact-card audits, without the candidate answers.
A fact card identifies each required proposition, its CORE or REQUIRED_DETAIL role, and an exact source quote. Scoring prompts contain the question, source evidence, key, and one candidate answer, without a method name or competing answer. Judges assign SUPPORTED, OMITTED, CONTRADICTED, or UNCLEAR per fact and separately label material extra claims. Valid records must cover the exact fact IDs and cite matching answer/source substrings. All CORE facts must be supported; a relevant contradiction makes the core vote negative. Unsupported additional claims are reported separately and do not automatically veto core confirmation; they do affect the stricter full-answer measure. Ineligible tasks, unresolved records, and insufficient valid votes remain unconfirmed in the denominator of 512. Two positive valid core votes confirm an answer.
Judging uses temperature 0, top-p 1, and at most two total format attempts per call, without hidden client retries. In the focused CC records, Smol uses a 180-second timeout and Qwen/Phi use 600 seconds; judge token budgets range from 3,072 to 8,192, as recorded per run. Qwen and Gemma disable thinking; GPT-OSS uses low reasoning effort. The supplement gives the complete prompts and the quote-validation function. Constructed positive/negative controls check implementation behavior. Prompt-order and repeat diagnostics are recorded separately from the scoring votes.
Full-answer sensitivity. Core confirmation asks whether the taught core fact is stated correctly; full confirmation additionally requires designated details and no material unsupported extras. The core/full gap combines omitted details, unsupported extras and unresolved judgments. Table 7 compares methods using each measure’s own M0 count and the same F.
| Method | Core n | Full n | ||||
| CommonCorpus — SmolLM3-3B | ||||||
| M0 | 50 | 4 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 89 | 57 | 7.62 | 10.35 | 25.10 | -14.75 |
| Self-Rewrite | 76 | 14 | 5.08 | 1.95 | 10.91 | -8.96 |
| RAFT | 95 | 22 | 8.79 | 3.52 | 19.02 | -15.50 |
| BOS replay | 87 | 57 | 7.23 | 10.35 | 7.50 | 2.85 |
| InstructReplay | 79 | 53 | 5.66 | 9.57 | 4.66 | 4.91 |
| CommonCorpus — Qwen3-4B | ||||||
| M0 | 38 | 6 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 83 | 47 | 8.79 | 8.01 | 20.33 | -12.32 |
| Self-Rewrite | 92 | 35 | 10.55 | 5.66 | 3.73 | 1.93 |
| SDFT | 83 | 30 | 8.79 | 4.69 | 9.51 | -4.82 |
| RAFT | 93 | 46 | 10.74 | 7.81 | 3.94 | 3.87 |
| BOS replay | 92 | 57 | 10.55 | 9.96 | 11.04 | -1.08 |
| InstructReplay | 89 | 49 | 9.96 | 8.40 | 1.40 | 7.00 |
| CommonCorpus — Phi-4-mini | ||||||
| M0 | 33 | 9 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 82 | 49 | 9.57 | 7.81 | 23.51 | -15.70 |
| Self-Rewrite | 78 | 23 | 8.79 | 2.73 | 6.73 | -4.00 |
| SDFT | 72 | 36 | 7.62 | 5.27 | 8.50 | -3.23 |
| RAFT | 95 | 35 | 12.11 | 5.08 | 11.31 | -6.23 |
| BOS replay | 76 | 44 | 8.40 | 6.84 | 11.12 | -4.28 |
| InstructReplay | 84 | 44 | 9.96 | 6.84 | 2.74 | 4.10 |
| PMC — SmolLM3-3B | ||||||
| M0 | 83 | 23 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 190 | 179 | 20.90 | 30.47 | 42.97 | -12.50 |
| LoRA-SFT | 112 | 105 | 5.66 | 16.02 | 15.57 | 0.45 |
| Self-Rewrite | 162 | 115 | 15.43 | 17.97 | 27.19 | -9.22 |
| RAFT | 188 | 124 | 20.51 | 19.73 | 26.42 | -6.69 |
| BOS replay | 188 | 175 | 20.51 | 29.69 | 5.30 | 24.39 |
| InstructReplay | 198 | 185 | 22.46 | 31.64 | 4.26 | 27.38 |
| PMC — Qwen3-4B | ||||||
| M0 | 95 | 44 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 190 | 175 | 18.55 | 25.59 | 19.73 | 5.86 |
| Self-Rewrite | 191 | 157 | 18.75 | 22.07 | 10.31 | 11.76 |
| RAFT | 183 | 167 | 17.19 | 24.02 | 7.40 | 16.62 |
| BOS replay | 192 | 179 | 18.95 | 26.37 | 6.00 | 20.37 |
| InstructReplay | 191 | 172 | 18.75 | 25.00 | 0.17 | 24.83 |
| PMC — Phi-4-mini | ||||||
| M0 | 57 | 32 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 190 | 174 | 25.98 | 27.73 | 36.81 | -9.08 |
| Self-Rewrite | 148 | 125 | 17.77 | 18.16 | 10.27 | 7.89 |
| RAFT | 198 | 186 | 27.54 | 30.08 | 15.68 | 14.40 |
| BOS replay | 199 | 184 | 27.73 | 29.69 | 14.00 | 15.69 |
| InstructReplay | 191 | 179 | 26.17 | 28.71 | 1.39 | 27.32 |
Table 7. Core/full counts and acquisition–retention sensitivity (denominator 512). and ; all A/F/S entries are pp. Core and full use their respective M0 counts. Shaded rows mark InstructReplay. Within each setting, bold/underline mark the best/second-best shown adapted result (higher counts, A and S, lower F); M0 is a reference. Ties share marks.
InstructReplay has positive full-answer acquisition and higher than all seven Table 3 baselines, BOS replay and Hard in all six settings. Comparator order can change: under the full criterion the closest Table 3 method is RAFT on CommonCorpus Qwen, SDFT on CommonCorpus Phi and LoRA-SFT on PMC Smol. On CommonCorpus Smol, Hard’s primary-score lead reverses under full scoring (4.81 versus 4.91 pp).
Judging stages. Table 8 separates vote-slot outcomes from final question judgments. The same 138 ineligible CommonCorpus questions occur for every endpoint: pooled over three models, each method has 414 fixed exclusions and 3,366 issued slots. PMC has no fixed exclusions and 4,608 issued slots. Each method has 1,536 question outcomes per domain. Invalid slots fail record validation; valid UNCLEAR-containing slots describe content uncertainty and can overlap with negative core votes. Core U combines fixed ineligibility with eligible questions lacking a resolved majority.
| Method | Invalid slots | Unclear slots | Negative slots | Core yes | Core no | Core U | Core & Extra |
| CommonCorpus | |||||||
| M0 | 361 | 34 | 2567 | 121 | 889 | 526 | 82 |
| Naive SFT | 46 | 83 | 2455 | 254 | 843 | 439 | 66 |
| LoRA-SFT | 45 | 85 | 2782 | 144 | 950 | 442 | 48 |
| Self-Rewrite | 120 | 48 | 2429 | 246 | 835 | 455 | 149 |
| SDFT | 84 | 98 | 2465 | 234 | 841 | 461 | 102 |
| DFT | 38 | 77 | 2848 | 132 | 972 | 432 | 26 |
| RAFT | 133 | 60 | 2319 | 283 | 794 | 459 | 143 |
| Domain-KL | 515 | 54 | 2044 | 246 | 748 | 542 | 65 |
| BOS replay | 518 | 44 | 2029 | 255 | 739 | 542 | 53 |
| Hard | 510 | 44 | 2039 | 248 | 746 | 542 | 54 |
| InstructReplay | 50 | 74 | 2460 | 252 | 840 | 444 | 64 |
| PMC | |||||||
| M0 | 578 | 38 | 3314 | 235 | 1175 | 126 | 106 |
| Naive SFT | 78 | 103 | 2697 | 570 | 928 | 38 | 35 |
| LoRA-SFT | 94 | 101 | 3276 | 369 | 1134 | 33 | 13 |
| Self-Rewrite | 162 | 65 | 2884 | 501 | 994 | 41 | 94 |
| SDFT | 119 | 97 | 3228 | 384 | 1117 | 35 | 40 |
| DFT | 102 | 108 | 3439 | 313 | 1179 | 44 | 13 |
| RAFT | 81 | 79 | 2729 | 569 | 937 | 30 | 85 |
| Domain-KL | 91 | 106 | 2762 | 541 | 961 | 34 | 19 |
| BOS replay | 89 | 92 | 2675 | 579 | 924 | 33 | 34 |
| Hard | 86 | 107 | 2695 | 570 | 932 | 34 | 37 |
| InstructReplay | 67 | 93 | 2704 | 580 | 929 | 27 | 37 |
Table 8. Judging-stage counts pooled over the three models. Slot columns and question columns have different denominators, specified in the text. Core yes/no/U partition the 1,536 questions. Core & Extra is their joint majority-confirmation event and can overlap with other columns. Shaded rows mark InstructReplay.
Invalid rates differ by method. In CommonCorpus, InstructReplay and BOS have 50 and 518 invalid slots out of 3,366, respectively; their eligible unresolved questions number 30 and 128. Confirmation gains can therefore reflect both answer content and assessability under this rubric.
The targeted CommonCorpus check compares InstructReplay, BOS and Domain-KL using saved run records. Primary rubric/schema identities and within-model request settings agree. We write IR for InstructReplay. In the final labels, BOS has 542 Core U outcomes, comprising 414 fixed exclusions and 128 eligible unresolved questions.
Holding resolved labels, fixed exclusions and unchanged, the domain-mean score difference has the deterministic unknown-only range , where counts eligible unresolved questions. For IR minus BOS, this is pp on CommonCorpus and pp on PMC. Hard also has 128 eligible unresolved CommonCorpus questions, and 34 on PMC against 27 for IR, so IR minus Hard has the range pp on CommonCorpus and pp on PMC. These bounds vary only unresolved labels; the supplement’s verification script recomputes them.
Eligible-denominator sensitivity. For CommonCorpus, , so . Changing the denominator rescales acquisition relative to forgetting. Table 9 reports scores over the 374 eligible questions. InstructReplay still exceeds all seven Table 3 baselines and BOS in the three settings, while the closest comparator for Qwen changes to RAFT.
| Model | IR | IR | Best baseline | Baseline | vs. BOS | |
| SmolLM3-3B | 1.01 | 3.10 | Self-Rewrite | -3.95 | 7.05 | 0.70 |
| Qwen3-4B | 8.56 | 12.23 | RAFT | 10.77 | 1.46 | 8.83 |
| Phi-4-mini | 7.22 | 10.89 | Self-Rewrite | 5.30 | 5.59 | 10.51 |
Table 9. CommonCorpus core-score denominator sensitivity (pp), retaining F. Best baseline excludes M0, InstructReplay and the BOS/Hard controls. Hard’s primary-score lead on CommonCorpus SmolLM3-3B persists on this scale. Within each row, bold marks the higher of the two shown methods.
Table 10 contrasts two saved answers to the same evaluation question: one is core-confirmed with unsupported additions, while the other has an unresolved majority. These examples illustrate how the rubric separates answer quality from judging uncertainty.
| Observed answer | Core/full votes (Qwen; Gemma; GPT-OSS) | Interpretation |
| Smol InstructReplay: “pmPLGA@SV treatment reduced cerebral infarct volume by 50% compared to free simvastatin.” | 1/0; 1/0; U/U | Core confirmed; full not confirmed. Two judges mark the added 50% as unsupported. |
| Smol Domain-KL: “pmPLGA@SV treatment significantly reduced cerebral infarct volume in the in vivo model.” | U/U; U/U; 1/1 | Unconfirmed: Qwen has a schema failure, Gemma marks CORE unclear, GPT-OSS supports it. The majority remains unresolved. |
Table 10. Two saved answers illustrating core/full confirmation and unresolved judging. U denotes unknown.
General scoring
Evaluation subsets. We use fixed subsets to limit the cost of repeated generation and scoring across models, methods and checkpoints. MMLU contains five test questions from each of its 57 subjects (285 total); its five-shot demonstrations come from MMLU’s dev split. MATH-500 contains 20 problems from each of five difficulty levels (100 total). BBH contains ten questions from each of 27 tasks (270 total). HumanEval+ [19] contains 64 of its 164 problems. Within each stratum, questions are ranked by a deterministic SHA-256 hash of a fixed namespace and the question identifier, and the required number with the lowest hashes is retained. These selectors do not use model outputs or correctness. IFEval uses the first 120 examples in the frozen evaluation dataset order, selected with the evaluation harness’s limit option and reused unchanged across runs; this is a fixed prefix, without random or stratified sampling. All compared models and checkpoints use identical question sets and the same scoring conventions within each backbone. Reported accuracies refer to these subsets.
IFEval reports prompt-level strict accuracy. MMLU uses five-shot, conditional option log likelikelihood with each model’s fixed native chat template and answer-prefill convention; the same convention applies to M0 and its adapted checkpoints. MATH-500 uses the versioned answer extractor and symbolic equivalence checker. BBH uses task-aware answer extraction independent of the gold label, normalized exact comparison, and zero credit for invalid output. HumanEval+ executes the generated function against the EvalPlus base and extended tests; a problem counts as solved only when both pass. A response that contains a full function definition is executed after removing common leading indentation. The supplement includes the BBH answer extractor. The scores include sensitivity to answer formatting and extraction. Net benchmark changes can conceal both newly correct and lost correct questions. All compared checkpoints are scored with the same scorers.
Saved-output diagnostics. Table 12 separates BBH accepted-correct, accepted-wrong and invalid-extraction outcomes under the task-aware scorer. Relative to M0, InstructReplay has 24 fewer invalid extractions, 35 more accepted-but-wrong answers and 11 fewer correct answers across the six settings. Naive SFT has 721 invalid extractions versus M0’s 96. Parser acceptance improves for InstructReplay while answer correctness falls slightly. Figure 4 shows the corresponding benchmark-score changes.

Figure 4. Signed General-score change relative to for every method and setting (pp, rounded; colors saturate at ±50). IF, MM, MA, BBH and HE denote IFEval, MMLU, MATH-500, BBH and HumanEval+. Rows below the first rule are the replay controls; the last row is InstructReplay. Positive changes are shown even though counts only declines. CC abbreviates CommonCorpus.
The supplementary scoring examples include hash-selected M0/adapted pairs and six complete short BBH responses selected by parser-result category. These examples show how the parser scores each category.
Training and Baseline Implementation
Shared optimization
The training schedule is 300 optimizer steps with 32 effective domain sequences per step. The matched replay runs use eight devices, one sequence per device per microbatch and four accumulation steps. The released run-level matrix lists all 48 layouts. CommonCorpus SDFT uses four devices with accumulation eight; its other methods use eight with accumulation four. PMC SDFT uses the four-device layout, Self-Rewrite uses four or eight depending on the model, and the other methods use eight. Each microbatch contains one sequence per device, giving the same effective batch of 32. All paths use BF16. The maximum sequence length is 2,048 for SmolLM3 and Phi, 2,304 for every CommonCorpus Qwen path, and 2,304 for PMC Qwen except Naive SFT, DFT, and LoRA-SFT, which use 2,048. The sequence limits accommodate the respective encoded inputs. InstructReplay uses a constant learning rate with no warmup, response-only losses, and 32 additional retention sequences per step. Student and teacher share the exact initial model, tokenizer, and chat-template identity; the teacher stays frozen. AdamW uses betas (0.9, 0.999), epsilon , zero weight decay, gradient clipping at 1, and ZeRO-2. Equal-size rank batches and per-sequence losses determine the accumulation reduction. Samples are right-padded without packing; prompt/padding labels are masked. Attention dropout is zero in the model configurations, and LoRA dropout is zero. Student forwards use training mode; frozen-reference forwards use evaluation mode without gradients. Non-reentrant gradient checkpointing is enabled. Tokenizer and template identities are bound with the model tree.
| Task | Answer protocol | New-token cap | Prompt and scorer |
| Domain | Greedy generation | 512 | One user turn, closed-book domain question; core/full rubric |
| IFEval | Greedy generation | 1,280 | Frozen instruction text; prompt-level strict scorer |
| MATH-500 | Greedy generation | 1,024 | Frozen problem prompt; versioned extraction and symbolic comparison |
| BBH | Greedy generation | 1,024 | Three-shot CoT prompt; task-aware extraction and exact comparison |
| HumanEval+ | Greedy generation | 768 | Frozen function prompt; EvalPlus base and extended tests |
| MMLU | Five-shot option likelihood | N/A | Native template and model-specific Answer prefill; conditional option scores |
Table 11. Evaluation decoding, separate from replay generation. Generation uses do_sample=False, native chat templates, enable_thinking=False, evaluation mode and BF16. Temperature and top-p do not apply to this greedy path. No system message or model-answer retry is added by the wrapper; task instructions are in the user prompt. Smol/Qwen stop IDs are 128012/151645; Phi uses [200020, 199999]. The model inventory provides tokenizer/template hashes and scorer entrypoints.
| Method | Accepted correct | Accepted wrong | Invalid extraction |
| M0 | 1154 | 370 | 96 |
| Naive SFT | 571 | 328 | 721 |
| LoRA-SFT | 1041 | 390 | 189 |
| Self-Rewrite | 901 | 356 | 363 |
| SDFT | 918 | 436 | 266 |
| DFT | 386 | 326 | 908 |
| RAFT | 938 | 423 | 259 |
| Domain-KL | 770 | 366 | 484 |
| InstructReplay | 1143 | 405 | 72 |
Table 12. BBH output categories pooled across the six settings, with 1,620 question–endpoint records per method. BOS replay, Hard and Gold replay are not included in this table. The shaded row is InstructReplay. Bold/underline mark the best/second-best adapted count for accepted-correct answers (more) and invalid extractions (fewer); accepted-wrong counts are not ranked, because they also fall when outputs cannot be parsed. M0 is a reference.
Baseline targets and adaptation
LoRA-SFT uses rank 16, alpha 32, zero dropout, and no bias adaptation. It targets attention q/k/v/o projections and feed-forward gate/up/down projections, with learning rate . Naive SFT uses the original domain answers and full parameters. DFT uses detached target-token probabilities to weight negative log likelihood, using within-sequence means.
Self-Rewrite uses the exact M0 to rewrite domain answers with access to the gold answer, applies a generic-answer filter with fallback to the original, and trains full parameters on the resulting supervision. SDFT follows the practical forward-KL choice described in v2 of Shenfeld et al. [28]. It uses current-student responses and a demonstration-conditioned teacher updated once per optimizer step as . Its loss is full-vocabulary teacher-to-student KL at temperature 1; generation is capped at 512 tokens within the total sequence limit. It has no separate general replay population.
RAFT follows Li et al. [16]. It obtains an M0 rewrite, applies a cosine-similarity threshold of 0.8 using all-MiniLM-L6-v2, and uses Qwen3.8-27B for answer fusion on the retained path. Three-judge quality scoring stops fusion early at 0.8; if no candidate reaches that threshold, the highest-scoring candidate is still selected. Online training combines supervision with answer-conditioned reference feedback on up to 64 student-generated tokens. KL uses the teacher’s top 512 tokens at temperature 1.5, normalized over that support.
Adaptive balancing uses the ratio of detached
CE and KL loss EMAs: , where . The rank-local 0.9 EMA is updated per microbatch. Its common correction factor uses optimizer step and cancels in the CE/KL ratio except for the epsilon term. The rank-local update makes balancing dependent on the recorded rank/microbatch layout.
Domain-KL uses frozen-reference forward KL on domain gold-answer prefixes, with full vocabulary, temperature 1, and fixed coefficient 0.25. Following the reference-matching principle of Yang et al. [33], this adaptation keeps the coefficient fixed throughout training. Across the six settings, Self-Rewrite retains at least 97.5% of rewrites and falls back to the original answer otherwise; its final mean response length varies from 40 to 142 tokens across settings. RAFT takes the fusion branch for 60% to 73% of examples, with final mean response lengths of 26 to 57 tokens. Among accepted Self-Rewrite outputs, a lexical numeric-anchor scan flags 248/312/342 CommonCorpus rows and 26/68/572 PMC rows (Smol/Qwen/Phi) with a missing numeric anchor.
The following sample inspects numeric-string preservation in more detail.
A fixed rule selects 32 numeric-bearing training questions per domain, including eight with numeric-unit expressions, using only gold answers and hashed task IDs. The same questions are checked across three models and both Self-Rewrite and RAFT. Across the six settings, Self-Rewrite retains all source numeric literals in 178/192 checked targets and all selected number–unit expressions in 43/48; RAFT retains them in 189/192 and 47/48. This sample checks literal preservation with limited normalization. Unit equivalence and the surrounding factual relations require semantic assessment.
The public source examples also retain all 12 method/model targets on the two illustrated facts. They expose distinctions missed by lexical retention: CommonCorpus Smol Self-Rewrite expands INGP as “Neural Image Generation Pipeline”, which the fixed evidence does not supply; PMC Smol RAFT adds “30% to 50%”, while the fixed evidence gives no such range.
Validation coverage
Forward KL uses FP32 log probabilities and its analytical logit gradient , avoiding a finite-precision residual at identical logits. A masked, unequal-length CPU comparison with an FP64 autograd oracle gives maximum gradient error ; an eight-rank nonzero-KL check gives gradient cosine 0.999954 and relative L2 error 0.009600.
All 48 trained endpoints completed 300 steps, and each restored checkpoint passes a reload check: 39 by a paired save/reload comparison and nine by reproducing fixed-input logits and short greedy outputs across two independent restores.
All three instruction-replay buffers retain 9,600 prompts without rejection or replacement. The maximum Qwen replay length is 2,082 tokens, within its actual 2,304-token limit. The run-level length matrix confirms that all 42 static-supervision sets fit their recorded limits, and the six on-policy SDFT runs generate their targets during training.
Complete Scores
Figure 4 separates the five General benchmarks whose declines enter F. Table 14–Table 15 report the raw endpoint scores.
| Method | Domain (%) | General (%) | Acquisition / forgetting (pp) | ||||||||
| Core ↑ | IF | MM | MA | BBH | HE | ↑ | ↓ | ↓ | ↑ | ||
| SmolLM3-3B | |||||||||||
| M0 | 9.77 | 70.83 | 59.30 | 71.00 | 73.70 | 51.56 | 0.00 | 0.00 | 0.00 | 0.00 | |
| Naive SFT | 17.38 | 20.00 | 57.54 | 36.00 | 52.96 | 34.38 | 7.62 | 25.10 | 50.83 | -17.49 | |
| LoRA-SFT | 8.59 | 35.00 | 58.25 | 67.00 | 62.22 | 29.69 | -1.17 | 14.85 | 35.83 | -16.02 | |
| Self-Rewrite | 14.84 | 49.17 | 59.65 | 65.00 | 57.78 | 40.62 | 5.08 | 10.91 | 21.67 | -5.83 | |
| SDFT | 15.43 | 41.67 | 58.95 | 59.00 | 50.00 | 34.38 | 5.66 | 16.48 | 29.17 | -10.82 | |
| DFT | 8.40 | 18.33 | 58.25 | 45.00 | 37.04 | 21.88 | -1.37 | 29.18 | 52.50 | -30.55 | |
| RAFT | 18.55 | 30.83 | 59.65 | 60.00 | 51.48 | 29.69 | 8.79 | 19.02 | 40.00 | -10.23 | |
| Domain-KL | 17.38 | 19.17 | 57.19 | 53.00 | 50.74 | 39.06 | 7.62 | 21.45 | 51.67 | -13.83 | |
| InstructReplay | 15.43 | 67.50 | 54.74 | 74.00 | 69.26 | 40.62 | 5.66 | 4.66 | 10.94 | 1.01 | |
| Qwen3-4B | |||||||||||
| M0 | 7.42 | 80.83 | 71.58 | 67.00 | 66.30 | 59.38 | 0.00 | 0.00 | 0.00 | 0.00 | |
| Naive SFT | 16.21 | 37.50 | 72.63 | 62.00 | 41.11 | 31.25 | 8.79 | 20.33 | 43.33 | -11.54 | |
| LoRA-SFT | 10.35 | 49.17 | 75.79 | 72.00 | 65.19 | 34.38 | 2.93 | 11.56 | 31.67 | -8.63 | |
| Self-Rewrite | 17.97 | 70.00 | 73.33 | 74.00 | 73.70 | 51.56 | 10.55 | 3.73 | 10.83 | 6.82 | |
| SDFT | 16.21 | 60.83 | 75.79 | 74.00 | 55.93 | 42.19 | 8.79 | 9.51 | 20.00 | -0.72 | |
| DFT | 9.77 | 33.33 | 74.04 | 61.00 | 48.52 | 18.75 | 2.34 | 22.38 | 47.50 | -20.04 | |
| RAFT | 18.16 | 65.83 | 74.74 | 74.00 | 71.48 | 54.69 | 10.74 | 3.94 | 15.00 | 6.80 | |
| Domain-KL | 16.21 | 35.83 | 74.74 | 67.00 | 50.00 | 43.75 | 8.79 | 15.38 | 45.00 | -6.60 | |
| InstructReplay | 17.38 | 74.17 | 71.23 | 70.00 | 70.37 | 62.50 | 9.96 | 1.40 | 6.67 | 8.56 | |
| Phi-4-mini-instruct | |||||||||||
| M0 | 6.45 | 68.33 | 71.58 | 69.00 | 73.70 | 56.25 | 0.00 | 0.00 | 0.00 | 0.00 | |
| Naive SFT | 16.02 | 23.33 | 70.18 | 33.00 | 44.81 | 50.00 | 9.57 | 23.51 | 45.00 | -13.94 | |
| LoRA-SFT | 9.18 | 54.17 | 70.53 | 47.00 | 70.37 | 43.75 | 2.73 | 10.61 | 22.00 | -7.88 | |
| Self-Rewrite | 15.23 | 50.83 | 70.88 | 58.00 | 69.26 | 56.25 | 8.79 | 6.73 | 17.50 | 2.06 | |
| SDFT | 14.06 | 52.50 | 69.82 | 62.00 | 65.19 | 46.88 | 7.62 | 8.50 | 15.83 | -0.88 | |
| DFT | 7.62 | 35.00 | 68.07 | 58.00 | 31.11 | 20.31 | 1.17 | 25.27 | 42.59 | -24.10 | |
| RAFT | 18.55 | 49.17 | 70.53 | 49.00 | 65.19 | 48.44 | 12.11 | 11.31 | 20.00 | 0.80 | |
| Domain-KL | 14.45 | 34.17 | 70.88 | 51.00 | 62.59 | 56.25 | 8.01 | 12.80 | 34.17 | -4.79 | |
| InstructReplay | 16.41 | 67.50 | 70.18 | 59.00 | 72.22 | 62.50 | 9.96 | 2.74 | 10.00 | 7.22 |
Table 14. Complete CommonCorpus results. The denominator includes 374 eligible and 138 fixed ineligible questions (Appendix § 10.§ 4). Within each model block, bold/underline mark the best/second-best adapted result in each column: higher Core, General, and , lower and . M0 is a reference; ties at the shown precision share marks. Shaded rows are InstructReplay. Table 22 reports the matched controls.
| Method | Domain (%) Core ↑ | General (%) IF | MM | MA | BBH | HE | Acquisition / forgetting (pp) | |||
| SmolLM3-3B | ||||||||||
| M0 | 16.21 | 70.83 | 59.30 | 71.00 | 73.70 | 51.56 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 37.11 | 9.17 | 58.25 | 26.00 | 18.15 | 0.00 | 20.90 | 42.97 | 61.67 | -22.07 |
| LoRA-SFT | 21.88 | 39.17 | 60.70 | 67.00 | 51.85 | 31.25 | 5.66 | 15.57 | 31.67 | -9.90 |
| Self-Rewrite | 31.64 | 20.00 | 61.05 | 51.00 | 21.11 | 39.06 | 15.43 | 27.19 | 52.59 | -11.76 |
| SDFT | 27.15 | 29.17 | 60.00 | 50.00 | 44.07 | 35.94 | 10.94 | 21.58 | 41.67 | -10.65 |
| DFT | 18.75 | 14.17 | 55.79 | 24.00 | 8.52 | 0.00 | 2.54 | 44.78 | 65.19 | -42.25 |
| RAFT | 36.72 | 19.17 | 61.75 | 44.00 | 43.70 | 28.12 | 20.51 | 26.42 | 51.67 | -5.91 |
| Domain-KL | 35.16 | 14.17 | 59.30 | 43.00 | 35.56 | 3.12 | 18.95 | 34.25 | 56.67 | -15.31 |
| InstructReplay | 38.67 | 67.50 | 59.65 | 71.00 | 66.67 | 40.62 | 22.46 | 4.26 | 10.94 | 18.20 |
| Qwen3-4B | ||||||||||
| M0 | 18.55 | 80.83 | 71.58 | 67.00 | 66.30 | 59.38 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 37.11 | 47.50 | 74.39 | 61.00 | 50.74 | 15.62 | 18.55 | 19.73 | 43.75 | -1.17 |
| LoRA-SFT | 28.12 | 70.83 | 75.44 | 69.00 | 77.04 | 17.19 | 9.57 | 10.44 | 42.19 | -0.87 |
| Self-Rewrite | 37.30 | 51.67 | 74.74 | 76.00 | 47.04 | 56.25 | 18.75 | 10.31 | 29.17 | 8.44 |
| SDFT | 25.59 | 54.17 | 74.39 | 68.00 | 56.67 | 14.06 | 7.03 | 16.32 | 45.31 | -9.29 |
| DFT | 20.12 | 39.17 | 72.98 | 61.00 | 15.56 | 18.75 | 1.56 | 27.81 | 50.74 | -26.24 |
| RAFT | 35.74 | 56.67 | 72.28 | 71.00 | 58.15 | 54.69 | 17.19 | 7.40 | 24.17 | 9.79 |
| Domain-KL | 35.55 | 39.17 | 74.04 | 72.00 | 30.00 | 14.06 | 16.99 | 24.66 | 45.31 | -7.66 |
| InstructReplay | 37.30 | 80.00 | 72.63 | 70.00 | 74.07 | 62.50 | 18.75 | 0.17 | 0.83 | 18.58 |
| Phi-4-mini-instruct | ||||||||||
| M0 | 11.13 | 68.33 | 71.58 | 69.00 | 73.70 | 56.25 | 0.00 | 0.00 | 0.00 | 0.00 |
| Naive SFT | 37.11 | 33.33 | 69.47 | 28.00 | 3.70 | 20.31 | 25.98 | 36.81 | 70.00 | -10.83 |
| LoRA-SFT | 22.07 | 48.33 | 68.77 | 43.00 | 58.89 | 25.00 | 10.94 | 18.97 | 31.25 | -8.04 |
| Self-Rewrite | 28.91 | 50.83 | 70.18 | 47.00 | 64.81 | 54.69 | 17.77 | 10.27 | 22.00 | 7.50 |
| SDFT | 22.27 | 48.33 | 67.72 | 51.00 | 68.15 | 40.62 | 11.13 | 12.61 | 20.00 | -1.48 |
| DFT | 22.27 | 33.33 | 69.82 | 48.00 | 2.22 | 14.06 | 11.13 | 34.28 | 71.48 | -23.15 |
| RAFT | 38.67 | 52.50 | 71.23 | 34.00 | 57.41 | 45.31 | 27.54 | 15.68 | 35.00 | 11.86 |
| Domain-KL | 34.96 | 37.50 | 69.12 | 52.00 | 56.30 | 50.00 | 23.83 | 14.79 | 30.83 | 9.04 |
| InstructReplay | 37.30 | 67.50 | 68.42 | 69.00 | 70.74 | 59.38 | 26.17 | 1.39 | 3.16 | 24.78 |
Table 15. Complete PMC biomedical results, using the metric definitions of Table 14. Within each model block, bold/underline mark the best/second-best adapted result in each column, with directions and ties as in Table 14; M0 is a reference. Shaded rows are InstructReplay. Cross-domain differences also reflect source genre, chronology, fact structure, and initial model performance.
Table 14–Table 15 retain all 54 rows. Domain reports the core-confirmation rate on a scale of 0 to 100, with and unknown questions retained in the denominator. IF, MM, MA and HE denote IFEval, MMLU, MATH-500 and HumanEval+. Domain and General scores are percentages; A, F, W, and S are percentage points. Domain-KL denotes the fixed-coefficient domain-prefix adaptation in Appendix § 11.§ 2. Each M0 is the corresponding model’s unchanged checkpoint.
Weight Ablation and Training Cost
Retention-loss weight
The ablation reuses saved checkpoints and model answers. The four additional configurations for two CommonCorpus backbones at are evaluated with the same domain and general scorers.
Training cost
InstructReplay’s listed training costs are 1.64, 2.22, and 1.91 GPU-hours in model order SmolLM3, Qwen3, and Phi. RAFT’s corresponding costs are 6.30, 7.87, and 4.83. These measurements cover the training loop. Retention generation, answer rewriting/fusion, failed runs and evaluation are separate costs. Naive SFT training time was not included in the extracted PMC cost records and is not imputed.
Training exposure is 9,600 domain sequences per method. In Smol/Qwen/Phi order, CommonCorpus has 358,024/364,800/353,912 valid domain tokens and PMC has 206,908/213,554/202,637. InstructReplay additionally uses 9,600 sequences with 3,485,818/3,375,216/2,996,543 valid replay tokens. The corresponding replay input-context token counts are 2,469,551/1,955,081/1,826,685.
Paired Uncertainty and Comparative Summaries
Domain questions are joined when they share a source or fact identifier. The resulting connected components number 386 for CommonCorpus and 440 for PMC. Bootstrap draws sample these clusters from all 512 recorded questions, using common indices across all nine methods in a model–domain setting. Each question carries its eligibility status and observed confirmation label into every replicate; the 138 ineligible CommonCorpus questions contribute zero confirmations, preserving the recorded evaluation population. General resampling is stratified by MMLU subject, MATH-500 difficulty level, and BBH task, with IFEval and HumanEval+ each treated as one stratum. Every one of 200,000 replicates recomputes A, F, W, and S. If cluster contains questions and is drawn times, the replicate confirmation rate is ; unequal cluster sizes therefore retain question weighting, with a resampled denominator.
We report two interval constructions. The main text (Table 5) uses percentile intervals of each pairwise difference in S, Bonferroni-corrected over all 36 pairs among the eight methods and M0 in a setting. These intervals target the reported quantity directly. Of the 42 InstructReplay–baseline intervals, 37 exclude zero; the other five are Self-Rewrite in the three CommonCorpus settings and RAFT on CommonCorpus Qwen3 and Phi-4-mini. Be-

Figure 5. CommonCorpus sensitivity to retention weight at a fixed 1:1 sequence ratio and 300-step schedule. Lines connect the four tested weights on a categorical axis. Each column isolates one metric and shares its vertical scale across models. Every value is labeled; shading marks the default . The dashed zero lines mark ’s metric values ().
| Weight | Domain (%) | General (%) | Acquisition / forgetting (pp) | ||||||||
| Core | IF | MM | MA | BBH | HE | ||||||
| SmolLM3-3B | |||||||||||
| M0 | 9.77 | 70.83 | 59.30 | 71.00 | 73.70 | 51.56 | 0.00 | 0.00 | 0.00 | 0.00 | |
| 0 | 17.38 | 20.00 | 57.54 | 36.00 | 52.96 | 34.38 | 7.62 | 25.10 | 50.83 | -17.49 | |
| 0.25 | 15.43 | 67.50 | 54.74 | 74.00 | 69.26 | 40.62 | 5.66 | 4.66 | 10.94 | 1.01 | |
| 1 | <u>16.02</u> | 63.33 | 54.74 | <u>72.00</u> | <u>68.15</u> | <u>40.62</u> | <u>6.25</u> | 5.71 | <u>10.94</u> | <u>0.54</u> | |
| 4 | 14.45 | <u>64.17</u> | <u>55.79</u> | 74.00 | 67.78 | 42.19 | 4.69 | <u>5.10</u> | 9.38 | -0.41 | |
| Qwen3-4B | |||||||||||
| M0 | 7.42 | 80.83 | 71.58 | 67.00 | 66.30 | 59.38 | 0.00 | 0.00 | 0.00 | 0.00 | |
| 0 | <u>16.21</u> | 37.50 | 72.63 | 62.00 | 41.11 | 31.25 | <u>8.79</u> | 20.33 | 43.33 | -11.54 | |
| 0.25 | 17.38 | <u>74.17</u> | 71.23 | 70.00 | 70.37 | 62.50 | 9.96 | <u>1.40</u> | <u>6.67</u> | 8.56 | |
| 1 | <u>16.21</u> | 70.00 | 72.63 | <u>68.00</u> | 70.74 | <u>64.06</u> | <u>8.79</u> | 2.17 | 10.83 | <u>6.62</u> | |
| 4 | 14.84 | 75.00 | <u>72.28</u> | 70.00 | 67.04 | 67.19 | 7.42 | 1.17 | 5.83 | 6.26 |
caption: Table 16: CommonCorpus loss-weight ablation, grouped by backbone, with fixed sequence ratio and schedule. The shaded row is the default weight . M0, weight 0, and weight 0.25 agree with the corresponding reference, Naive SFT, and InstructReplay rows. All endpoints use the current scoring protocol. Within each backbone, bold/underline mark the best/second-best tested weight in every metric, with directions and ties as in Table 14; M0 is a reference.
:::
| Method | SmolLM3 GPUh | Qwen3 GPUh | Phi-4-mini GPUh |
| LoRA-SFT | 1.19 | 1.40 | 0.87† |
| Self-Rewrite | 0.79 | 0.96 | 0.67 |
| SDFT | 9.07 | 5.17 | 3.58 |
| DFT | <u>0.82</u> | <u>1.08</u> | 1.04† |
| RAFT | 6.30 | 7.87 | 4.83 |
| Domain-KL | 1.44 | 1.90 | 1.32 |
| InstructReplay | 1.64 | 2.22 | 1.91 |
Table 17. Allocated GPU-hours during successful step300 PMC training. Device types are listed separately. Offline preparation, failed attempts and evaluation add to these costs. A100 unless marked † (A800). The shaded row is InstructReplay. Bold/underline mark the lowest/second-lowest recorded GPU-hours per backbone, with hardware as noted.
because positive-part and maximum operations make and nonsmooth at zero-decline boundaries, we also report a more conservative construction. It forms a 95% max- simultaneous band over 36 pairwise Domain differences and 40 signed General changes relative to M0 within a panel and maps that band conservatively to the reported differences. The band covers all pairs, including the subsequently displayed closest baseline. The implementation standardizes each centered bootstrap component by its empirical bootstrap standard deviation (sample SD over all draws). Components with SD at most are omitted from the maximum. The 95th percentile of that maximum absolute standardized deviation supplies a common cutoff, multiplied by each component SD to form its band.
Each component uses one SD estimated across the bootstrap draws. For a signed general change bounded by , its drop lies in ; averaging or maximizing these bounds gives F or W bounds. A pair’s S interval subtracts the upper/lower F difference bounds from the corresponding acquisition bounds. Zero-variance components have zero band width. Each of the six model–domain settings forms a separate comparison family. The family contains all 36 unordered pairs of its nine methods and 40 signed General changes. Under this construction, 13 of the 42 InstructReplay–baseline intervals exclude zero, none of them against the closest baseline of a setting.
Replay controls. BOS replay, Hard and Gold replay are outside the 36-pair family. Table 18 gives paired percentile intervals for InstructReplay minus each control in , with the same resampling design and 200,000 draws and a separate Bonferroni correction over the three controls in each setting. The interval excludes zero against Gold replay in two settings (PMC SmolLM3 and Phi-4-mini), against BOS replay in four (CommonCorpus Qwen3 and Phi-4-mini, and PMC Qwen3 and Phi-4-mini) and against Hard in none. If the three pairs are instead added to the 36-pair family (Bonferroni over 39), intervals exclude zero against Gold replay in PMC Phi-4-mini and against BOS replay in CommonCorpus Qwen3 and Phi-4-mini, and PMC Phi-4-mini. These intervals resample questions only; Appendix § 10.§ 4 bounds the effect of unresolved judge labels on the CommonCorpus comparisons.
| Setting | vs. Gold replay | vs. Hard | vs. BOS replay | ||||
| 95% CI | 95% CI | 95% CI | |||||
| CommonCorpus SmolLM3 | 4.51 | [−0.44, 9.06] | −0.88 | [−4.11, 2.27] | 1.28 | [−2.40, 5.01] | |
| CommonCorpus Qwen3 | 2.47 | [−2.71, 7.53] | 0.96 | [−3.31, 5.05] | 9.05* | [3.73, 13.70] | |
| CommonCorpus Phi-4-mini | 4.10 | [−1.03, 9.17] | 2.22 | [−1.30, 6.05] | 9.94* | [4.86, 14.86] | |
| PMC SmolLM3 | 6.23* | [1.38, 10.58] | 1.35 | [−2.34, 4.46] | 2.99 | [−0.79, 6.20] | |
| PMC Qwen3 | 2.06 | [−1.73, 6.31] | 2.29 | [−1.80, 5.95] | 5.64* | [0.72, 10.08] | |
| PMC Phi-4-mini | 9.60* | [4.23, 14.45] | 0.92 | [−2.91, 4.65] | 11.05* | [5.21, 15.75] |
Table 18. InstructReplay minus each replay control in (pp). Intervals are paired cluster-bootstrap percentile intervals, Bonferroni-corrected over the three controls in each setting; the main 36-pair family of Table 5 is unchanged. *The interval excludes zero.
All 42 InstructReplay–baseline point differences accompany the source data. The Pareto count in § 6.1 uses only the frozen and values: a baseline point is dominated when InstructReplay has at least as much acquisition and at most as much forgetting, with one strict improvement. The counts by model are 4/5/6 on CommonCorpus and 7/7/6 on PMC. The intervals quantify question-sampling variation conditional on the recorded checkpoints and judge votes.
The choice to penalize declines without cancelling them against improvements affects ranking. Under the alternative utility , InstructReplay remains highest in all six settings; the smallest margin is 0.55 points over Self-Rewrite on CommonCorpus Qwen.
Weighting acquisition against forgetting. For , InstructReplay beats a baseline with higher acquisition whenever exceeds the ratio of their acquisition difference to their forgetting difference. Because InstructReplay has the lowest in every setting, it beats every baseline with lower or equal acquisition for all . Table 19 gives, for each setting, the smallest above which InstructReplay has the highest among the seven Table 3 baselines, and the baseline that determines it.
| Domain | Model | Binding baseline | |
| CommonCorpus | SmolLM3-3B | 0.22 | RAFT |
| CommonCorpus | Qwen3-4B | 0.31 | RAFT |
| CommonCorpus | Phi-4-mini | 0.25 | RAFT |
| PMC | SmolLM3-3B | 0 | – |
| PMC | Qwen3-4B | 0 | – |
| PMC | Phi-4-mini | 0.10 | RAFT |
Table 19. Smallest weight above which InstructReplay has the highest among the seven baselines. A value of 0 means it is highest for every .
Variation Across Training Runs
InstructReplay and the two strongest baselines, Self-Rewrite and RAFT, were trained three times in every setting. The runs differ in training randomness and in the order of the training pairs, with each domain sequence kept paired with its replay sequence, and they share the offline supervision: InstructReplay’s saved responses, the Self-Rewrite answers and the RAFT targets. Every run finishes 300 optimizer steps and is evaluated with the same questions, judges and general subsets; the main text reports the first run of each method. Table 20 gives as mean ± sample standard deviation over the three runs together with InstructReplay’s advantage computed run by run, and Table 21 decomposes it into and .
| Model | InstructReplay | Self-Rewrite | RAFT | mean | min | mean | min |
| , mean SD over three runs (pp) | IR − Self-Rewrite | IR − RAFT | |||||
| CommonCorpus | |||||||
| SmolLM3-3B | 2.24 1.07 | −6.09 0.35 | −11.70 1.91 | 8.33 | 6.84 | 13.93 | 11.24 |
| Qwen3-4B | 5.84 2.36 | 5.30 1.32 | 4.02 2.48 | 0.54 | −0.23 | 1.82 | 1.23 |
| Phi-4-mini | 6.81 0.64 | 0.34 1.52 | 0.08 0.66 | 6.47 | 5.16 | 6.73 | 6.16 |
| PMC | |||||||
| SmolLM3-3B | 18.69 2.00 | −8.92 2.82 | −4.42 1.97 | 27.61 | 25.88 | 23.11 | 19.17 |
| Qwen3-4B | 17.07 2.42 | 8.11 2.03 | 7.56 4.54 | 8.96 | 8.35 | 9.52 | 7.80 |
| Phi-4-mini | 26.24 1.39 | 7.74 2.92 | 10.41 5.29 | 18.50 | 15.60 | 15.83 | 12.74 |
Table 20. Acquisition–retention score over three training runs of InstructReplay (IR), Self-Rewrite and RAFT (pp). Differences are computed between runs with the same index, so each setting contributes three per baseline; min is the smallest of the three. In each row, bold marks the highest and underlining the second-highest mean . Ties at the shown precision share marks.
| Model | InstructReplay | Self-Rewrite | RAFT | InstructReplay | Self-Rewrite | RAFT |
| , mean SD (pp) | , mean SD (pp) | |||||
| CommonCorpus | ||||||
| SmolLM3-3B | 5.79 1.18 | 5.34 0.63 | 8.53 0.30 | 3.56 1.61 | 11.43 0.56 | 20.23 1.61 |
| Qwen3-4B | 9.31 0.60 | 9.83 0.79 | 10.29 0.41 | 3.47 1.81 | 4.53 0.79 | 6.27 2.12 |
| Phi-4-mini | 9.24 0.63 | 8.01 0.78 | 11.00 1.08 | 2.43 0.69 | 7.67 0.82 | 10.92 0.77 |
| PMC | ||||||
| SmolLM3-3B | 22.85 1.98 | 15.62 0.52 | 21.55 1.48 | 4.16 0.09 | 24.55 2.96 | 25.96 0.50 |
| Qwen3-4B | 17.58 2.03 | 17.58 1.41 | 18.03 1.47 | 0.51 0.40 | 9.47 1.26 | 10.48 3.89 |
| Phi-4-mini | 27.73 1.41 | 17.90 1.18 | 27.21 3.43 | 1.50 0.22 | 10.17 1.75 | 16.81 1.98 |
Table 21. Acquisition and forgetting over the same three training runs (pp). In each row and metric, bold marks the best and underlining the second-best mean (highest , lowest ). Ties at the shown precision share marks.
InstructReplay has the highest mean in every setting and exceeds both baselines in 35 of the 36 run-by-run comparisons; the exception is run 3 on CommonCorpus Qwen3, where Self-Rewrite leads by 0.23 points. The standard deviation of across runs ranges from 0.64 to 2.42 points for InstructReplay, 0.35 to 2.92 for Self-Rewrite and 0.66 to 5.29 for RAFT. InstructReplay’s MMLU change also varies across runs: −4.56, −4.56 and −0.35 points on CommonCorpus SmolLM3 and −3.16, −0.70 and −0.35 on PMC Phi-4-mini. Its mean over all 18 runs is −1.05, against +0.55 for Self-Rewrite and +0.82 for RAFT; per-run values are in the supplement.
Replay Controls: BOS Context, Hard Targets and Gold Answers
InstructReplay and Hard share the saved instruction-response prefixes, with frozen-distribution KL and saved-token cross-entropy targets, respectively. BOS replay uses BOS-conditioned prefixes with the same KL. Domain-KL instead uses domain gold-answer prefixes (Appendix § 11). Gold replay keeps InstructReplay’s instruction prompts token for token but replaces ’s responses with the collection’s own final assistant answers, truncated to 512 tokens and closed with the model’s end-of-turn token. This gives about 2.8M response tokens per model, against 3.0M to 3.5M for InstructReplay. It trains on them with cross-entropy and otherwise uses the trainer, coefficient, ratio and schedule of Hard, so Hard and Gold replay differ only in who wrote the replayed answers. Figure 6 decomposes the measured differences for BOS replay and Hard; Table 22 reports all four variants.

Figure 6. InstructReplay minus Hard and BOS replay across all six settings (pp). Acquisition, forgetting, and score differences occupy separate columns; arrows indicate the favorable direction and zero lines mark ties. The score column labels every value. CC abbreviates CommonCorpus.
| Replay configuration | Core ↑ | IF | MM | MA | BBH | HE | ↑ | ↓ | ↓ | ↑ |
| CommonCorpus — SmolLM3-3B | ||||||||||
| InstructReplay | 15.43 | 67.50 | 54.74 | 74.00 | 69.26 | 40.62 | 5.66 | 4.66 | 10.94 | 1.01 |
| Hard | 16.21 | 64.17 | 55.79 | 72.00 | 68.89 | 43.75 | 6.45 | 4.56 | 7.81 | 1.88 |
| BOS replay | 16.99 | 55.00 | 57.19 | 72.00 | 66.67 | 39.06 | 7.23 | 7.50 | 15.83 | -0.27 |
| Gold replay | 17.77 | 58.33 | 41.05 | 62.00 | 63.70 | 43.75 | 8.01 | 11.51 | 18.25 | -3.50 |
| CommonCorpus — Qwen3-4B | ||||||||||
| InstructReplay | 17.38 | 74.17 | 71.23 | 70.00 | 70.37 | 62.50 | 9.96 | 1.40 | 6.67 | 8.56 |
| Hard | 17.97 | 75.83 | 71.23 | 69.00 | 73.33 | 50.00 | 10.55 | 2.95 | 9.38 | 7.60 |
| BOS replay | 17.97 | 55.00 | 74.04 | 70.00 | 60.37 | 35.94 | 10.55 | 11.04 | 25.83 | -0.49 |
| Gold replay | 18.55 | 71.67 | 72.63 | 65.00 | 75.19 | 45.31 | 11.13 | 5.05 | 14.06 | 6.09 |
| CommonCorpus — Phi-4-mini | ||||||||||
| InstructReplay | 16.41 | 67.50 | 70.18 | 59.00 | 72.22 | 62.50 | 9.96 | 2.74 | 10.00 | 7.22 |
| Hard | 14.26 | 64.17 | 70.53 | 62.00 | 71.85 | 57.81 | 7.81 | 2.81 | 7.00 | 5.00 |
| BOS replay | 14.84 | 50.83 | 69.47 | 44.00 | 67.41 | 51.56 | 8.40 | 11.12 | 25.00 | -2.72 |
| Gold replay | 16.21 | 60.83 | 69.82 | 62.00 | 62.96 | 50.00 | 9.77 | 6.65 | 10.74 | 3.12 |
| PMC — SmolLM3-3B | ||||||||||
| InstructReplay | 38.67 | 67.50 | 59.65 | 71.00 | 66.67 | 40.62 | 22.46 | 4.26 | 10.94 | 18.20 |
| Hard | 37.50 | 66.67 | 60.70 | 74.00 | 68.15 | 39.06 | 21.29 | 4.44 | 12.50 | 16.84 |
| BOS replay | 36.72 | 60.83 | 59.65 | 74.00 | 68.15 | 40.62 | 20.51 | 5.30 | 10.94 | 15.21 |
| Gold replay | 38.48 | 65.83 | 47.02 | 68.00 | 58.15 | 35.94 | 22.27 | 10.29 | 15.62 | 11.97 |
| PMC — Qwen3-4B | ||||||||||
| InstructReplay | 37.30 | 80.00 | 72.63 | 70.00 | 74.07 | 62.50 | 18.75 | 0.17 | 0.83 | 18.58 |
| Hard | 36.91 | 78.33 | 71.93 | 70.00 | 77.78 | 51.56 | 18.36 | 2.06 | 7.81 | 16.30 |
| BOS replay | 37.50 | 74.17 | 72.28 | 72.00 | 64.81 | 37.50 | 18.95 | 6.00 | 21.88 | 12.94 |
| Gold replay | 36.91 | 71.67 | 72.63 | 69.00 | 70.00 | 59.38 | 18.36 | 1.83 | 9.17 | 16.53 |
| PMC — Phi-4-mini | ||||||||||
| InstructReplay | 37.30 | 67.50 | 68.42 | 69.00 | 70.74 | 59.38 | 26.17 | 1.39 | 3.16 | 24.78 |
| Hard | 36.91 | 66.67 | 69.12 | 65.00 | 72.22 | 57.81 | 25.78 | 1.92 | 4.00 | 23.86 |
| BOS replay | 38.87 | 59.17 | 67.72 | 45.00 | 62.59 | 34.38 | 27.73 | 14.00 | 24.00 | 13.73 |
| Gold replay | 35.94 | 67.50 | 69.82 | 62.00 | 57.04 | 34.38 | 24.80 | 9.63 | 21.88 | 15.18 |
Table 22. Direct comparison of InstructReplay, Hard, BOS replay and Gold replay in all six settings. InstructReplay rows are reproduced from Table 14–Table 15. Within each four-row group, bold/underline mark the best/second-best value in every metric, with directions and ties as in Table 14; Hard has the highest in one setting. IF, MM, MA and HE denote IFEval, MMLU, MATH-500 and HumanEval+. Domain reports 100C/ (%) with ; unknowns are retained in the denominator. General percentages use the same scorers as Table 14–Table 15; A/F/W/S are in pp. Shaded rows mark InstructReplay.
On SmolLM3, Gold replay lowers MMLU by 18.2 and 12.3 points, far more than any other method. A probe shows that SmolLM3 takes on formatting from the dataset’s answers; the scorer is identical for all methods. Of the 1,920 academic answers, 986 open with a literal empty reasoning block, <think></think>, which for SmolLM3 and Qwen3 repeats the block that the chat template has already placed in the prompt; no response sampled from does. After Gold replay, SmolLM3 assigns probability 0.29 to 0.32 to opening its turn with this token on the 285 MMLU prompts, against 0.00 for and Hard. At the scored position the four options keep 0.83 and 0.84 of the probability mass, against 0.99 for and 0.98 for Hard. The remainder goes mainly to Markdown emphasis and end-of-turn tokens, which the dataset’s answers use and ’s rarely do. Because MMLU takes the most likely of the four options at that position, the leaked mass does not by itself change a prediction. To test the artifact directly, we removed the leading block from the 986 answers, rebuilt the SmolLM3 buffer otherwise unchanged and retrained both SmolLM3 cells, evaluating General ability only. The opening probability falls to 0.00, but MMLU does not recover: 37.89 on CommonCorpus and 47.72 on PMC, against 41.05 and 47.02 with the block and 59.30 for . The options keep 0.87 and 0.84 of the probability mass, the remainder still going mainly to Markdown emphasis. IFEval is essentially unchanged at 57.50 and 65.83, whereas MATH-500 falls to 53.00 in both settings and BBH to 61.11 and 53.70, so rises to 15.25 and 14.98. Removing the empty block leaves MMLU below in both SmolLM3 settings. The remaining loss is unresolved: this intervention does not separate other formatting effects, answer length, target quality and knowledge changes.
BOS replay and the hard-target ablation start from the same exact M0 as their InstructReplay counterpart. Domain token IDs, pair order, effective batch, constant learning rate, and 300-step endpoint are preserved. Both losses use response-only masks and per-sequence means. The training records confirm the schedule and zero logit discrepancy after saving and reloading the final model. Pre-run checks verify finite nonzero domain gradients and the reference identity. The hard-target ablation uses , where is next-token cross-entropy on the saved instruction responses. A frozen-teacher forward is retained for diagnostics but excluded from the optimized hard loss. Its measured compute therefore includes work that a production hard-replay implementation could omit.
BOS replay uses the BOS-conditioned sampling of Marek et al. [20] with the forward KL, coefficient and schedule of InstructReplay. The model-config BOS token initializes each sequence. Sampling uses temperature 1, top-p 1, and top-k 0, with EOS stopping disabled. Each row uses a fixed random state; the generated sequence is trimmed to that row’s instruction-response budget. The stored 9,600-row buffer is reused across the two domains for each model. This matches sequence counts and retained response positions per sequence; content, instruction context, padding and runtime depend on the replay input. The author implementation averages over valid tokens and generates replay in successive frozen-reference buffers. Our adaptation uses sequence means and a precomputed buffer, with per-row length matching and the common 1:1, 0.25, 300-step schedule. The authors’ instruction-model configuration instead uses a 4:1 domain/replay sequence ratio, five epochs, and a coefficient sweep over 1, 3, and 10.
Hard-target ablation results. InstructReplay leads Hard in five settings; Hard leads by 0.88 pp on CommonCorpus Smol. On PMC, InstructReplay leads by 0.92 to 2.29 pp. CommonCorpus Phi’s 2.22-pp advantage mostly reflects acquisition (2.15 pp), with only 0.07 pp less average forgetting. The comparison uses the fixed coefficient 0.25 for both losses, whose gradient magnitudes can differ. The balance between acquisition and forgetting favors different target forms across these settings.
| Model | Replay positions | CommonCorpus (GPUh) Hard | CommonCorpus (GPUh) BOS replay | PMC (GPUh) Hard | PMC (GPUh) BOS replay |
| SmolLM3-3B | 3,485,818 | 1.57 | 1.50 | 1.58 | 1.50 |
| Qwen3-4B | 3,375,216 | 2.24 | 1.89 | 2.20 | 1.90 |
| Phi-4-mini | 2,996,543 | 1.98 | 1.52 | 1.72 | 1.45 |
Table 23. Shared retained-token budgets and per-domain training costs (GPUh) for the additional replay baseline and hard-target ablation. All 12 runs use eight A100 40-GB devices. Each model uses the same replay budget in both domains, matching its InstructReplay response budget; GPU-hours include the diagnostic teacher forward in Hard. Within each model and domain, bold marks the lower recorded GPU-hours.
The 12 training runs consume 21.03 allocated GPU-hours in total. Separate BOS buffer generation consumes 5.26 allocated GPU-hours including startup: 1.65 for Smol on A800, 2.03 for Qwen on A800, and 1.58 for Phi on A100. Generation produces 4,915,200 tokens per model before row-wise trimming; retained counts are 3,485,818, 3,375,216, and 2,996,543. These one-time buffer costs are not charged twice for reuse across domains. Smoke runs, evaluation and failed attempts are outside the listed training costs.
Reproducibility Materials
The arXiv ancillary files provide result tables for all 114 evaluated endpoints, hash-anonymized domain labels and the scoring materials. The standalone supplement also includes the LaTeX source.
The result tables give the five General scores, the domain confirmation count and , and of every endpoint, together with the paired intervals, output lengths and training costs. The labels cover 102 endpoints: the 54 rows of Table 3, the 36 additional training runs and the 12 BOS replay and Hard runs. For each endpoint they give the three judge votes and the majority label on all 512 questions, and the CommonCorpus eligibility mask is included. The scoring materials contain the data-construction and judge prompts, the data cards, the source examples of Appendix § 10, saved short General outputs and the BBH answer extractor.
A verification script recomputes every labeled endpoint’s confirmation count from the judge votes, the , and values from the scores, the confirmation transitions and the unknown-only ranges of Appendix § 10.§ 4. It uses the Python standard library only. Released examples include two attributed CC BY 4.0 source excerpts with example question–answer pairs, short General outputs and six complete BBH response examples. Full source and evaluation corpora are withheld because row-level redistribution permission is not established for the complete data mixture.
All models are public. Student repositories are:
HuggingFaceTB/SmolLM3-3BQwen/Qwen3-4Bmicrosoft/Phi-4-mini-instruct
Judge and fusion repositories are:
Qwen/Qwen3.8-27Bgoogle/gemma-4-31B-itopenai/gpt-oss-20b
The recorded training runtime uses Transformers 4.57.1; judge deployment logs report vLLM 0.19.0.
Output-Length Analysis
This analysis reads the saved greedy General outputs of all 66 checkpoints (six evaluations, 48 trained methods and 12 replay controls) and counts whitespace-separated words per response. For each checkpoint and generative benchmark we take the median response length and divide it by that of the same model’s . Table 24 averages these ratios over the six settings, and Figure 7 relates them to the accuracy change of every adapted checkpoint. The Spearman correlation over the 60 adapted checkpoints is 0.77 for IFEval, 0.81 for MATH-500 and 0.84 for BBH. The 60 exclude the six Gold replay checkpoints; Table 24 adds their length ratios, and including them gives correlations of 0.80, 0.73 and 0.74. Gold replay keeps ’s MATH-500 length (ratio 1.00) yet loses 4.3 points there, which agrees with the question-level result below: departure from ’s response, not shortening alone, goes with failure. Shorter outputs are not wrong in themselves; the correlation shows that, in this study, the methods that preserve accuracy are those that preserve the initial model’s response style.
| Method | IFEval | MATH-500 | BBH |
| Naive SFT | 0.11 | 0.17 | 0.44 |
| DFT | 0.13 | 0.19 | 0.34 |
| Domain-KL | 0.19 | 0.43 | 0.52 |
| LoRA-SFT | 0.21 | 0.42 | 0.71 |
| SDFT | 0.34 | 0.28 | 0.52 |
| RAFT | 0.52 | 0.36 | 0.59 |
| Self-Rewrite | 0.53 | 0.58 | 0.65 |
| BOS replay | 0.62 | 0.64 | 0.78 |
| Gold replay | 0.74 | 1.00 | 0.88 |
| Hard | 0.82 | 0.88 | 0.92 |
| InstructReplay | 0.85 | 0.88 | 0.91 |
Table 24. Median response length relative to (1.00), averaged over six settings. ’s mean medians are 190 (IFEval), 242 (MATH-500) and 122 (BBH) words. The shaded row is InstructReplay. Bold/underline mark the closest/second-closest ratio to 1.00 per column, including ties.

Figure 7. Accuracy change versus median response length relative to for all 60 adapted checkpoints, extending Figure 2a to MATH-500 and BBH. Spearman is 0.77 (IFEval), 0.81 (MATH-500) and 0.84 (BBH).
Instruction categories. Shorter answers could fail IFEval mechanically, by violating word-count constraints. Table 25 lists all nine instruction categories. Naive SFT’s strict pass rate falls by 11 points on length constraints but by 55 to 77 points on constraints that require structure or specific content, namely format, start/end phrases, content and combinations. A terse answer violates these even when it meets any length requirement. Losses are smaller on letter case, keywords and punctuation, at 20, 31 and 9.5 points; the 67-point loss on response language rests on five instructions per model. InstructReplay stays within a few points of in most categories.
| Instruction category | Naive | Dom.-KL | BOS | Hard | IR | ||
| Length (words, sentences, paragraphs) | 32 | 59.4 | 48.4 | 46.4 | 63.5 | 60.4 | 61.5 |
| Format (sections, lists, JSON) | 36 | 89.8 | 35.2 | 44.9 | 83.3 | 91.7 | 90.7 |
| Start or end phrase | 13 | 89.7 | 12.8 | 17.9 | 55.1 | 87.2 | 88.5 |
| Content (placeholders, postscript) | 12 | 100.0 | 23.6 | 41.7 | 83.3 | 97.2 | 94.4 |
| Combination (repeat prompt, two answers) | 16 | 72.9 | 10.4 | 13.5 | 50.0 | 62.5 | 60.4 |
| Response language | 5 | 100.0 | 33.3 | 16.7 | 56.7 | 80.0 | 83.3 |
| Letter case | 23 | 84.1 | 63.8 | 54.3 | 76.8 | 79.7 | 83.3 |
| Keywords | 44 | 81.8 | 50.8 | 52.3 | 69.7 | 76.1 | 78.4 |
| Punctuation | 14 | 90.5 | 81.0 | 69.0 | 72.6 | 84.5 | 86.9 |
Table 25. IFEval strict pass rate (%) by instruction category over the six settings. is the number of instructions per model; is counted once per model and each method once per setting. Dom.-KL: Domain-KL; IR: InstructReplay. Within each category, bold/underline mark the highest/second-highest adapted pass rate; is a reference.
Question-level failures. Table 26 restricts attention to questions that answers correctly and groups each adapted response by its length relative to ’s response to the same question. Pooled over checkpoints, failure is least frequent when the length stays within 25% of ’s and rises both for much shorter and for much longer responses, in all three benchmarks. Within Naive SFT alone, failure falls steeply as responses approach ’s length. The pooled rows mix methods, so they describe where failures occur rather than isolate a causal effect of length.
| Benchmark | Checkpoints | 0.25–0.5 | 0.5–0.8 | 0.8–1.25 | ||
| IFEval | all adapted | 70 (1464) | 46 (954) | 29 (1108) | 20 (1295) | 49 (459) |
| Naive SFT | 79 (333) | 61 (96) | 33 (46) | 43 (28) | 52 (25) | |
| InstructReplay | 17 (6) | 8 (24) | 14 (129) | 10 (303) | 24 (66) | |
| MATH-500 | all adapted | 84 (1131) | 60 (832) | 34 (892) | 17 (1131) | 37 (154) |
| Naive SFT | 93 (274) | 89 (83) | 62 (37) | 41 (17) | 67 (3) | |
| InstructReplay | 14 (7) | 26 (27) | 10 (78) | 7 (276) | 23 (26) | |
| BBH | all adapted | 83 (1617) | 58 (1463) | 35 (1809) | 15 (6265) | 46 (386) |
| Naive SFT | 95 (314) | 76 (192) | 55 (165) | 27 (464) | 74 (19) | |
| InstructReplay | 20 (10) | 13 (47) | 20 (158) | 11 (877) | 32 (62) |
Table 26. Failure rate (%) of adapted checkpoints on questions that answers correctly, by per-question response length (whitespace words) relative to ; the number of question–checkpoint pairs is in parentheses. “All adapted” pools the 60 adapted checkpoints of Table 24. Within each row, bold/underline mark the lowest/second-lowest failure rate across length bins; counts are unranked.
References
- [1]Rishabh Agarwal, Nino Vieilland, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos, Matthieu Geist, and Olivier Bachem. 2024. On-policy distillation of language models: Learning from self-generated mistakes. In The Twelfth International Conference on Learning Representations.arxiv.org/abs/2306.13649
- [2]Elie Bakouch, Loubna Ben Allal, Anton Lozhkov, Nouamane Tazi, Lewis Tunstall, Carlos Miguel Patiño, Edward Beeching, Aymeric Roucher, Aksel Joonas Reedi, Quentin Gallouédec, Kashif Rasul, Nathan Habib, Clémentine Fourrier, Hynek Kydlíček, Guilherme Penedo, Hugo Larcher, Mathieu Morlon, Vaibhav Srivastav, Joshua Lochner, and 4 others. 2025. SmolLM3: smol, multilingual, long-context reasoner. Publisher model card.
- [3]Parikshit Bansal and Sujay Sanghavi. 2025. Context-free synthetic data mitigates forgetting. arXiv preprint arXiv:2505.13811.arxiv.org/abs/2505.13811
- [4]Dan Biderman, Jacob Portes, Jose Javier Gonzalez Ortiz, Mansheej Paul, Philip Greengard, Connor Jennings, Danijel King, Sam Havens, Vitaliy Chiley, Jonathan Frankle, Cody Blakeney, and John P. Cunningham. 2024. LoRA learns less and forgets less. Transactions on Machine Learning Research.
- [5]Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and Simone Calderara. 2020. Dark experience for general continual learning: a strong, simple baseline. In Advances in Neural Information Processing Systems, volume 33.arxiv.org/abs/2004.07211
- [6]Howard Chen, Noam Razin, Karthik R. Narasimhan, and Danqi Chen. 2026. Retaining by doing: The role of on-policy data in mitigating forgetting. In Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, pages 16479–16494. PMLR.arxiv.org/abs/2510.18874
- [7]Zorik Gekhman, Gal Yona, Roee Aharoni, Matan Eyal, Amir Feder, Roi Reichart, and Jonathan Herzig. 2024. Does fine-tuning LLMs on new knowledge encourage hallucinations? In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.
- [8]Abdullah Hamdi, Bernard Ghanem, and Matthias Nießner. 2023. SPARF: Large-scale learning of 3D sparse radiance fields from few input images. arXiv preprint arXiv:2212.09100v3.DOI
- [9]Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021a. Measuring massive multitask language understanding. In International Conference on Learning Representations.
- [10]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021b. Measuring mathematical problem solving with the MATH dataset. In Advances in Neural Information Processing Systems Datasets and Benchmarks Track.
- [11]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations.arxiv.org/abs/2106.09685
- [12]Jianheng Huang, Leyang Cui, Ante Wang, Chengyi Yang, Xinting Liao, Linfeng Song, Junfeng Yao, and Jinsong Su. 2024. Mitigating catastrophic forgetting in large language models with self-synthesized rehearsal. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1416–1428.arxiv.org/abs/2403.01244
- [13]James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526.DOI
- [14]Suhas Kotha, Jacob Springer, and Aditi Raghunathan. 2024. Understanding catastrophic forgetting in language models via implicit inference. In The Twelfth International Conference on Learning Representations.arxiv.org/abs/2309.10105
- [15]Qin Li, Rongyuan Li, Lu Lin, Meiting Gong, Yu Liang, and Daming Sui. 2026a. Platelet membrane biomimetic nanoparticle-based targeted delivery system of simvastatin for the treatment of ischemic stroke. PLOS One, 21(7):e0354184.DOI
- [16]Yuduo Li, Xiaofeng Shi, Qian Kou, Longbin Yu, and Hua Zhou. 2026b. RAFT: Data refinement and adaptive distillation for domain fine-tuning with alleviated forgetting. arXiv preprint arXiv:2606.00147.arxiv.org/abs/2606.00147
- [17]Zhizhong Li and Derek Hoiem. 2016. Learning without forgetting. In Computer Vision – ECCV 2016.
- [18]Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2024. Let’s verify step by step. In The Twelfth International Conference on Learning Representations.arxiv.org/abs/2305.20050
- [19]Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is your code generated by ChatGPT really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems, volume 36.arxiv.org/abs/2305.01210
- [20]Martin Marek, Dongkyu Cho, Shikai Qiu, Rumi Chunara, Pavel Izmailov, and Andrew Gordon Wilson. 2026. Forgetting in language models: Capacity, optimization, and self-generated replay. arXiv preprint arXiv:2605.26097.arxiv.org/abs/2605.26097
- [21]Microsoft. 2025. Phi-4-mini-instruct model card.
- [22]National Library of Medicine. 2026. PMC open access subset. Source and license selection described in Appendix B.
- [23]OpenBMB. 2026. UltraData-SFT-2605. Dataset revision affda6aca75e7cff78e73f93ad08d4c3b01f097c.
- [24]Oded Ovadia, Menachem Brief, Moshik Mishaeli, and Oren Elisha. 2024. Fine-tuning or retrieval? comparing knowledge injection in LLMs. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.arxiv.org/abs/2312.05934
- [25]PleIAs. 2024. Common Corpus. Publisher dataset card; exact upstream revision of the local extract unavailable.
- [26]Qwen Team. 2025. Qwen3 technical report. Preprint, arXiv:2505.09388.
- [27]Thomas Scialom, Tuhin Chakrabarty, and Smaranda Muresan. 2022. Fine-tuned language models are continual learners. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.arxiv.org/abs/2205.12393
- [28]Idan Shenfeld, Mehul Damani, Jonas Hübötter, and Pulkit Agrawal. 2026. Self-distillation enables continual learning. arXiv preprint arXiv:2601.19897. Version 2.arxiv.org/abs/2601.19897
- [29]Idan Shenfeld, Jyothish Pari, and Pulkit Agrawal. 2025. RL’s razor: Why online reinforcement learning forgets less. arXiv preprint arXiv:2509.04259.arxiv.org/abs/2509.04259
- [30]Mirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc V. Le, Ed H. Chi, Denny Zhou, and Jason Wei. 2023. Challenging BIG-Bench tasks and whether chain-of-thought can solve them. In Findings of the Association for Computational Linguistics: ACL 2023, pages 13003–13051.arxiv.org/abs/2210.09261
- [31]Yongliang Wu, Yizhou Zhou, Ziheng Zhou, Yingzhe Peng, Xinyu Ye, Xinting Hu, Wenbo Zhu, Lu Qi, Ming-Hsuan Yang, and Xu Yang. 2026. On the generalization of SFT: A reinforcement learning perspective with reward rectification. In International Conference on Learning Representations.arxiv.org/abs/2508.05629
- [32]Zhaorui Yang, Tianyu Pang, Haozhe Feng, Han Wang, Wei Chen, Minfeng Zhu, and Qian Liu. 2024a. Self-distillation bridges distribution gap in language model fine-tuning. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1028–1043.arxiv.org/abs/2402.13669
- [33]Zitong Yang, Aonan Zhang, Sam Wiseman, Xiang Kong, Ke Ye, and Dong Yin. 2024b. Memory-retaining finetuning via distillation. In NeurIPS Workshop on Fine-Tuning in Modern Machine Learning: Principles and Scalability.
- [34]Yunan Zhang, Shuoran Jiang, Mengchen Zhao, Yuefeng Li, Yang Fan, Xiangping Wu, and Qingcai Chen. 2025. GeRe: Towards efficient anti-forgetting in continual learning of LLM via general samples replay. arXiv preprint arXiv:2508.04676.arxiv.org/abs/2508.04676
- [35]Junhao Zheng, Xidi Cai, Shengjie Qiu, and Qianli Ma. 2025. Spurious forgetting in continual learning of language models. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2501.13453
- [36]Jeffrey Zhou, Tianjian Lu, Swaroop Mishra, Siddhartha Brahma, Sujoy Basu, Yi Luan, Denny Zhou, and Le Hou. 2023. Instruction-following evaluation for large language models. arXiv preprint arXiv:2311.07911.arxiv.org/abs/2311.07911
