[论文解读] MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning
MAmmoTH 引入开源数学通用型大语言模型,通过混合的 CoT 与 PoT 指令微调数据集(MathInstruct)进行训练,实现在多样数学问题上的强泛化,并且优于此前的开源模型。
We introduce MAmmoTH, a series of open-source large language models (LLMs) specifically tailored for general math problem-solving. The MAmmoTH models are trained on MathInstruct, our meticulously curated instruction tuning dataset. MathInstruct is compiled from 13 math datasets with intermediate rationales, six of which have rationales newly curated by us. It presents a unique hybrid of chain-of-thought (CoT) and program-of-thought (PoT) rationales, and also ensures extensive coverage of diverse fields in math. The hybrid of CoT and PoT not only unleashes the potential of tool use but also allows different thought processes for different math problems. As a result, the MAmmoTH series substantially outperform existing open-source models on nine mathematical reasoning datasets across all scales with an average accuracy gain between 16% and 32%. Remarkably, our MAmmoTH-7B model reaches 33% on MATH (a competition-level dataset), which exceeds the best open-source 7B model (WizardMath) by 23%, and the MAmmoTH-34B model achieves 44% accuracy on MATH, even surpassing GPT-4's CoT result. Our work underscores the importance of diverse problem coverage and the use of hybrid rationales in developing superior math generalist models.
研究动机与目标
- 促进开源 LLM 在超越数据集特定微调的广义数学推理能力。
- 创建一个多样化的高质量指令微调数据集,结合 CoT 与 PoT 的推理过程。
- 在广泛的同域内和跨域的数学基准测试上评估多尺度的 Llama-2 和 Code Llama 基模型。
- 展示混合解码(PoT 优先,回落到 CoT)的对性能的影响。
提出的方法
- 通过聚合 13 个现有数学数据集和 6 个新整理的数据集来构建 MathInstruct。
- 整合链式推理(CoT)与程序化推理(PoT)相结合的推理理由。
- 以 Alpaca 风格数据格式,在 7B–70B 规模的 Llama-2 和 Code Llama 基模型上进行微调。
- 以学习率 2e-5(7B/13B)和 1e-5(34B/70B)进行训练,采用 3 轮余弦学习率调度,并对大模型使用 DeepSpeed ZeRO-3。
- 采用混合解码策略进行评估:先尝试 PoT;若不可执行,则回退到 CoT;报告合并后的性能。
实验结果
研究问题
- RQ1多样化、混合的 CoT/PoT 指令微调数据集是否能提升开源 LLM 在同域内和跨域任务中的数学泛化能力?
- RQ2在 MathInstruct 训练下,基础模型的选择(Llama-2 与 Code Llama)及模型规模如何影响数学泛化?
- RQ3混合解码(PoT 优先,回落到 CoT)对跨数学基准的整体解题准确性有何影响?
- RQ4数据集规模和数据源多样性是否叠加,带来可推广的数学推理能力提升?
- RQ5在标准数学推理基准上,MAmmoTH 与闭源模型相比如何,尤其在跨域设置中?
主要发现
- MAmmoTH 与 MAmmoTH-Coder 在九个数学推理数据集上超越此前的开源模型,取得显著提升,尤其在跨域场景。
- 混合 CoT/PoT 训练与混合解码策略相比仅使用 CoT 或 PoT 时,带来最佳总体性能。
- 在 MATH 数据集上,7B MAmmoTH 模型显著超过 WizardMath,34B MAmmoTH-Coder 在某些配置下甚至可超越某些 GPT-4 CoT 结果。
- Code-focused base models (Code-Llama) generally outperform plain Llama-2 in OOD scenarios, with MAmmoTH-Coder often achieving higher averages than MAmmoTH.
- 消融研究表明,专注于 PoT 的微调提供强劲提升,而将 CoT 与 PoT 数据结合则带来最强、最稳健的性能。
- MathInstruct 数据源的多样性至关重要;加入新整理的数据集在多个基准测试上产生实质性提升。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。