arXiv:2411.16313cs.AIcs.LG2024-11ICCV被引 17

让大模型学会权衡工具使用成本,生成更高效的任务计划。

CATP-LLM: Empowering Large Language Models for Cost-Aware Tool Planning

  • 设计多分支非顺序规划语言,支持并行执行降低开销。
  • 通过离线强化学习优化性能与成本的平衡,提升计划质量1.5%~93.9%。
  • 首个公开的成本感知规划数据集,覆盖11,100个多样化任务样本。

将大语言模型(LLMs)用于工具规划已成为构建通用AI系统的重要方向,即根据任务描述自动调度外部工具(如视觉模型)完成复杂任务。为推动该范式向实际应用迈进,关键在于让LLMs在规划中考虑工具执行成本(如耗时)。然而,现有研究忽视了成本因素,导致生成的计划代价过高,得不偿失。为此,本文提出首个面向成本感知工具规划的框架CATP-LLM,首次实现对LLM在成本意识下的系统性赋能。具体而言,为提升并发执行效率并降低开销,设计了一种新型工具规划语言,使LLM能够生成多分支非顺序计划;同时提出一种成本感知的离线强化学习算法,用于微调LLM以优化性能-成本权衡。由于缺乏公开的成本相关数据集,我们进一步构建了首个成本感知规划数据集OpenCATP,包含11,100个来自多样任务的评估样本。大量实验表明,即使使用Llama2-7B作为基座模型,CATP-LLM在计划质量上仍优于GPT-4,平均提升1.5%~93.9%。代码与数据集已开源:https://github.com/duowuyms/OpenCATP-LLM。

原文摘要 · Abstract (English)

Utilizing large language models (LLMs) for tool planning has emerged as a promising avenue for developing general AI systems, where LLMs automatically schedule external tools (e.g., vision models) to tackle complex tasks based on task descriptions. To push this paradigm toward practical applications, it is crucial for LLMs to consider tool execution costs (e.g., execution time) for tool planning. Unfortunately, prior studies overlook the tool execution costs, leading to the generation of expensive plans whose costs outweigh their benefits in terms of task performance. To fill this gap, we propose the Cost-Aware Tool Planning with LLMs (CATP-LLM) framework, which for the first time provides a coherent design to empower LLMs for cost-aware tool planning. Specifically, To facilitate efficient concurrent tool execution and cost reduction, we design a tool planning language to enhance the LLM for creating multi-branch non-sequential plans. Moreover, we propose a cost-aware offline reinforcement learning algorithm to fine-tune the LLM to optimize the performance-cost trade-off in tool planning. In the lack of public cost-related datasets, we further present OpenCATP, the first dataset for cost-aware planning, which comprises 11,100 evaluation samples from diverse tasks. Extensive experiments show that CATP-LLM outperforms GPT-4 even when using Llama2-7B as its backbone, with the average improvement of 1.5%-93.9% in terms of plan quality. Codes and dataset are available at: https://github.com/duowuyms/OpenCATP-LLM.

大模型工具规划成本优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。