An LLM Compiler for Parallel Function Calling

要約

大規模言語モデル (LLM) は、さまざまな複雑な推論ベンチマークで顕著な結果を示しています。
LLM の推論機能により、ユーザー提供の関数を使用して関数呼び出しを実行し、知識の限界、算術スキルの低さ、プライベート データへのアクセスの欠如などの固有の制限を克服できます。
この開発により、LLM の範囲は多機能呼び出しを含むように拡張され、LLM にはさまざまな機能が装備され、コンテキストに基づいて適切な機能が選択されます。
LLM の多機能呼び出し機能により、LLM ベースのソフトウェア開発が促進され、より複雑な問題に取り組むことが可能になりました。
ただし、現在の多機能呼び出し方法では、各機能に対して逐次的な推論と動作が必要になることが多く、その結果、待ち時間が長くなり、コストがかかり、場合によっては不正確な動作が発生する可能性があります。
これに対処するために、関数を並列実行して多関数呼び出しを効率的に調整する LLMCompiler を導入します。
従来のコンパイラの原理を基にした LLMCompiler は、次の 3 つのコンポーネントを使用して並列関数呼び出しを合理化します。(i) LLM プランナー。実行戦略と依存関係を定式化します。
(ii) タスクフェッチングユニット、タスクを呼び出す関数をディスパッチする。
(iii) これらのタスクを並行して実行するエグゼキュータ。
LLMCompiler は、関数呼び出しに最適化されたオーケストレーションを自動的に計算し、LLaMA-2 などのオープンソース モデルで使用できます。
私たちは、関数呼び出し間に重要な相互依存関係があるケースや、中間結果に基づいた動的な再計画が必要なケースなど、さまざまなタスクで LLMCompiler のベンチマークを実行しました。
ReAct と比較して、一貫して最大 3.7 倍のレイテンシーの高速化、最大 6.7 倍のコスト削減、最大 ~9% の精度の向上が観察されています。
さらに、LLMCompiler は、OpenAI の最近の並列関数呼び出しと比較して、同様の精度を達成しながら、最大 1.35 倍の遅延ゲインを実現します。

要約(オリジナル)

Large Language Models (LLMs) have shown remarkable results on various complex reasoning benchmarks. The reasoning capabilities of LLMs enable them to execute function calls, using user-provided functions to overcome their inherent limitations, such as knowledge cutoffs, poor arithmetic skills, or lack of access to private data. This development has expanded LLMs’ scope to include multi-function calling, where LLMs are equipped with a variety of functions and select the proper functions based on the context. Multi-function calling abilities of LLMs have catalyzed LLM-based software development, allowing them to tackle more complex problems. However, current methods for multi-function calling often require sequential reasoning and acting for each function which can result in high latency, cost, and sometimes inaccurate behavior. To address this, we introduce LLMCompiler, which executes functions in parallel to efficiently orchestrate multi-function calling. Drawing from the principles of classical compilers, LLMCompiler streamlines parallel function calling with three components: (i) an LLM Planner, formulating execution strategies and dependencies; (ii) a Task Fetching Unit, dispatching function calling tasks; and (iii) an Executor, executing these tasks in parallel. LLMCompiler automatically computes an optimized orchestration for the function calls and can be used with open-source models such as LLaMA-2. We have benchmarked LLMCompiler on a range of tasks including cases with non-trivial inter-dependency between function calls, as well as cases that require dynamic replanning based on intermediate results. We observe consistent latency speedup of up to 3.7x, cost savings of up to 6.7x, and accuracy improvement of up to ~9% as compared to ReAct. Additionally, LLMCompiler achieves up to 1.35x latency gain over OpenAI’s recent parallel function calling, while achieving similar accuracy.

arxiv情報

著者 Sehoon Kim,Suhong Moon,Ryan Tabrizi,Nicholas Lee,Michael W. Mahoney,Kurt Keutzer,Amir Gholami
発行日 2023-12-07 18:32:04+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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