arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.13857cs.LGcs.AIcs.CLstat.ML
收藏

数值精度如何影响大语言模型的算术推理能力

How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs

State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University(通用人工智能国家重点实验室,智能科学与技术学院,北京大学);School of EECS, Peking University(电子工程系,北京大学);Huawei Noah’s Ark Lab(华为诺亚实验室);Center for Machine Learning Research, Peking University(机器学习研究中心,北京大学)

Guhao Feng, Kai Yang, Yuntian Gu, Xinyue Ai, Shengjie Luo, Jiacheng Sun, Di He, Zhenguo Li, Liwei Wang

AI总结:

本文通过理论分析和实验证明,数值精度是影响大语言模型算术推理能力的关键因素,低精度需超多项式规模才能解决算术任务,而标准精度可高效处理。

摘要:

尽管基于Transformer的大语言模型(LLMs)在各个领域取得了显著成功,但理解和增强其数学能力仍然是一个重大挑战。在本文中,我们对LLMs的数学能力进行了严格的理论分析,特别关注其算术性能。我们确定数值精度是影响其在算术任务中有效性的关键因素。我们的结果表明,以低数值精度运行的Transformer无法解决诸如迭代加法和整数乘法等算术任务,除非模型规模相对于输入长度以超多项式方式增长。相比之下,具有标准数值精度的Transformer能够以显著更小的模型规模高效处理这些任务。我们进一步通过实证实验支持我们的理论发现,这些实验探讨了不同数值精度对算术任务的影响,为提升LLMs的数学推理能力提供了宝贵的见解。

英文摘要:

Despite the remarkable success of Transformer-based large language models (LLMs) across various domains, understanding and enhancing their mathematical capabilities remains a significant challenge. In this paper, we conduct a rigorous theoretical analysis of LLMs' mathematical abilities, with a specific focus on their arithmetic performances. We identify numerical precision as a key factor that influences their effectiveness in arithmetical tasks. Our results show that Transformers operating with low numerical precision fail to address arithmetic tasks, such as iterated addition and integer multiplication, unless the model size grows super-polynomially with respect to the input length. In contrast, Transformers with standard numerical precision can efficiently handle these tasks with significantly smaller model sizes. We further support our theoretical findings through empirical experiments that explore the impact of varying numerical precision on arithmetic tasks, providing valuable insights for improving the mathematical reasoning capabilities of LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑