LLMs Can Easily Learn to Reason from Demonstrations Structure, not content, is what matters!
本文提出了一种通过数据高效和参数高效的监督微调和低秩自适应来训练大型语言模型进行长链思维推理的方法,发现长链思维的结构对于学习过程至关重要,而单个推理步骤的内容影响较小。
更新于 2025-02-12。作者:Dacheng Li、Shiyi Cao、Tyler Griggs、Shu Liu、Xiangxi Mo、Shishir G. Patil、Matei Zaharia、Joseph E. Gonzalez、Ion Stoica。
中文摘要
大型推理模型(LRMs)通过遵循包含反思、回溯和自我验证的长链式思维(Long CoT)来处理复杂的推理问题。然而,引发长链式思维所需的训练技术和数据要求仍然了解甚少。在这项工作中,我们发现大型语言模型(LLM)可以通过数据高效的监督微调(SFT)和参数高效的低秩自适应(LoRA)有效地学习长链式思维推理。仅使用17k个长链式思维训练样本,Qwen2.5-32B-Instruct模型在包括AIME 2024的56.7%(+40.0%)和LiveCodeBench的57.0%(+8.1%)在内的广泛数学和编码基准测试中实现了显著提升,这与专有o1-preview模型的44.6%和59.1%的得分相当。更重要的是,我们发现长链式思维的结构对于学习过程至关重要,而单个推理步骤的内容影响微乎其微。影响内容的变化,如使用错误样本进行训练或删除推理关键词,对性能的影响很小。相反,破坏长链式思维逻辑一致性的结构修改,如打乱或删除推理步骤,会显著降低准确性。例如,在训练带有错误答案的长链式思维样本上,模型仍然比使用完全正确样本训练的模型仅低3.2%的准确性。这些见解加深了我们对于如何在LLMs中引发推理能力理解,并突出了高效训练下一代推理模型的关键考虑因素。这是我们之前发布的Sky-T1-32B-Preview模型的学术论文。代码可在https://github.com/NovaSky-AI/SkyThought上找到。
英文摘要
Large reasoning models (LRMs) tackle complex reasoning problems by following long chain-of-thoughts (Long CoT) that incorporate reflection, backtracking, and self-validation. However, the training techniques and data requirements to elicit Long CoT remain poorly understood. In this work, we find that a Large Language model (LLM) can effectively learn Long CoT reasoning through data-efficient supervised fine-tuning (SFT) and parameter-efficient low-rank adaptation (LoRA). With just 17k long CoT training samples, the Qwen2.5-32B-Instruct model achieves significant improvements on a wide range of math and coding benchmarks, including 56.7% (+40.0%) on AIME 2024 and 57.0% (+8.1%) on LiveCodeBench, competitive to the proprietary o1-preview model's score of 44.6% and 59.1%. More importantly, we find that the structure of Long CoT is critical to the learning process, whereas the content of individual reasoning steps has minimal impact. Perturbations affecting content, such as training on incorrect samples or removing reasoning keywords, have little impact on performance. In contrast, structural modifications that disrupt logical consistency in the Long CoT, such as shuffling or deleting reasoning steps, significantly degrade accuracy. For example, a model trained on Long CoT samples with incorrect answers still achieves only 3.2% lower accuracy compared to training with fully correct samples. These insights deepen our understanding of how to elicit reasoning capabilities in LLMs and highlight key considerations for efficiently training the next generation of reasoning models. This is the academic paper of our previous released Sky-T1-32B-Preview model. Codes are available at https://github.com/NovaSky-AI/SkyThought.
解读
一句话总结
本文提出了一种通过数据高效和参数高效的监督微调和低秩自适应来训练大型语言模型进行长链思维推理的方法,发现长链思维的结构对于学习过程至关重要,而单个推理步骤的内容影响较小。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:大型推理模型通过长链思维(Long CoT)来解决复杂的推理问题,但如何从现有的语言模型中激发长链思维仍不清楚。
- 现有方案不足:现有的长链思维训练方法要么是闭源的,要么成本高昂。
- 研究目标:开发一种数据高效和参数高效的训练方法,使语言模型能够进行长链思维推理。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种使用监督微调(SFT)和低秩自适应(LoRA)来训练语言模型进行长链思维推理的方法。
- 方法改进:通过使用少量样本(17k)对Qwen2.5-32B-Instruct模型进行微调,实现了与OpenAI o1-preview相当的性能。
- 优势:与现有方法相比,该方法在数据效率和参数效率方面具有显著优势。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:使用17k长链思维训练样本对Qwen2.5-32B-Instruct模型进行微调,并在多个数学和编码基准测试中取得了显著改进。
- 性能提升:在AIME 2024和Live-CodeBench上的准确率分别提高了40.0%和8.1%。
- 对比结果:与基线方法的对比显示,该方法在多个基准测试中均取得了显著的性能提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:该方法可以应用于需要复杂推理能力的任务,如数学、编码和科学问题解决。
- 实施建议:在实际部署中,应考虑使用低秩自适应来优化参数效率,并确保训练数据的质量和多样性。
- 局限与展望:尽管该方法在数据效率和参数效率方面具有优势,但未来仍需进一步研究以解决模型的可解释性和鲁棒性问题。
来源
机器可读索引:llms.txt