将知识蒸馏用于大模型预训练阶段,提升小模型性能。
Pre-training Distillation for Large Language Models: A Design Space Exploration
- 在预训练阶段用大模型指导小模型,而非仅限于微调后阶段。
- 1.9B学生模型在GLM-4-9B教师模型下蒸馏后性能显著提升。
- 发现学生模型越大越受益,教师大小并非决定性因素。
知识蒸馏(KD)旨在将大模型的知识迁移到小模型中。以往针对大语言模型(LLM)的研究多聚焦于后训练阶段,即学生模型直接学习教师模型生成的指令与响应。本文将蒸馏扩展至大模型的预训练阶段,称为预训练蒸馏(PD)。我们以GLM-4-9B为教师模型,蒸馏一个1.9B参数的学生模型,验证了PD的有效性。系统探索了四个关键设计维度:输出概率处理、损失函数选择、缩放规律以及离线或在线日志计算方式。通过大量实验,发现更大的学生模型通常从预训练蒸馏中获益更多,而更大的教师模型并不一定带来更好结果。本研究为未来预训练蒸馏实践提供了重要参考。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。