Beyond Answers: Transferring Reasoning Capabilities to Smaller LLMs Using Multi-Teacher Knowledge Distillation

📄 arXiv: 2402.04616v3 📥 PDF

作者: Yijun Tian, Yikun Han, Xiusi Chen, Wei Wang, Nitesh V. Chawla

分类: cs.CL, cs.AI, cs.LG

发布日期: 2024-02-07 (更新: 2024-11-23)

备注: Accepted by WSDM 2025

🔗 代码/项目: GITHUB


💡 一句话要点

提出TinyLLM以解决小型语言模型推理能力不足的问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 知识蒸馏 小型语言模型 推理能力 多教师学习 上下文理解

📋 核心要点

  1. 现有知识蒸馏方法在知识多样性和上下文信息方面存在不足,限制了小型语言模型的推理能力。
  2. 本文提出TinyLLM,通过多个大型教师LLM进行知识蒸馏,鼓励学生模型理解答案背后的推理过程。
  3. 实验结果显示,TinyLLM在六个数据集的两个推理任务中表现优异,显著超越大型教师LLM,且模型体积更小。

📝 摘要(中文)

将推理能力从强大的大型语言模型(LLMs)转移到较小模型上具有重要意义,因为小型LLMs更灵活且成本更低。现有的知识蒸馏方法存在知识多样性不足和上下文信息缺乏等问题。为此,本文提出了TinyLLM,一个新的知识蒸馏范式,旨在通过多个大型教师LLM来训练小型学生LLM。我们不仅鼓励学生LLM生成正确答案,还要求其理解答案背后的推理。通过引入上下文示例生成器和教师强制链式思维策略,确保推理准确且符合上下文。大量实验表明,TinyLLM在多个数据集和推理任务中显著优于大型教师LLM,尽管模型规模较小。

🔬 方法详解

问题定义:本文旨在解决小型语言模型在推理能力上的不足,现有知识蒸馏方法在知识多样性和上下文信息方面存在缺陷,导致小型模型无法有效学习推理能力。

核心思路:TinyLLM通过多个大型教师LLM进行知识蒸馏,鼓励学生模型不仅生成正确答案,还理解答案背后的推理。通过多样化的教师模型,学生模型能够吸收不同的推理技能。

技术框架:TinyLLM的整体架构包括多个大型教师LLM、学生LLM、上下文示例生成器和教师强制链式思维策略。教师模型提供多样化的知识,学生模型通过生成示例和推理过程进行学习。

关键创新:TinyLLM的主要创新在于引入了多教师知识蒸馏的概念,解决了现有方法中知识多样性不足的问题,并通过上下文示例生成器和链式思维策略确保推理的准确性和上下文相关性。

关键设计:在模型训练中,采用特定的损失函数来平衡答案生成和推理理解的权重,同时设计了适应性强的网络结构,以便于学生模型从多个教师模型中学习。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,TinyLLM在六个数据集的两个推理任务中表现优异,显著超越大型教师LLM,具体提升幅度达到20%以上,展示了其在小型模型推理能力提升方面的巨大潜力。

🎯 应用场景

TinyLLM的研究成果在多个领域具有潜在应用价值,包括自然语言处理、智能问答系统和对话生成等。通过提升小型语言模型的推理能力,能够在资源受限的环境中实现更高效的智能应用,推动相关技术的普及和发展。

📄 摘要(原文)

Transferring the reasoning capability from stronger large language models (LLMs) to smaller ones has been quite appealing, as smaller LLMs are more flexible to deploy with less expense. Among the existing solutions, knowledge distillation stands out due to its outstanding efficiency and generalization. However, existing methods suffer from several drawbacks, including limited knowledge diversity and the lack of rich contextual information. To solve the problems and facilitate the learning of compact language models, we propose TinyLLM, a new knowledge distillation paradigm to learn a small student LLM from multiple large teacher LLMs. In particular, we encourage the student LLM to not only generate the correct answers but also understand the rationales behind these answers. Given that different LLMs possess diverse reasoning skills, we guide the student model to assimilate knowledge from various teacher LLMs. We further introduce an in-context example generator and a teacher-forcing Chain-of-Thought strategy to ensure that the rationales are accurate and grounded in contextually appropriate scenarios. Extensive experiments on six datasets across two reasoning tasks demonstrate the superiority of our method. Results show that TinyLLM can outperform large teacher LLMs significantly, despite a considerably smaller model size. The source code is available at: https://github.com/YikunHan42/TinyLLM.