Don’t Fine-Tune, Decode: Syntax Error-Free Tool Use via Constrained Decoding

要約

命令調整された大規模言語モデル (LLM) は多くのタスクに優れていますが、複雑で不慣れな構文制約により外部ツールを使用できないことがよくあります。
大規模な微調整とプロンプトを行うことで問題を軽減できますが、これらのアプローチは費用がかかり、一般化するのが困難です。
さらに、構文制約は微調整中に暗黙的にのみ学習されるため、モデルでは依然として構文エラーが頻繁に発生します。
これらの制約は、制約付きデコードによって明示的により適切に満たせるという事実に動機付けられ、有限状態マシンを使用して LLM をツール構文に強制的に従わせるデコード アルゴリズムである TOOLDEC を提案します。
私たちの実験では、TOOLDEC がすべての構文エラーを排除し、さまざまな基本モデルやベンチマークで大幅に優れたパフォーマンスを達成することが示されています。
さらに驚くべきことに、Mistral-Instruct などの汎用的なすぐに使用できる LLM に適用すると、TOOLDEC はツール使用の精度を初期の 0% から 52% まで向上させ、次のような特殊な微調整モデルのパフォーマンスに匹敵します。
ツールLLM。

要約(オリジナル)

Instruction-tuned large language models (LLMs) excel at many tasks but often fail to use external tools due to complicated and unfamiliar syntax constraints. While extensive fine-tuning and prompting can mitigate the issue, these approaches are expensive and hard to generalize. Furthermore, because syntax constraints are only learned implicitly during fine-tuning, models still make frequent syntax errors. Motivated by the fact that these constraints can be better satisfied explicitly with constrained decoding, we propose TOOLDEC, a decoding algorithm using finite state machines to force LLMs to follow tool syntax. Our experiments show that TOOLDEC eliminates all syntax errors, achieving significantly better performance on various base models and benchmarks. More surprisingly, when applied to generalist out-of-the-box LLMs such as Mistral-Instruct, TOOLDEC improves its accuracy in tool use from the initial 0% to an impressive 52%, matching the performance of specialized fine-tuned models such as ToolLLM.

arxiv情報

著者 Kexun Zhang,Hongqiao Chen,Lei Li,William Wang
発行日 2024-06-04 15:50:22+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク