arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.02749cs.LG
收藏

子目标蒸馏:一种改进小型语言智能体的方法

Sub-goal Distillation: A Method to Improve Small Language Agents

Mila – Quebec AI Institute(米拉-魁北克人工智能研究所);Université de Montréal(蒙特利尔大学);UNC Chapel Hill(北卡罗来纳大学教堂山分校);Polytechnique Montréal(蒙特利尔理工学院);Microsoft Research(微软研究院)

Maryam Hashemzadeh, Elias Stengel-Eskin, Sarath Chandar, Marc-Alexandre Cote

AI总结:

本文提出子目标蒸馏方法,通过LLM标注子目标并微调规划与执行模块,将大模型能力迁移至770M小模型,在ScienceWorld上超越基本动作模仿学习16.7%,且推理时无需实时调用LLM。

摘要:

尽管大型语言模型(LLMs)在交互式任务中作为智能体已展现出显著潜力,但其高昂的计算需求和有限的调用次数制约了实际可用性,尤其是在长时程交互式任务(如决策)或涉及持续进行任务的场景中。为应对这些限制,我们提出了一种将拥有数十亿参数的LLM的性能迁移到一个小得多的语言模型(770M参数)上的方法。我们的方法包括构建一个分层智能体,该智能体由一个规划模块和一个执行模块组成,其中规划模块通过从LLM进行知识蒸馏来学习生成子目标,执行模块则学习使用基本动作来完成这些子目标。具体而言,我们利用LLM为一条通向完成目标的oracle路径标注一系列子目标。随后,我们利用这些标注数据对规划模块和执行模块进行微调。重要的是,在推理过程中,两个模块都不依赖对LLM的实时访问,从而将与LLM交互相关的总体成本大幅降低为固定成本。在ScienceWorld这一具有挑战性的多任务交互式文本环境中,我们的方法比仅基于基本动作的标准模仿学习在绝对指标上高出16.7%。我们的分析凸显了与其他基于LLM的方法相比,本方法的高效性。我们的代码和用于蒸馏的标注数据可在GitHub上获取。

英文摘要:

While Large Language Models (LLMs) have demonstrated significant promise as agents in interactive tasks, their substantial computational requirements and restricted number of calls constrain their practical utility, especially in long-horizon interactive tasks such as decision-making or in scenarios involving continuous ongoing tasks. To address these constraints, we propose a method for transferring the performance of an LLM with billions of parameters to a much smaller language model (770M parameters). Our approach involves constructing a hierarchical agent comprising a planning module, which learns through Knowledge Distillation from an LLM to generate sub-goals, and an execution module, which learns to accomplish these sub-goals using elementary actions. In detail, we leverage an LLM to annotate an oracle path with a sequence of sub-goals towards completing a goal. Subsequently, we utilize this annotated data to fine-tune both the planning and execution modules. Importantly, neither module relies on real-time access to an LLM during inference, significantly reducing the overall cost associated with LLM interactions to a fixed cost. In ScienceWorld, a challenging and multi-task interactive text environment, our method surpasses standard imitation learning based solely on elementary actions by 16.7% (absolute). Our analysis highlights the efficiency of our approach compared to other LLM-based methods. Our code and annotated data for distillation can be found on GitHub.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑