普通7B语言模型已具备强大的数学能力
Common 7B Language Models Already Possess Strong Math Capabilities
AI总结:
该研究发现普通预训练的LLaMA-2 7B模型具备强大数学潜力,通过扩大SFT数据规模、采用合成数据解决数据稀缺问题,显著提升了模型数学答题的准确率与可靠性,超越了此前同规模模型的表现。
摘要:
此前人们认为,普通语言模型的数学能力只有在规模极大时才会涌现,或者需要大量与数学相关的预训练。本文表明,经过普通预训练的LLaMA-2 7B模型已展现出强大的数学能力——从256次随机生成结果中选取最优回答时,它在GSM8K和MATH基准上分别取得了97.7%和72.0%的优异准确率,这一点可作为佐证。当前基础模型的主要问题在于难以稳定地激发其内在的数学能力。值得注意的是,其首次回答在GSM8K和MATH基准上的准确率分别降至49.5%和7.9%。我们发现,仅扩大SFT(监督微调)数据规模就能显著提升生成正确答案的可靠性。然而,公开可用的数学题目数量有限,制约了大规模数据扩充的潜力。为克服这一限制,我们采用了合成数据,其效果几乎与真实数据相当,且在规模扩大至约100万样本时仍未出现明显的饱和现象。这种简单直接的方法使LLaMA-2 7B模型在GSM8K上达到82.6%的准确率,在MATH上达到40.6%的准确率,分别比此前的模型高出14.2%和20.8%。我们还针对不同推理复杂度和错误类型下的规模扩展规律提供了见解。
英文摘要:
Mathematical capabilities were previously believed to emerge in common language models only at a very large scale or require extensive math-related pre-training. This paper shows that the LLaMA-2 7B model with common pre-training already exhibits strong mathematical abilities, as evidenced by its impressive accuracy of 97.7% and 72.0% on the GSM8K and MATH benchmarks, respectively, when selecting the best response from 256 random generations. The primary issue with the current base model is the difficulty in consistently eliciting its inherent mathematical capabilities. Notably, the accuracy for the first answer drops to 49.5% and 7.9% on the GSM8K and MATH benchmarks, respectively. We find that simply scaling up the SFT data can significantly enhance the reliability of generating correct answers. However, the potential for extensive scaling is constrained by the scarcity of publicly available math questions. To overcome this limitation, we employ synthetic data, which proves to be nearly as effective as real data and shows no clear saturation when scaled up to approximately one million samples. This straightforward approach achieves an accuracy of 82.6% on GSM8K and 40.6% on MATH using LLaMA-2 7B models, surpassing previous models by 14.2% and 20.8%, respectively. We also provide insights into scaling behaviors across different reasoning complexities and error types.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。