Manuscript Offprint

arXiv:2611.02746

Replay for LLM Continual Learning with Multi-Teacher On-Policy Distillation

Yiqiao Qiu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Multi-teacher on-policy distillation (MOPD) distills domain experts into one student but needs every expert at once. When domains arrive one at a time and earlier experts are gone, the previous-stage student can teach replayed prompts of earlier domains inside every stage. Some pipelines instead store every stage snapshot for a final multi-teacher recovery stage. On five domains with a 1.5B student and five public experts, this paper compares both with joint MOPD. It varies the replay budget and the replay signal. The signal is token-level distillation alone or with alignment of hidden states, attention and value relations. Sequential distillation without replay or recovery is 6.2 points below 208-step joint MOPD on a 14-benchmark average and 3.5 points below on the 11 benchmarks outside safety. Without snapshots, replay toward the previous student closes 3.8 of the 6.2 points when the earlier domains share the replay budget of a stage. With a fixed share of seven replay steps per earlier domain and stage, it closes 5.8 over two training runs. This is level with the 5.9 of recovery from all snapshots, both at its default length and when given as many training steps as the fixed share. Alignment terms on replay steps change the average by about one point or less. If refusal and compliance count equally in safety, shared-budget replay ranks first among the trained configurations, and the fixed share stays at or above recovery. Against the shared budget, the fixed share lowers the score on the newest domain. Recovery lowers this score as well, in five of six cases. The replay steps of the fixed share grow quadratically with the number of stages.

Figure

Figure 1: Gain over Seq in the 14-benchmark Avg after five stages, by what is kept (table 6). Seq is sequential distillation without replay or recovery. On replay steps, Replay-KL distills only the token distribution. Replay-KL + OPRD adds the hidden-state term, and FSAR adds all three alignment terms. Seq + Recovery-70 has a 70-step recovery stage. Values are means over three evaluation seeds, so gains and differences below 0.46 points are within the evaluation noise. Over two training runs, Replay-KL (fixed share), Seq + Recovery and Seq + Recovery-70 gain 5.77, 5.90 and 5.89 over the two-run mean of Seq (table 14). Blue: only the previous model is kept (S1); orange: every stage snapshot is kept (S2). Dashed: joint MOPD with every expert at once.

1 Introduction

Knowledge distillation trains a student to match a teacher's output distribution [1]; on-policy distillation computes that match on the student's own samples, so the student is corrected on the states it actually visits [2, 3]. Multi-teacher on-policy distillation (MOPD) applies the same objective to several domain experts at

*Corresponding author: yiqiaoqiu@hotmail.com ‡Work not related to role at Fireworks AI.

Multi-Teacher On-Policy Distillation

once: each prompt is routed to the expert of its domain, and one student absorbs all of them. Recent model reports use this recipe in joint post-training stages [4–6], and one MOPD study reports a normalized score of 0.937 for joint MOPD against 0.775 for sequential reinforcement learning on the same domains [7]. In every case the joint stages need all experts at the same time.

Capabilities, however, often arrive one after another, and what can be kept differs between settings. In a snapshot-free setting the learner holds the new expert, the student produced by the previous stage and the prompts of earlier domains, but no earlier expert and no stage snapshot. Some recent pipelines keep more: GLM-5 trains its post-training stages in sequence and ends with a cross-stage distillation stage taught by the final checkpoint of every stage [8, §3.5], and ACLArena evaluates the same idea as a multi-teacher recovery stage [9]; such pipelines store every stage snapshot until the end and are therefore not snapshot-free. When all experts are available at once, joint MOPD is possible instead [5]. These reports do not compare the alternatives under the same training budget. A release cycle mixes these cases. When a released model learns a new segment of domains, the experts of the new segment are at hand. Those of its earlier domains may be gone, and the released model is then their only teacher.

This paper treats continual MOPD as a design space defined by what is kept (section 3.1). Inside each stage, prompts of earlier domains can be replayed with the previous-stage student as their teacher (replay toward the previous student, or replay for short). The replay budget of a stage is either shared among the earlier domains or fixed per domain. Replay steps distill the token distribution alone or add alignment of hidden states [10], region-pooled self-attention scores [11] and value relations [12]. If the stage snapshots are kept, which relaxes the continual setting, a final multi-teacher recovery stage can follow. Replay with all three alignment terms is labelled FSAR (full-signal aligned replay). Throughout the paper, FSAR without a budget label uses the fixed share of seven replay steps per earlier domain and stage.

Experiments extend the same-family 1.5B setting of Latent-MOPD [13] from three to five domains (logic, math, code, safety, instruction following), each with a public expert trained from the same student, and evaluate 14 benchmarks (section 5). After five stages, sequential distillation without replay or recovery ends 6.2 points below the 208-step joint MOPD on the 14-benchmark average. Without snapshots, replay closes 3.8 of these points when the earlier domains share the replay budget of a stage. With a fixed share of seven replay steps per earlier domain and stage, it closes 5.8 over two training runs. This is level with the 5.9 of a final recovery stage from all stored snapshots, both at its default length and when given as many training steps as the fixed share (sections 5.2 and 5.3). With the snapshots stored, replay followed by recovery ends level with the 208-step joint MOPD (section 5.4). Under the shared budget, each earlier domain is replayed little. There the hidden-state term on replay steps adds about one point in the 14-benchmark average, and so do the three terms together (section 5.5). Against the shared budget, a fixed share lowers the score on the newest domain. Recovery lowers this score as well, after five of the six configurations it follows. The replay steps of the fixed share grow quadratically with the number of stages (section 5.6).

Of four merges without training, the uniform average of the experts ends below every replay configuration. The two TIES merges of the experts end above every trained configuration, by more than 3 points when every expert is kept to the end. Applied stage by stage, TIES is judged safe on 19.6% of the StrongREJECT prompts. All five experts are trained from the student itself, the case most favourable to merging in weight space: each task vector has 0.04% to 0.50% of the norm of the student's weights (section G). Section 5.7 summarizes the results by setting.

The contributions are:

  1. A formulation of continual MOPD by what is kept, from the previous-stage student alone to every stage snapshot, which brings the teacher-stream setting of continual distillation [14] to on-policy distillation of LLMs, and a five-domain benchmark of 14 tests built from public experts of one 1.5B student (sections 3 and 5.1).

  2. Measurements after five stages of replay in snapshot-free continual learning, with the replay budget shared among the earlier domains or fixed per earlier domain. The same measurements cover the pipelines that store every snapshot for a final recovery stage, with and without replay. Both are compared with sequential distillation and with joint MOPD trained nearly as long as the longest of

Multi-Teacher On-Policy Distillation

Figure

Figure 2: Three ways to train one student from experts E1,E2,E3E_1, E_2, E_3. Orange dashed arrows: on-policy distillation from an expert or a stage snapshot. Blue dashed arrows: replay steps, on which the previous-stage student Mk−1M_{k-1} teaches the prompts of earlier domains. Solid arrows: the sequence of stages, each starting from the model before it.

(a) Snapshot-free continual learning (S1 in section 3.1): earlier prompts are replayed inside every stage with the previous model as their teacher, and only that model is kept. Replay-KL (token-level loss only) and FSAR are of this kind (fig. 3).

(b) Every stage snapshot kept to the end (S2): a final multi-teacher recovery stage taught by the snapshots follows the sequence. Without replay this is Seq + Recovery; with the replay of (a), drawn as light arrows, it is replay followed by recovery. Storing the snapshots relaxes the continual setting.

(c) Joint MOPD: one stage that trains on all domains at once and needs all experts at the same time.

these configurations. The shared budget and recovery without replay are also measured after three stages (sections 5.2 to 5.4).

  1. Measurements of when alignment on replay steps adds to token-level replay, across replay budgets, with and without recovery, and under three ways of counting safety. They include the direction of the gradient of each alignment term relative to the token-level gradient (section 5.5).

  2. The costs of each choice: the score on the newest domain, training steps and the models that must be stored (section 5.6).

References (100)

Couldn't load all references. Reload the page to try again.