Skip to main content
QUICK REVIEW

[论文解读] Goat: Fine-tuned LLaMA Outperforms GPT-4 on Arithmetic Tasks

Tianyi Liu, Bryan Kian Hsiang Low|arXiv (Cornell University)|May 23, 2023
Advanced Data Storage TechnologiesComputer Science被引用 17
一句话总结

Goat-7B,是一个经过微调的 LLaMA 模型,在初等算术任务上达到最先进的性能,在零-shot 下,在若干 BIG-bench 算术子任务中通过使用监督微调和对复杂运算的可学习任务分解策略,达到或超越 GPT-4。

ABSTRACT

We introduce Goat, a fine-tuned LLaMA model that significantly outperforms GPT-4 on a range of arithmetic tasks. Fine-tuned on a synthetically generated dataset, Goat achieves state-of-the-art performance on BIG-bench arithmetic sub-task. In particular, the zero-shot Goat-7B matches or even surpasses the accuracy achieved by the few-shot PaLM-540B. Surprisingly, Goat can achieve near-perfect accuracy on large-number addition and subtraction through supervised fine-tuning only, which is almost impossible with previous pretrained language models, such as Bloom, OPT, GPT-NeoX, etc. We attribute Goat's exceptional performance to LLaMA's consistent tokenization of numbers. To tackle more challenging tasks like large-number multiplication and division, we propose an approach that classifies tasks based on their learnability, and subsequently decomposes unlearnable tasks, such as multi-digit multiplication and division, into a series of learnable tasks by leveraging basic arithmetic principles. We thoroughly examine the performance of our model, offering a comprehensive evaluation of the effectiveness of our proposed decomposition steps. Additionally, Goat-7B can be easily trained using LoRA on a 24GB VRAM GPU, facilitating reproducibility for other researchers. We release our model, dataset, and the Python script for dataset generation.

研究动机与目标

  • 激励开发一个开源的具备算术能力的 LLM,使其在基本算术任务上优于封闭模型。
  • 展示在一个合成数据集上的监督微调可以在大数字的加法/减法中获得近乎完美的准确性,无需特殊提示技巧。
  • 研究算术任务的可学习性,并引入基于分解的 Chain-of-Thought(CoT)策略来处理多位数的乘法和除法。
  • 评估分词的作用,特别是 LLaMA 中一致的逐数字分词在算术性能中的作用。
  • 提供一个可通过 LoRA 在中等硬件上复制的实验可重复管线(数据集、模型和数据集生成器)。

提出的方法

  • 在约 100 万个用于算术任务的合成问答对上对 LLaMA-7B 进行端到端的监督指令微调。
  • 利用 LLaMA 的逐数字分词实现加法/减法的直接数值输出,无需链式思考提示。
  • 将算术任务分为可学习和不可学习;通过类似 CoT 的中间监督将不可学习的任务(多位数乘法/除法)分解为一系列可学习的子任务。
  • 开发一个针对乘法的五步分解(提取、拆分、展开、积、逐项相加)以实现解-求和式的计算。
  • 为除法设计一个慢速的 CoT,其通过逐位减法使用中间任务(n-digit 乘以 1-digit、复制、减法等)迭代构建商。
  • 在 24 GB VRAM 上使用 LoRA 进行训练,以实现常见 GPU 的可复制性;公开模型、数据集和数据集生成脚本。

实验结果

研究问题

  • RQ1在合成算术数据上的监督微调是否能够让开源 LLM 在算术任务上优于封闭模型?
  • RQ2相比其他开源模型,LLaMA 一致的逐数字分词在算术准确性方面的贡献有多大?
  • RQ3如何通过中间监督和任务分解使不可学习的算术任务(如多位数乘法/除法)变得可学习?
  • RQ4CoT 风格的中间监督是否改善复杂算术任务的最终数值输出?与直接产生相比如何?
  • RQ5当遇到超出训练分布的数字时,经过微调的算术模型的外推能力有何极限?

主要发现

  • Goat-7B 在 BIG-bench 算术子任务上的初等算术任务(加法、减法、乘法、除法)取得了最先进的性能。
  • 在零-shot 下,Goat-7B 在 BIG-bench 算术任务中的准确性与少-shot PaLM-540B 相匹配或超越。
  • 对于大数字的加法和减法,仅通过监督微调就能达到近乎完美的准确性,无需链式思考提示。
  • 多位数乘法和除法在没有分解的情况下不可学习;应用五步 CoT 分解可使这些任务变得可学习。
  • Goat-7B 使用 LoRA 在 24GB GPU 上训练,易于复现;作者发布模型、数据集和数据集生成脚本。
  • 基于分解的 CoT 方法在目标任务上优于 GPT-4 的长乘法/长除法方法,并凸显了中间监督的重要性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。