[论文解读] Large Language Models Are Reasoning Teachers
本文提出 Fine-tune-CoT,一种利用大型语言模型(如 GPT-3 175B)作为推理教师生成多步推理过程的方法,这些推理过程随后用于微调较小的学生模型,使其能够实现强大的推理性能。关键贡献在于,即使参数量极小(小至 0.3B)的学生模型,也能在复杂推理任务中超越更大的学生模型,甚至超越 175B 的教师模型,尤其当其通过教师模型获得多样化推理路径时表现更优。
Recent works have shown that chain-of-thought (CoT) prompting can elicit language models to solve complex reasoning tasks, step-by-step. However, prompt-based CoT methods are dependent on very large models such as GPT-3 175B which are prohibitive to deploy at scale. In this paper, we use these large models as reasoning teachers to enable complex reasoning in smaller models and reduce model size requirements by several orders of magnitude. We propose Fine-tune-CoT, a method that generates reasoning samples from very large teacher models to fine-tune smaller models. We evaluate our method on a wide range of public models and complex tasks. We find that Fine-tune-CoT enables substantial reasoning capability in small models, far outperforming prompt-based baselines and even the teacher model in many tasks. Additionally, we extend our method by leveraging the teacher model's ability to generate multiple distinct rationales for each original sample. Enriching the fine-tuning data with such diverse reasoning results in a substantial performance boost across datasets, even for very small models. We conduct ablations and sample studies to understand the emergence of reasoning capabilities of student models. Our code implementation and data are available at https://github.com/itsnamgyu/reasoning-teacher.
研究动机与目标
- 在不依赖大规模推理或昂贵人工标注推理过程的前提下,使小型语言模型具备复杂推理能力。
- 通过蒸馏方法转移推理能力,减少对超大模型(如 175B 参数)的依赖,以实现推理。
- 通过教师模型生成多样化推理过程来提升学生模型性能,避免人工标注。
- 探究学生模型在微调教师生成的推理过程后,推理能力如何涌现。
- 提供一种可扩展、适合部署的替代方案,以替代需要大规模模型的基于提示的思维链方法。
提出的方法
- 使用参数极多的语言模型(如 GPT-3 175B)作为教师,通过零样本思维链提示生成多步推理过程。
- 基于最终答案的正确性对生成的推理过程进行过滤,以确保训练数据的高质量。
- 在筛选后的“问题-推理-答案”三元组上微调较小的学生模型,以转移推理能力。
- 通过温度采样(T=0.7)生成每组输入的多个不同推理路径,扩展方法以增强推理多样性,丰富训练数据。
- 在 12 项多样化的推理任务上,对一系列开源和专有模型应用常规微调和多样化推理微调。
- 为开源模型采用一致的训练设置(固定初始学习率=3e-4,批量大小=8,最多 20 个周期),为专有模型使用默认 OpenAI API 设置。
实验结果
研究问题
- RQ1超大语言模型能否有效作为推理教师,使远小于其参数量的学生模型具备复杂推理能力?
- RQ2从教师模型生成多个多样化推理路径如何影响学生模型的性能?
- RQ3在微调教师生成的推理数据后,小型学生模型(如 0.3B 参数)在多大程度上能超越更大的模型甚至教师模型?
- RQ4哪些因素——如数据集规模、教师质量或学生模型大小——会影响 Fine-tune-CoT 方法的可扩展性和泛化能力?
- RQ5在微调教师蒸馏推理数据后,小型模型中推理能力涌现的内在机制是什么?
主要发现
- 使用教师生成推理过程微调的小型学生模型,其推理性能显著优于基于提示的基线方法,甚至在多个任务上超越了 175B 的教师模型。
- 即使参数量小至 0.3B 的学生模型,在使用教师生成的多样化推理数据训练后,也优于更大规模的学生模型(如 3B–12B)。
- 通过温度采样生成的多样化推理路径显著提升了所有数据集上的性能,且训练阶段的额外计算成本极低。
- 性能在模型大小、数据集规模、教师质量以及多样化推理的使用方面均表现出一致的可扩展性,表明方法具备鲁棒性和泛化能力。
- 消融实验确认,微调时使用推理过程对推理性能至关重要;若不使用推理过程,仅进行常规微调则无法激发小型模型的推理能力。
- 样本级分析显示,学生模型能够从多样化教师推理过程中学习并泛化推理模式,表明通过数据增强实现了推理能力的涌现。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。