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

大语言模型的预训练蒸馏:设计空间探索

Pre-training Distillation for Large Language Models: A Design Space Exploration

Tsinghua University(清华大学);Zhipu AI(智谱AI)

Hao Peng, Xin Lv, Yushi Bai, Zijun Yao, Jiajie Zhang, Lei Hou, Juanzi Li

AI总结:

本文将知识蒸馏扩展到大语言模型预训练阶段,通过 GLM-4-9B 蒸馏 1.9B 学生模型验证有效性,并从 logits 处理、损失选择、缩放定律及离线在线 logits 四方面系统探索设计空间,发现更大蒸馏学生模型通常获益更多而更大教师模型未必更优。

摘要:

知识蒸馏(KD)旨在将知识从大型教师模型迁移到较小的学生模型。以往在大语言模型(LLMs)领域应用知识蒸馏的工作通常聚焦于后训练阶段,即学生大语言模型直接从教师模型生成的指令和对应响应中学习。在本文中,我们将知识蒸馏扩展到大语言模型的预训练阶段,称为预训练蒸馏(PD)。我们首先使用 GLM-4-9B 作为教师大语言模型,对一个 1.9B 参数的学生大语言模型进行蒸馏的初步实验,验证了预训练蒸馏的有效性。考虑到蒸馏的关键影响因素,我们从四个方面系统探索预训练蒸馏的设计空间:logits 处理、损失选择、缩放定律以及离线或在线 logits。我们进行了大量实验来探索预训练蒸馏的设计空间,并发现了更优的配置和有意义的结论,例如更大的学生大语言模型通常从预训练蒸馏中获益更多,而更大的教师大语言模型并不一定能保证更好的结果。我们希望我们对设计空间的探索能为未来预训练蒸馏的实践提供参考。

英文摘要:

Knowledge distillation (KD) aims to transfer knowledge from a large teacher model to a smaller student model. Previous work applying KD in the field of large language models (LLMs) typically focused on the post-training phase, where the student LLM learns directly from instructions and corresponding responses generated by the teacher model. In this paper, we extend KD to the pre-training phase of LLMs, named pre-training distillation (PD). We first conduct a preliminary experiment using GLM-4-9B as the teacher LLM to distill a 1.9B parameter student LLM, validating the effectiveness of PD. Considering the key impact factors of distillation, we systematically explore the design space of pre-training distillation across four aspects: logits processing, loss selection, scaling law, and offline or online logits. We conduct extensive experiments to explore the design space of pre-training distillation and find better configurations and interesting conclusions, such as larger student LLMs generally benefiting more from pre-training distillation, while a larger teacher LLM does not necessarily guarantee better results. We hope our exploration of the design space will inform future practices in pre-training distillation.

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

↑