Skip to main content
QUICK REVIEW

[论文解读] Small LLMs Are Weak Tool Learners: A Multi-LLM Agent

Weizhou Shen, Chenliang Li|arXiv (Cornell University)|Jan 14, 2024
Digital Rights Management and SecurityComputer Science被引用 3
一句话总结

本文提出 α-UMi,一种多大语言模型代理框架,将工具学习分解为三种专门角色——规划者、调用者和总结者,每种角色均由独立的小型大语言模型实现。采用全局到局部的渐进式微调策略,α-UMi 在工具使用基准测试中表现优异,即使使用更小的模型,其性能也优于单一大语言模型代理,并展现出更低的训练和推理成本。

ABSTRACT

Large Language Model (LLM) agents significantly extend the capabilities of standalone LLMs, empowering them to interact with external tools (e.g., APIs, functions) and complete various tasks in a self-directed fashion. The challenge of tool use demands that LLMs not only understand user queries and generate answers accurately but also excel in task planning, tool invocation, and result summarization. While traditional works focus on training a single LLM with all these capabilities, performance limitations become apparent, particularly with smaller models. To overcome these challenges, we propose a novel approach that decomposes the aforementioned capabilities into a planner, caller, and summarizer. Each component is implemented by a single LLM that focuses on a specific capability and collaborates with others to accomplish the task. This modular framework facilitates individual updates and the potential use of smaller LLMs for building each capability. To effectively train this framework, we introduce a two-stage training paradigm. First, we fine-tune a backbone LLM on the entire dataset without discriminating sub-tasks, providing the model with a comprehensive understanding of the task. Second, the fine-tuned LLM is used to instantiate the planner, caller, and summarizer respectively, which are continually fine-tuned on respective sub-tasks. Evaluation across various tool-use benchmarks illustrates that our proposed multi-LLM framework surpasses the traditional single-LLM approach, highlighting its efficacy and advantages in tool learning.

研究动机与目标

  • 解决小型大语言模型在工具学习中的性能局限,其中单个模型在规划、工具调用和结果总结方面表现吃力。
  • 克服在工具演进或需要更新时,微调大型大语言模型所导致的僵化性和高成本问题。
  • 通过将工具学习解耦为专门化组件,实现模块化、可维护且成本效益高的代理系统。
  • 证明通过任务分解和角色特异性训练,小型大语言模型可在工具学习性能上超越更大的单一大语言模型。

提出的方法

  • 将工具学习分解为三个独立角色:规划者(任务推理与路由)、调用者(工具调用)和总结者(最终答案生成)。
  • 为每个角色分别使用一个小型大语言模型,实现专业化并支持独立更新。
  • 引入两阶段全局到局部渐进式微调(GLPFT)策略:首先在完整数据集上预训练主干大语言模型,然后在各自子任务上微调每个组件。
  • 采用 LLaMA-2 作为主干模型,并为规划者、调用者和总结者分别实例化三份副本,每份均在特定任务的数据子集上进行微调。
  • 采用协作式推理流水线,规划者根据中间输出和执行状态指导调用者与总结者。
  • 在针对每个组件角色量身定制的重新组织数据集上应用持续微调,以提升专业化程度和性能。
Figure 1: A conceptual comparison of the traditional single-LLM agent framework (top) and the proposed multi-LLM agent framework, $\alpha$ -UMi (bottom).
Figure 1: A conceptual comparison of the traditional single-LLM agent framework (top) and the proposed multi-LLM agent framework, $\alpha$ -UMi (bottom).

实验结果

研究问题

  • RQ1当小型大语言模型的能力被分解为专门角色时,是否能在工具学习性能上表现更优?
  • RQ2具有角色特异性训练的多大语言模型代理框架是否在工具使用基准测试中优于单一大语言模型代理?
  • RQ3全局到局部的微调策略是否能有效训练模块化组件而不导致性能下降?
  • RQ4与训练更大的单一大语言模型相比,多大语言模型方法在实现相当的工具学习性能时是否更具成本效益?
  • RQ5模块化设计在处理工具故障或复杂多步任务时,是否能提升系统的鲁棒性?

主要发现

  • 使用 7B LLaMA-2 主干的 α-UMi 在多个工具使用基准测试中表现优于使用 13B 主干的单一大语言模型代理,证明了在合理分解下,更小的模型可超越更大的模型。
  • 多大语言模型框架在复杂多步任务中取得了更高的成功率,而单一大语言模型基线常因规划错位或陷入无限循环而失败。
  • α-UMi 的推理延迟与单一大语言模型基线相当,7B 模型的中位推理时间为 11.09 秒,表明执行效率高。
  • 使用 7B 模型的 α-UMi 训练成本低于单个 13B 模型,无论在 FLOPs 还是训练时间方面,均证实了其成本效益。
  • α-UMi 中的规划者成功检测并从失败的 API 调用(如损坏的 YouTube 搜索 API)中恢复,展示了在动态工具环境中的鲁棒性。
  • 消融研究证实,全局到局部微调策略显著提升了性能,尤其是在推理和工具选择准确率方面。
Figure 2: An illustration of how $\alpha$ -UMi works to complete a task.
Figure 2: An illustration of how $\alpha$ -UMi works to complete a task.

阅读本论文

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

在 Nubint 中阅读本论文

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