语言模型蒸馏中容量间隙定律的探究
Towards the Law of Capacity Gap in Distilling Language Models
AI总结:
本研究针对语言模型蒸馏中的容量间隙诅咒问题,归纳出最优教师规模与学生规模线性相关的容量间隙定律,拓展至7B大模型蒸馏后得到性能更优的通用大语言模型,大幅降低了确定最优教师的计算成本。
摘要:
语言模型(LM)蒸馏旨在将大型教师语言模型中的知识蒸馏到小型学生模型中。作为语言模型蒸馏面临的一个关键问题,性能更优的学生模型往往来自规模相对较小的教师模型,而非更大的教师模型,尤其是当师生之间存在显著容量间隙时。这一问题通常被称为“容量间隙诅咒”,表明在教师模型的缩放过程中,可能存在一个能产出性能最佳学生模型的最优教师。因此,需要对多种规模的教师模型进行蒸馏试验以确定最优教师,这在大语言模型(LLM)语境下会产生极高的计算成本。本文通过对大规模(<3B)小型语言模型蒸馏的初步研究归纳出“容量间隙定律”,以此解决这一关键瓶颈:在不同模型和数据规模下,最优教师的规模始终与学生规模呈线性关系。将该定律拓展至更大规模(7B)的大语言模型蒸馏后,我们成功得到了性能优于众多同类模型的通用大语言模型。
英文摘要:
Language model (LM) distillation aims at distilling the knowledge in a large teacher LM to a small student one. As a critical issue facing LM distillation, a superior student often arises from a teacher of a relatively small scale instead of a larger one, especially in the presence of substantial capacity gap between the teacher and student. This issue, often referred to as the \textit{curse of capacity gap}, suggests that there is likely an optimal teacher yielding the best-performing student along the scaling course of the teacher. Consequently, distillation trials on teachers of a wide range of scales are called for to determine the optimal teacher, which becomes computationally intensive in the context of large LMs (LLMs). This paper addresses this critical bottleneck by providing the \textit{law of capacity gap} inducted from a preliminary study on distilling a broad range of small-scale (<3B) LMs, where the optimal teacher consistently scales linearly with the student scale across different model and data scales. By extending the law to LLM distillation on a larger scale (7B), we succeed in obtaining versatile LLMs that outperform a wide array of competitors.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。