同策略蒸馏能容忍多大的训练-推理不匹配?

·

研究论文 · 2026/11/10

本文研究了在线策略蒸馏(OPD)中训练-推理不匹配的容忍度。通过统一度量量化、权重陈旧和注入噪声等不匹配源,发现OPD能容忍显著不匹配而不明显损失训练质量,但超过经验预算后会退化。不匹配的质量代价和量化引入的不匹配因模型而异,部分层对精度降低敏感。在受控比较中,OPD在使强化学习(RL)方法不稳定的rollout配置下仍保持稳定。权重噪声下,不匹配会改变生成前缀,引入逐token校正无法解决的错误。基于此,作者提出轻量级准入检查,无需完整训练即可筛选rollout配置。模型特定的FP8方案在保持训练质量的同时,KV缓存容量至少为BF16的1.93倍;结合FP8与异步rollout,达到相同训练质量比同步BF16训练快1.62倍。

该研究首次系统量化了OPD对训练-推理不匹配的容忍度,为实际系统设计提供了经验预算和准入检查工具,并展示了FP8与异步rollout结合可大幅提升训练效率,对高效训练语言模型具有直接指导意义。

On-policy distillation (OPD) trains a student language model on its own responses, guided by a fixed teacher. Generating these responses is expensive, so systems use quantized inference and asynchronous rollouts to reduce the cost. Both, however, introduce training-inference mismatch between the rollout engine and the model being trained. Such mismatch can destabilize reinforcement learning (RL), but its effects on OPD remain unclear. This paper investigates how much mismatch OPD tolerates, where its effects arise, and how training systems can use this tolerance. Measuring all mismatch sources on one scale, we examine quantization across three student-teacher pairs, with additional tests of weight staleness and injected noise on one pair. OPD tolerates substantial mismatch without meaningful loss of training quality but degrades at higher levels, revealing an empirical mismatch budget. Both the quality cost of mismatch and the mismatch introduced by quantization depend on the model, with some layers particularly sensitive to reduced precision. In controlled comparisons, OPD remains stable under rollout configurations that destabilize RL methods. Under weight noise, mismatch also shifts the prefixes reached during generation, introducing errors that per-token corrections cannot address. To put these findings into practice, we introduce a lightweight admission check that screens rollout configurations against a calibrated budget without requiring a full training run for each candidate. Model-specific FP8 recipes preserve training quality while providing capacity for at least 1.93times as many KV-cache tokens as BF16. Combining FP8 with asynchronous rollouts reaches the same training quality 1.62times sooner than synchronous BF16 training. Code is available at https://github.com/benyucong/train-inference-mismatch-opd

阅读原文

参与讨论