arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.03822cs.AIcs.CLcs.LG
收藏

RevOrder:一种增强语言模型算术能力的新方法

RevOrder: A Novel Method for Enhanced Arithmetic in Language Models

Henan University(河南大学);Jiangsu Police Institute(江苏警官学院)

Si Shen, Peijun Shen, Danhao Zhu

AI总结:

本文提出 RevOrder 方法,通过反转算术输出数字将顺序中间数字计数降至 O(1),显著提升大语言模型在加减乘除及 GSM8K 数学任务中的表现,使 LLaMA2-7B 计算错误减少 46%。

摘要:

本文提出 RevOrder,这是一种旨在通过反转加法、减法和 n 位数乘 1 位数(nD by 1D)乘法任务中的输出数字来改进大型语言模型(LLMs)算术运算的新技术。我们的方法将顺序中间数字计数(CSID)显著降低到 $\mathcal{O}(1)$,CSID 是我们引入的用于评估方程复杂性的新指标。通过全面测试,RevOrder 不仅在基本算术运算中实现了完美准确率,还大幅提升了 LLM 在除法任务中的表现,尤其是在传统模型难以处理的大数除法中。RevOrder 的实现对训练和推理阶段都具有成本效益。此外,将 RevOrder 应用于在 GSM8K 数学任务上微调 LLaMA2-7B 模型,带来了显著改进,使方程计算错误减少了 46%,并将总分从 41.6 提高到 44.4。

英文摘要:

This paper presents RevOrder, a novel technique aimed at improving arithmetic operations in large language models (LLMs) by reversing the output digits in addition, subtraction, and n-digit by 1-digit (nD by 1D) multiplication tasks. Our method significantly reduces the Count of Sequential Intermediate Digits (CSID) to $\mathcal{O}(1)$, a new metric we introduce to assess equation complexity. Through comprehensive testing, RevOrder not only achieves perfect accuracy in basic arithmetic operations but also substantially boosts LLM performance in division tasks, particularly with large numbers where traditional models struggle. Implementation of RevOrder is cost-effective for both training and inference phases. Moreover, applying RevOrder to fine-tune the LLaMA2-7B model on the GSM8K math task results in a considerable improvement, reducing equation calculation errors by 46% and increasing overall scores from 41.6 to 44.4.

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

↑