Goat:微調整されたLLaMAが算術タスクでGPT-4を上回る
Goat: Fine-tuned LLaMA Outperforms GPT-4 on Arithmetic Tasks
May 23, 2023
著者: Tiedong Liu, Bryan Kian Hsiang Low
cs.AI
要旨
我々は、LLaMAモデルをファインチューニングしたGoatを紹介する。このモデルは、様々な算術タスクにおいてGPT-4を大幅に上回る性能を発揮する。合成生成されたデータセットでファインチューニングされたGoatは、BIG-bench算術サブタスクにおいて最先端の性能を達成した。特に、ゼロショットのGoat-7Bは、Few-shotのPaLM-540Bが達成した精度に匹敵し、それを上回ることもある。驚くべきことに、Goatは大規模な数の加算と減算において、教師ありファインチューニングのみでほぼ完璧な精度を達成することができ、これはBloom、OPT、GPT-NeoXなどの従来の事前学習済み言語モデルではほぼ不可能であった。我々は、Goatの卓越した性能を、LLaMAの数値に対する一貫したトークン化に起因すると考えている。大規模な数の乗算や除算といったより困難なタスクに対処するために、我々はタスクをその学習可能性に基づいて分類し、その後、多桁の乗算や除算といった学習不可能なタスクを、基本的な算術原理を活用して一連の学習可能なタスクに分解するアプローチを提案する。我々は、提案した分解ステップの有効性を包括的に評価し、モデルの性能を徹底的に検証する。さらに、Goat-7Bは、24GBのVRAM GPU上でLoRAを使用して簡単にトレーニングすることができ、他の研究者による再現性を容易にする。我々は、モデル、データセット、およびデータセット生成用のPythonスクリプトを公開する。
English
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.