Papers
arxiv:2310.03731

MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoning

Published on Oct 5, 2023
ยท Submitted by akhaliq on Oct 6, 2023
#3 Paper of the day
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

Code Meets Math: Unlocking the Genius of Open-Source LLMs with MathCoder

Links ๐Ÿ”—:

๐Ÿ‘‰ Subscribe: https://www.youtube.com/@Arxflix
๐Ÿ‘‰ Twitter: https://x.com/arxflix
๐Ÿ‘‰ LMNT (Partner): https://lmnt.com/

By Arxflix
9t4iCUHx_400x400-1.jpg

Sign up or log in to comment

Models citing this paper 7

Browse 7 models citing this paper

Datasets citing this paper 2

Spaces citing this paper 6

Collections including this paper 7