arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2405.07551cs.CLcs.AI
收藏

MuMath-Code: 结合工具使用大语言模型与多视角数据增强的数学推理方法

MuMath-Code: Combining Tool-Use Large Language Models with Multi-perspective Data Augmentation for Mathematical Reasoning

Tomorrow Advancing Life(好未来);College of Computer Science and Technology, Ocean University of China(中国海洋大学计算机科学与技术学院)

Shuo Yin, Weihao You, Zhilong Ji, Guoqiang Zhong, Jinfeng Bai

AI总结:

该研究提出MuMath-Code模型,结合多视角数据增强与工具使用大语言模型,通过两阶段训练策略提升数学推理能力,70B版本在GSM8K和MATH基准上取得开源方法最优性能。

摘要:

集成外部Python解释器的工具使用大语言模型(LLM)已显著提升了开源LLM的数学推理能力,而无工具方法则选择了另一条路径:增强数学推理数据。然而,整合上述两条研究路径并结合其优势的有效方法仍有待探索。在本研究中,我们首先通过多视角数据增强方法引入新的数学问题,随后为这些问题合成嵌套代码的解决方案。我们在增强后的数据集上微调开源LLM(即Llama-2),得到最终模型MuMath-Code(μ-Math-Code)。在推理阶段,我们的MuMath-Code生成代码并与外部Python解释器交互以获取执行结果,因此该模型同时利用了外部工具与数据增强的优势。为充分发挥增强数据的优势,我们提出了一种两阶段训练策略:在第一阶段,我们在纯思维链(CoT)数据上微调Llama-2得到中间模型;随后在第二阶段,用嵌套代码的数据训练该中间模型,得到最终的MuMath-Code。我们的MuMath-Code-7B在GSM8K上取得83.8分、在MATH上取得52.4分,而MuMath-Code-70B模型则在开源方法中创下了新的 state-of-the-art 性能——在GSM8K上达到90.7%、在MATH上达到55.1%。大量实验验证了工具使用与数据增强结合的有效性,以及我们提出的两阶段训练策略的有效性。我们公开发布了所提出的数据集及相关代码供公众使用。

英文摘要:

The tool-use Large Language Models (LLMs) that integrate with external Python interpreters have significantly enhanced mathematical reasoning capabilities for open-source LLMs, while tool-free methods chose another track: augmenting math reasoning data. However, a great method to integrate the above two research paths and combine their advantages remains to be explored. In this work, we firstly include new math questions via multi-perspective data augmenting methods and then synthesize code-nested solutions to them. The open LLMs (i.e., Llama-2) are finetuned on the augmented dataset to get the resulting models, MuMath-Code ($μ$-Math-Code). During the inference phase, our MuMath-Code generates code and interacts with the external python interpreter to get the execution results. Therefore, MuMath-Code leverages the advantages of both the external tool and data augmentation. To fully leverage the advantages of our augmented data, we propose a two-stage training strategy: In Stage-1, we finetune Llama-2 on pure CoT data to get an intermediate model, which then is trained on the code-nested data in Stage-2 to get the resulting MuMath-Code. Our MuMath-Code-7B achieves 83.8 on GSM8K and 52.4 on MATH, while MuMath-Code-70B model achieves new state-of-the-art performance among open methods -- achieving 90.7% on GSM8K and 55.1% on MATH. Extensive experiments validate the combination of tool use and data augmentation, as well as our two-stage training strategy. We release the proposed dataset along with the associated code for public use.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑