Executing Arithmetic: Fine-Tuning Large Language Models as Turing Machines

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lai, Junyu, Xu, Jiahe, Yang, Yao, Huang, Yunpeng, Cao, Chun, Xu, Jingwei
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910643994492928
author Lai, Junyu
Xu, Jiahe
Yang, Yao
Huang, Yunpeng
Cao, Chun
Xu, Jingwei
author_facet Lai, Junyu
Xu, Jiahe
Yang, Yao
Huang, Yunpeng
Cao, Chun
Xu, Jingwei
contents Large Language Models (LLMs) have demonstrated remarkable capabilities across a wide range of natural language processing and reasoning tasks. However, their performance in the foundational domain of arithmetic remains unsatisfactory. When dealing with arithmetic tasks, LLMs often memorize specific examples rather than learning the underlying computational logic, limiting their ability to generalize to new problems. In this paper, we propose a Composable Arithmetic Execution Framework (CAEF) that enables LLMs to learn to execute step-by-step computations by emulating Turing Machines, thereby gaining a genuine understanding of computational logic. Moreover, the proposed framework is highly scalable, allowing composing learned operators to significantly reduce the difficulty of learning complex operators. In our evaluation, CAEF achieves nearly 100% accuracy across seven common mathematical operations on the LLaMA 3.1-8B model, effectively supporting computations involving operands with up to 100 digits, a level where GPT-4o falls short noticeably in some settings.
format Preprint
id arxiv_https___arxiv_org_abs_2410_07896
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Executing Arithmetic: Fine-Tuning Large Language Models as Turing Machines
Lai, Junyu
Xu, Jiahe
Yang, Yao
Huang, Yunpeng
Cao, Chun
Xu, Jingwei
Artificial Intelligence
I.2.7
Large Language Models (LLMs) have demonstrated remarkable capabilities across a wide range of natural language processing and reasoning tasks. However, their performance in the foundational domain of arithmetic remains unsatisfactory. When dealing with arithmetic tasks, LLMs often memorize specific examples rather than learning the underlying computational logic, limiting their ability to generalize to new problems. In this paper, we propose a Composable Arithmetic Execution Framework (CAEF) that enables LLMs to learn to execute step-by-step computations by emulating Turing Machines, thereby gaining a genuine understanding of computational logic. Moreover, the proposed framework is highly scalable, allowing composing learned operators to significantly reduce the difficulty of learning complex operators. In our evaluation, CAEF achieves nearly 100% accuracy across seven common mathematical operations on the LLaMA 3.1-8B model, effectively supporting computations involving operands with up to 100 digits, a level where GPT-4o falls short noticeably in some settings.
title Executing Arithmetic: Fine-Tuning Large Language Models as Turing Machines
topic Artificial Intelligence
I.2.7
url https://arxiv.org/abs/2410.07896