🚀 MathGenie:通過問題回譯生成合成數據以增強大語言模型的數學推理能力
MathGenie是一個用於論文 "MathGenie: Generating Synthetic Data with Question Back-translation for Enhancing Mathematical Reasoning of LLMs" 的模型。該模型旨在通過問題回譯生成合成數據,從而增強大語言模型(LLMs)的數學推理能力。
📢 最新消息
✨ 主要特性
大語言模型(LLMs)在數學推理方面展現出了巨大的潛力。然而,現有的開源模型在這一領域的表現與GPT - 4等閉源模型之間仍存在差距。
在本文中,我們引入了 MathGenie,這是一種從小規模問題 - 解決方案數據集(稱為 種子數據)中生成多樣化且可靠數學問題的新方法。我們對種子數據的真實解決方案進行增強,並訓練一個回譯模型,將增強後的解決方案回譯為新的問題。隨後,我們為這些新問題生成集成代碼的解決方案。為確保集成代碼解決方案的正確性,我們採用基於推理的策略進行解決方案驗證。
我們在新整理的數據上訓練了從7B到70B的各種預訓練模型,以測試所提出的增強技術的有效性,得到了一系列名為 MathGenieLM 的模型。這些模型在五個具有代表性的數學推理數據集上始終優於以往的開源模型,達到了當前的最優性能。特別是,MathGenieLM - InternLM2在GSM8K上的準確率達到了87.7%,在MATH上達到了55.7%,在開源語言模型中獲得了最佳的整體得分。
更多詳細信息可參考 項目主頁 和 論文。
💻 使用示例
模型
我們的 MathGenie - InterLM - 20B 模型和 MathGenie - Mixtral - 8x7B 模型現已在Huggingface上可用。
推理與評估
模板
{% for message in messages %}
{% if message['role'] == 'user' %}
{{ '<|user|>' }}{% elif message['role'] == 'system' %}
{{ '<|system|>' }}{% elif message['role'] == 'assistant' %}
{{ '<|assistant|>' }}{% endif %}
{% for block in message['content'] %}
{% if block['type'] == 'text' %}
{{ '<|text|>' }}{% elif block['type'] == 'code' %}
{{ '<|code|>' }}{% elif block['type'] == 'execution' %}
{{ '<|execution|>' }}{% endif %}
{{ block['content'] + '<|endofblock|>' }}{% endfor %}
{{ '<|endofmessage|>' }}{% endfor %}
有關我們的MathGenieLM模型推理和評估的詳細代碼,請參考 MathCoder倉庫。
📖 引用
如果您發現本文對您的研究有幫助,請引用以下BibTex:
@misc{lu2024mathgenie,
title={MathGenie: Generating Synthetic Data with Question Back-translation for Enhancing Mathematical Reasoning of LLMs},
author={Zimu Lu and Aojun Zhou and Houxing Ren and Ke Wang and Weikang Shi and Junting Pan and Mingjie Zhan and Hongsheng Li},
year={2024},
eprint={2402.16352},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@inproceedings{
wang2024mathcoder,
title={MathCoder: Seamless Code Integration in {LLM}s for Enhanced Mathematical Reasoning},
author={Ke Wang and Houxing Ren and Aojun Zhou and Zimu Lu and Sichun Luo and Weikang Shi and Renrui Zhang and Linqi Song and Mingjie Zhan and Hongsheng Li},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=z8TW0ttBPp}
}
📄 許可證
本項目採用Apache - 2.0許可證。