arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.18588cs.LG
收藏

使用前沿开源 LLM 的知识蒸馏:泛化性与合成数据的作用

Knowledge Distillation Using Frontier Open-source LLMs: Generalizability and the Role of Synthetic Data

Microsoft(微软)

Anup Shirgaonkar, Nikhil Pandey, Nazmiye Ceren Abay, Tolga Aktas, Vijay Aski

AI总结:

本文以 Llama-3.1-405B 为教师、8B/70B 为学生评估知识蒸馏,证明高质量合成数据与推理链可显著提升泛化和推理表现,并强调多维度任务评估。

摘要:

领先的开源大型语言模型(LLM),例如 Llama-3.1-Instruct-405B,在生成文本、回答问题以及解决多种自然语言理解任务方面能力极强。然而,与较小的 LLM 相比,它们会带来更高的推理成本和延迟。知识蒸馏提供了一种方法:利用这些大型且强大的教师模型的输出来训练较小的学生模型,使学生模型能够以更低的成本和延迟进行推理,同时保持相当的准确率。我们研究了使用 Llama-3.1-405B-Instruct 教师模型以及较小的 Llama-3.1-8B-Instruct 和 Llama-3.1-70B-Instruct 学生模型进行蒸馏的效果。本文贡献包括:(a)我们评估了上述 Llama-3.1 教师—学生组合在不同任务和数据集上进行蒸馏的泛化性;(b)我们表明,在蒸馏过程中使用合成数据显著提升了 8B 和 70B 模型的准确率,并且当合成数据与推理链结合使用时,在某些数据集上甚至达到或超过 405B 模型的零样本准确率;(c)我们通过实验表明,蒸馏使 8B 和 70B 模型能够仅通过标准微调(无需定制任何损失函数)内化 405B 的推理能力,从而实现具有成本和延迟效率的学生模型推理;(d)我们指出了蒸馏评估中的陷阱,并提出了面向具体任务的评估,包括人工评分和 LLM 评分,以及基于标准答案的传统准确率基准。这项系统性研究揭示了知识蒸馏中合成数据质量的根本重要性,以及在评估蒸馏效果时结合多种、面向具体任务的准确率和质量评估方法的重要性。

英文摘要:

Leading open-source large language models (LLMs) such as Llama-3.1-Instruct-405B are extremely capable at generating text, answering questions, and solving a variety of natural language understanding tasks. However, they incur higher inference cost and latency compared to smaller LLMs. Knowledge distillation provides a way to use outputs from these large, capable teacher models to train smaller student models which can be used for inference at lower cost and latency, while retaining comparable accuracy. We investigate the efficacy of distillation using the Llama-3.1-405B-Instruct teacher and the smaller Llama-3.1-8B-Instruct and Llama-3.1-70B-Instruct student models. Contributions of this work include (a) We evaluate the generalizability of distillation with the above Llama-3.1 teacher-student pairs across different tasks and datasets (b) We show that using synthetic data during distillation significantly improves the accuracy of 8B and 70B models, and when used with reasoning chains, even matches or surpasses the zero-shot accuracy of 405B model on some datasets (c) We empirically show that distillation enables 8B and 70B models to internalize 405B's reasoning ability by using only standard fine-tuning (without customizing any loss function). This allows cost and latency-efficient student model inference. (d) We show pitfalls in evaluation of distillation, and present task-specific evaluation, including both human and LLM-grading, and ground-truth based traditional accuracy benchmarks. This methodical study brings out the fundamental importance of synthetic data quality in knowledge distillation, and of combining multiple, task-specific ways of accuracy and quality evaluation in assessing the effectiveness of distillation.

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

↑