Papers
arxiv:2310.03731

MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoning

Published on Oct 5, 2023
· Featured in Daily Papers on Oct 6, 2023
Authors:
,
,
,
,
,

Abstract

The recently released GPT-4 Code Interpreter has demonstrated remarkable proficiency in solving challenging math problems, primarily attributed to its ability to seamlessly reason with natural language, generate code, execute code, and continue reasoning based on the execution output. In this paper, we present a method to fine-tune open-source language models, enabling them to use code for modeling and deriving math equations and, consequently, enhancing their mathematical reasoning abilities. We propose a method of generating novel and high-quality datasets with math problems and their code-based solutions, referred to as MathCodeInstruct. Each solution interleaves natural language, code, and execution results. We also introduce a customized supervised fine-tuning and inference approach. This approach yields the MathCoder models, a family of models capable of generating code-based solutions for solving challenging math problems. Impressively, the MathCoder models achieve state-of-the-art scores among open-source LLMs on the MATH (45.2%) and GSM8K (83.9%) datasets, substantially outperforming other open-source alternatives. Notably, the MathCoder model not only surpasses ChatGPT-3.5 and PaLM-2 on GSM8K and MATH but also outperforms GPT-4 on the competition-level MATH dataset. The dataset and models will be released at https://github.com/mathllm/MathCoder.

Community

This is being slept on. We have to draw the connection here and understand that an LLM possessing greater math capabilities is the equivalent of having greater logical reasoning skills overall (since math is logic at its core). Thus, if we can create LLMs proficient in math, then there's no reason not to believe we've created LLMs that are capable of advanced reasoning (not saying that the attainment of such ability=advanced reasoning; rather, this establishes there seems to be a latent capacity within these models to provide such).

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

Sign up or log in to comment

Models citing this paper 4

Datasets citing this paper 2

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2310.03731 in a Space README.md to link it from this page.

Collections including this paper 6