Manuscript Offprint

arXiv:2610.06105

Flash-OPD: Fast On-Policy Distillation

Wei Chen, Junle Chen, Yitong Yang, Zhaoyang Xu, Jiaxin Lin, Yuxuan Liang, Xiaofang Zhou, Kai Wang, Rui Chen

Wei Chen1,2,3^{1,2,3}, Junle Chen3^{3}, Yitong Yang1^{1}, Zhaoyang Xu1^{1}, Jiaxin Lin1^{1}, Yuxuan Liang2^{2}, Xiaofang Zhou3^{3}, Kai Wang1^{1}, Rui Chen1^{1}

1^{1}Tencent Hy, 2^{2}HKUST(GZ), 3^{3}HKUST

On-policy distillation (OPD) provides dense teacher supervision on student-generated trajectories, but generating and evaluating long rollouts incurs substantial training cost. Existing acceleration methods reduce this cost through open-loop rollout schedules or closed-loop horizon adaptation. However, supervision compatibility can vary substantially across trajectories, making a single rollout horizon difficult to match their heterogeneous reliable lengths: an overly short horizon may truncate useful supervision, while an overly long one wastes computation beyond reliable regions. Our key insight is that the trajectory-specific reliability boundary need not be predicted before generation. By viewing reliability as the first-passage of accumulated low teacher–student compatibility events, the boundary is inherently unknown before sampling, yet whether it has been reached can be determined exactly from the observed prefix. Building on this insight, we propose Flash-OPD, which shifts from rollout-horizon control to adaptive trajectory-level boundary verification. Flash-OPD interleaves cached generation with teacher verification and independently stops each trajectory according to its observed compatibility events. To reduce verification overhead, the recent event rate is used only to schedule the next verification point, while the actual stopping decision always relies on the exact cumulative count. This separation prevents estimation errors from causing premature termination while enabling efficient verification during generation. Extensive experiments across diverse datasets and teacher–student settings show that Flash-OPD achieves 2.2×−7.5×2.2\times-7.5\times speedups over standard OPD while maintaining or improving accuracy.

Correspondence: onedeanxxx@gmail.com

Project Page: https://onedean.github.io/Flash-OPD-Site

Repository: https://github.com/Onedean/Flash-OPD

Date: September 24, 2026

Tencent Hy

1 Introduction

On-policy distillation (OPD) has become an important component of frontier language model post-training, enabling both capability transfer and the consolidation of specialized teachers (Yang et al., 2025; Xu et al., 2026; Zeng et al., 2026). By providing dense teacher feedback on student-generated prefixes, OPD mitigates the training–inference mismatch of learning from fixed teacher-generated responses (Ross et al., 2011; Kim and Rush, 2016; Gu et al., 2024). Practical token-level formulations make this feedback locally available without accumulating future distillation signals into each update (Agarwal et al., 2024; Lu and Thinking Machines Lab, 2025). However, local supervision does not automatically yield efficient long-horizon training: generating and evaluating long trajectories remains costly, while teacher guidance may become less useful as student prefixes drift into regions of low teacher–student compatibility (Li et al., 2026; Wang et al., 2026).

Recent work addresses this bottleneck by controlling rollout length through predefined schedules (Zhang et al., 2026b,a) or feedback-driven adaptation (Yang et al., 2026c; Liang et al., 2026). Yet these methods select a shared horizon for each batch, despite substantial variation in supervision compatibility across trajectories. Figure 1 illustrates this granularity mismatch: a shared horizon can extend well beyond the compatibility-based boundaries of some samples, even as it adapts over training. Shortening that horizon uniformly may instead curtail useful supervision for other samples. Sample-level prefix filtering offers finer selection, but produces a binary keep-or-drop decision rather than adapting the continuation length of each retained trajectory (Zhao et al., 2026a). These limitations motivate allocating rollout computation at the trajectory level.

Existing Shared-Horizon Methods

Figure

Our Adaptive Verification & Generation Method

Figure

Figure 1 From a shared rollout horizon to adaptive verification. Existing OPD acceleration methods commit to a shared horizon before trajectory sampling, causing premature truncation or redundant generation when usable lengths vary across trajectories; Flash-OPD instead verifies reliability during generation and retires each trajectory at its own boundary, ensuring reliability and efficiency.

Our key insight is that a trajectory’s stopping boundary cannot be known exactly before sampling, nor does it need to be: it can instead be self-verified during generation. We use teacher–student top-k overlap as a proxy for local compatibility and define the boundary as the first position where the cumulative number of low-compatibility events reaches a prescribed budget. This accumulation tolerates isolated disagreements while adapting the boundary to each realized trajectory. Although its location is unknown in advance, whether the boundary has been crossed can be determined exactly from the observed prefix. Moreover, with model parameters fixed during rollout collection, extending a prefix leaves its existing token-level distillation signals unchanged. This enables interleaved generation and teacher evaluation, turning shared horizon into per-trajectory boundary verification.

Building on this insight, we propose Flash-OPD, which adaptively schedules verification and independently stops each trajectory within a reliable rollout horizon. At each verification point, Flash-OPD evaluates newly generated positions and checks the cumulative event count. If the budget remains unexhausted, it uses the recent event rate to schedule the next check; otherwise, it stops. Crucially, the estimated event rate determines when to verify, whereas the observed count determines whether to stop. For boundaries reached before EOS or the length cap, adaptive verification cannot trigger termination before the defined boundary. Resuming from cached prefixes ensures that each token is decoded only once, avoiding redundant generation. Through verified stopping at the trajectory level, Flash-OPD reduces rollout computation and substantially improves training efficiency over vanilla OPD while maintaining strong performance. Our contributions are threefold:

  • We identify a granularity mismatch between batch-level rollout horizons and trajectory-specific supervision compatibility, motivating per-sample stopping for long-horizon OPD acceleration.

  • We propose Flash-OPD, which interleaves cached generation with adaptive verification to determine each trajectory’s rollout length from its observed compatibility events.

  • Extensive experimental results across diverse datasets and teacher–student settings demonstrate that Flash-OPD achieves strong effectiveness, efficiency, robustness, and scalability.

References (34)