知识蒸馏让小模型生成更高质量文本,因它提升了精准度但牺牲了多样性。
Why Knowledge Distillation Works in Generative Models: A Minimal Working Explanation
- 通过控制熵参数调节学生模型的分布,实现精度与覆盖范围的权衡。
- 在语言模型中验证:蒸馏后样本质量提升,但生成多样性下降。
- 适合对生成质量要求高、不依赖多样性的任务如指令微调。
知识蒸馏(KD)是现代生成模型训练与部署的核心技术,尤其在大语言模型(LLM)中广泛应用。尽管其经验效果显著——使小型学生模型逼近大型教师模型的性能——但其提升生成质量的内在机制仍不清晰。本文提出一个最小化的工作解释:通过使用高斯混合模型的受控模拟,我们证明蒸馏会在学生模型中引发精度与召回的权衡。当教师分布更具有选择性时,学生模型会将更多概率质量集中于高似然区域,从而牺牲覆盖范围,这一行为由单一熵控制参数调节。随后我们在大规模语言建模设置中使用SmolLM2系列模型验证了该效应。实验结果表明,生成模型中同样存在相同的精度-召回动态:精度对应样本质量,召回对应分布覆盖。这种权衡在样本质量比多样性更重要的场景下尤为有益,例如指令微调或下游生成任务。本分析为生成模型中知识蒸馏的有效性提供了简洁且通用的解释。
原文摘要 · Abstract (English)
Knowledge distillation (KD) is a core component in the training and deployment of modern generative models, particularly large language models (LLMs). While its empirical benefits are well documented -- enabling smaller student models to emulate the performance of much larger teachers -- the underlying mechanisms by which KD improves generative quality remain poorly understood. In this work, we present a minimal working explanation of KD in generative modeling. Using a controlled simulation with mixtures of Gaussians, we demonstrate that distillation induces a trade-off between precision and recall in the student model. As the teacher distribution becomes more selective, the student concentrates more probability mass on high-likelihood regions at the expense of coverage, which is a behavior modulated by a single entropy-controlling parameter. We then validate this effect in a large-scale language modeling setup using the SmolLM2 family of models. Empirical results reveal the same precision-recall dynamics observed in simulation, where precision corresponds to sample quality and recall to distributional coverage. This precision-recall trade-off in LLMs is found to be especially beneficial in scenarios where sample quality is more important than diversity, such as instruction tuning or downstream generation. Our analysis provides a simple and general explanation for the effectiveness of KD in generative modeling.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。