arXiv:2610.21337cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21337

Does On-Policy Distillation Need to Complete Every Rollout?

Zhengxin Zhang, Maosen Tang, Ning Wang, Changhao Li, Jingren Zhou, Bo Dai, Sainyam Galhotra, Alex Townsend, Claire Cardie

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

Zhengxin Zhang1,∗^{1,*}, Maosen Tang1,∗^{1,*}, Ning Wang1,∗^{1,*}, Changhao Li2,∗^{2,*}, Jingren Zhou3^{3}, Bo Dai2^{2}, Sainyam Galhotra1^{1}, Alex Townsend1^{1}, Claire Cardie1^{1}

1^{1}Cornell University 2^{2}Georgia Tech 3^{3}Alibaba Group

✉ {zz865, mt872, nw366}@cornell.edu

Figure

Unbiased by Reweighting

G=Σt=1ThtG = \Sigma_{t=1}^{T} h_t sums the gradients hth_t of all TT tokens

G^=Σt=1Mht/pt\widehat{G} = \Sigma_{t=1}^{M} h_t / p_t cut at the random stop SS: M=min⁡(S,T)M = \min(S, T);

token tt is kept with prob. Pr⁡(S≥t)\Pr(S \geq t)

ES[G^]=Σt=1TPr⁡(S≥t)pt⏟=1ht=G\mathbb{E}_S[\widehat{G}] = \Sigma_{t=1}^T \underbrace{\frac{\Pr(S \geq t)}{p_t}}_{=1} h_t = G

Unbiased

gradient sum

Matched Accuracy

Figure

Faster Training

Similar Training Dynamics

Figure

Figure 1 | Overview of STOPD: random truncation with blockwise inverse-probability weighting (top) matches Vanilla OPD's accuracy and distillation loss for an 8B student in mathematics (bottom left and right) while reducing total training time across tasks and model scales (bottom center).

Abstract | On-policy distillation (OPD) effectively transfers capabilities from a teacher to a student through feedback on student-generated rollouts. However, generating complete student rollouts and computing teacher feedback for every token make OPD computationally expensive. We introduce Stochastic Truncated On-Policy Distillation (STOPD), which accelerates OPD by randomly truncating student rollouts and correcting the resulting sampling bias with blockwise inverse-probability weighting (IPW). At each training step, we sample a stopping position for each rollout before generation and let the student generate until that position or natural termination. We obtain teacher feedback on every generated token and use blockwise IPW to compensate for the lower probability of retaining later tokens while controlling the weights. We prove that this weighting preserves Vanilla OPD's gradient sum in expectation and derive one-step update-error bounds for SGD, Adam, and Muon. We evaluate STOPD across multiple teacher–student model pairs, task domains, and optimizers. STOPD reduces generated tokens by 25–48% while maintaining accuracy comparable to Vanilla OPD, achieving 1.3–2.2× training speedups.

1. Introduction

On-policy distillation (OPD) effectively transfers capabilities from a teacher to a student through feedback on student-generated rollouts [Gu et al., 2024; Agarwal et al., 2024; Lu & Thinking Machines Lab, 2025]. The teacher provides guidance on the student's own rollouts. However, each Vanilla OPD update generates complete student rollouts, scores every token with the teacher, and trains the

∗^{*}Equal contribution.

student on all generated tokens [Wu et al., 2026]. As rollouts grow longer during training, both autoregressive generation and the student's forward and backward passes become more expensive. Scaling up the teacher and student further increases the cost of scoring, generation, and updates. These growing costs make generation and student updates major computational bottlenecks, which motivates the following question: does OPD need to complete every rollout to obtain an effective student update?

Existing approaches reduce different parts of this computation. Sparse supervision selects which generated positions contribute to the loss [Xu et al., 2026; Wang et al., 2026; Sheng et al., 2026]. These methods reduce student-update time but still require complete rollout generation, which remains the dominant cost. Motivated by declining teacher guidance at later positions, Early Stopping Rollout [Zhou et al., 2026] truncates generation to a fixed prefix. Although a fixed prefix cutoff reduces generation, it omits later-token gradients, biasing the estimate of Vanilla OPD's gradient sum and changing the directions of student updates.

We introduce Stochastic Truncated On-Policy Distillation (STOPD), which accelerates OPD by randomly truncating student rollouts and correcting the resulting sampling bias with blockwise inverse-probability weighting (IPW) [McLeish, 2011]. At each training step, we sample a stopping position for each rollout before generation and let the student generate until that position or natural termination. Every generated token receives teacher feedback, and its loss is weighted by the inverse of the probability that it is included. However, uniformly sampled stopping positions can give late tokens extreme weights, which can destabilize training. We therefore combine IPW with blockwise truncation. We first divide the maximum training length into fixed-width token blocks. We then uniformly sample a position before generation and stop at the end of the block containing it. This increases the inclusion probabilities of late tokens, thereby limiting their weights.

We show that STOPD preserves the full-generation gradient and token-count sums in expectation. We then analyze its normalized gradient, and show how batch averaging reduces the stochastic discrepancy. Finally, we bound how this gradient discrepancy affects the one-step parameter update under common optimizers such as SGD, Adam, and Muon. We further analyze how STOPD saves tokens and time. STOPD saves more tokens in expectation as rollout length increases. These token savings can translate into greater training-time savings when STOPD also improves generation throughput by reducing long-context computation or freeing cache space for more concurrent rollouts.

We evaluate STOPD in multiple domains (e.g., mathematics, code, and instruction following) with students from 1.7B to 8B and teachers from 4B to 30B. STOPD generates 25–48% fewer tokens and achieves 1.3–2.2× training speedups while closely matching Vanilla OPD in accuracy. The gains also persist when replacing the main AdamW optimizer with SGD or Muon. STOPD remains robust across block widths, maintaining similar accuracy and computational savings. Increasing the batch size from 128 to 512 further reduces truncation-induced training fluctuations without reducing the speedup. Together, these results show that OPD need not complete every rollout to learn effectively. STOPD preserves the expected gradient sums of complete rollouts using only partial generation, achieving comparable accuracy at lower training cost. This principle could extend to other autoregressive training settings, including offline and online knowledge distillation, supervised fine-tuning, and on-policy self-distillation.