arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.08543cs.CLcs.AI
收藏

MiniLLM: 大语言模型的在线策略蒸馏

MiniLLM: On-Policy Distillation of Large Language Models

The CoAI Group, Tsinghua University(清华大学CoAI小组);Microsoft Research(微软研究院)

Yuxian Gu, Li Dong, Furu Wei, Minlie Huang

AI总结:

MiniLLM通过反向KLD和在线策略优化,实现了对大语言模型的有效蒸馏,提升小型模型的生成质量和校准性能。

摘要:

知识蒸馏(KD)是一种有前景的技术,用于减少大型语言模型(LLMs)的高计算需求。然而,先前的KD方法主要应用于白盒分类模型或训练小型模型以模仿黑盒模型API,如ChatGPT。如何有效地将白盒LLM的知识蒸馏到小型模型中仍然处于探索阶段,这在开源LLM繁荣的情况下变得更加重要。在本工作中,我们提出了一种KD方法,将LLM蒸馏到更小的语言模型中。我们首先将标准KD方法中的前向Kullback-Leibler散度(KLD)目标替换为反向KLD,这更适合于生成语言模型的KD,以防止学生模型高估教师分布的低概率区域。然后,我们推导出一种有效的在线策略优化方法来学习这个目标。学生模型被称为MiniLLM。在指令遵循的设置中进行的广泛实验表明,MiniLLM在响应的精确性、整体质量、暴露偏差、校准和长文本生成性能方面均优于基线。我们的方法适用于不同模型家族,参数范围为120M至13B。我们的代码、数据和模型检查点可在https://github.com/microsoft/LMOps/tree/main/minillm中找到。

英文摘要:

Knowledge Distillation (KD) is a promising technique for reducing the high computational demand of large language models (LLMs). However, previous KD methods are primarily applied to white-box classification models or training small models to imitate black-box model APIs like ChatGPT. How to effectively distill the knowledge of white-box LLMs into small models is still under-explored, which becomes more important with the prosperity of open-source LLMs. In this work, we propose a KD approach that distills LLMs into smaller language models. We first replace the forward Kullback-Leibler divergence (KLD) objective in the standard KD approaches with reverse KLD, which is more suitable for KD on generative language models, to prevent the student model from overestimating the low-probability regions of the teacher distribution. Then, we derive an effective on-policy optimization approach to learn this objective. The student models are named MiniLLM. Extensive experiments in the instruction-following setting show that MiniLLM generates more precise responses with higher overall quality, lower exposure bias, better calibration, and higher long-text generation performance than the baselines. Our method is scalable for different model families with 120M to 13B parameters. Our code, data, and model checkpoints can be found in https://github.com/microsoft/LMOps/tree/main/minillm.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑