MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoning

要約

最近リリースされた GPT-4 コード インタプリタは、難解な数学問題の解決において顕著な熟練度を示しています。これは主に、自然言語を使用してシームレスに推論し、コードを生成し、コードを実行し、実行出力に基づいて推論を継続する能力に起因します。
この論文では、オープンソース言語モデルを微調整して、数式のモデリングと導出にコードを使用できるようにし、その結果、数学的推論能力を強化する方法を紹介します。
私たちは、MathCodeInstruct と呼ばれる、数学の問題とそのコードベースの解決策を含む、新規で高品質のデータセットを生成する方法を提案します。
各ソリューションは、自然言語、コード、実行結果をインターリーブします。
また、カスタマイズされた教師あり微調整および推論アプローチも導入します。
このアプローチにより、難解な数学問題を解決するためのコードベースのソリューションを生成できるモデル ファミリである MathCoder モデルが生成されます。
印象的なことに、MathCoder モデルは、MATH (45.2%) および GSM8K (83.9%) データセット上のオープンソース LLM の中で最先端のスコアを達成し、他のオープンソースの代替モデルを大幅に上回っています。
特に、MathCoder モデルは、GSM8K および MATH 上で ChatGPT-3.5 および PaLM-2 を上回っているだけでなく、競合レベルの MATH データセット上でも GPT-4 を上回っています。
データセットとモデルは https://github.com/mathllm/MathCoder でリリースされます。

要約(オリジナル)

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.

arxiv情報

著者 Ke Wang,Houxing Ren,Aojun Zhou,Zimu Lu,Sichun Luo,Weikang Shi,Renrui Zhang,Linqi Song,Mingjie Zhan,Hongsheng Li
発行日 2023-10-05 17:52:09+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.CV, cs.LG パーマリンク