[论文解读] Beyond Answers: Transferring Reasoning Capabilities to Smaller LLMs Using Multi-Teacher Knowledge Distillation
TinyLLM 提出了一种多教师知识蒸馏框架,通过利用推理引导训练,将多个大型语言模型(LLMs)的推理能力迁移至更小的学生模型。通过使用上下文示例生成器和教师强制链式思维(Chain-of-Thought),学生模型学习到高质量、上下文相关的推理过程,在仅使用教师模型1.1%参数量的情况下,性能相比全微调最高提升12.57%。
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.
研究动机与目标
- 解决单教师知识蒸馏在小型 LLM 中知识多样性有限且缺乏上下文推理的问题。
- 通过从多个多样化的大规模教师 LLM 中学习,提升紧凑型学生模型的泛化能力和推理能力。
- 通过引入丰富且上下文相关的推理过程,而非仅依赖真实标签,提升蒸馏质量。
- 开发一种可扩展且高效的蒸馏流水线,在参数量极低的条件下保持高性能。
提出的方法
- 利用多个大型 LLM(如 FLAN-T5 和 LLaMA 2)作为协同教师,提供多样化的推理视角和知识。
- 采用上下文示例生成器提供任务示范,使教师能够生成与上下文相适应的推理过程。
- 应用教师强制链式思维策略,确保教师生成的推理过程准确且与输入上下文一致。
- 通过多任务指令微调训练学生模型,联合优化答案准确率和推理一致性。
- 引入权衡权重机制(α),在蒸馏过程中平衡不同教师提供的推理过程的贡献。
- 采用轻量级训练设置,使用 LoRA 和全微调基线进行对比。
实验结果
研究问题
- RQ1与单教师方法相比,从多个多样化 LLM 中进行知识蒸馏是否能提升小型学生模型的推理泛化能力?
- RQ2结合多个教师的推理信号是否优于仅依赖真实答案标签,带来更好的性能表现?
- RQ3上下文示例生成器和教师强制链式思维在生成上下文相关推理过程方面是否有效,适用于蒸馏任务?
- RQ4小型学生模型在多大程度上能够超越其更大的教师模型在推理任务中的表现?
- RQ5性能对超参数(如推理整合的权衡权重 α)的敏感程度如何?
主要发现
- 尽管仅使用 7B 参数教师模型的 1.1%,TinyLLM 在 780M 参数的学生模型上相比全微调实现了平均 12.57% 的性能提升。
- 780M 参数的学生模型在六个数据集上分别以 +14.56% 和 +23.40% 的优势超越了 3B 和 7B 参数的教师模型。
- 250M 参数的学生模型分别以 +0.70% 和 +16.82% 的优势超越了 3B 和 7B 参数的教师模型,仅使用了其 8.3% 和 3.6% 的参数量。
- 消融实验表明,若移除上下文示例或教师推理过程,性能显著下降,验证了二者在模型中的关键作用。
- 超参数分析显示,最优 α 值因任务而异:在简洁常识推理任务中,较高的 α 更有益;而在复杂生物医学问题中,较低的 α 已足够。
- 该方法在常识推理(OBQA、ARC、PIQA、RiddleSense)和生物医学推理(PubMedQA、BioASQ)任务中均一致提升了性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。