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

Magnet:基于图翻译的多轮工具使用数据合成与蒸馏

Magnet: Multi-turn Tool-use Data Synthesis and Distillation via Graph Translation

Google(谷歌公司);University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Fan Yin, Zifeng Wang, I-Hung Hsu, Jun Yan, Ke Jiang, Yanfei Chen, Jindong Gu, Long T. Le, Kai-Wei Chang, Chen-Yu Lee, Hamid Palangi, Tomas Pfister

AI总结:

本文提出Magnet框架,通过图翻译自动合成多轮工具调用训练轨迹,并结合正负轨迹进行监督微调与偏好优化,使14B模型在函数调用能力上大幅超越教师模型。

摘要:

大型语言模型(LLMs)已展现出有效利用外部工具来回答用户查询的能力。然而,在涉及用户和多个工具的复杂多轮交互中,其性能可能受到限制。为解决这一问题,我们提出了Magnet,这是一个有原则的框架,用于合成高质量的训练轨迹,以增强大型语言模型智能体在与人类进行多轮对话时的函数调用能力。该框架基于从函数签名路径到查询序列和可执行函数调用序列的自动迭代翻译。我们用图来建模多轮场景中复杂的函数交互,并设计了新颖的节点操作来构建可靠的签名路径。受上下文蒸馏的启发,在使用教师模型引导正轨迹和负轨迹的生成时,我们在上下文中提供参考函数调用序列作为正向提示,并提供对比性的错误函数调用作为负向提示。实验表明,使用正轨迹进行监督微调并针对负轨迹进行偏好优化后,我们的14B模型Magnet-14B-mDPO在BFCL-v3上获得68.01分,在ToolQuery上获得73.30分,在函数调用方面大幅超越了教师模型Gemini-1.5-pro-002的性能。

英文摘要:

Large language models (LLMs) have exhibited the ability to effectively utilize external tools to address user queries. However, their performance may be limited in complex, multi-turn interactions involving users and multiple tools. To address this, we propose Magnet, a principled framework for synthesizing high-quality training trajectories to enhance the function calling capability of large language model agents in multi-turn conversations with humans. The framework is based on automatic and iterative translations from a function signature path to a sequence of queries and executable function calls. We model the complicated function interactions in multi-turn cases with graph and design novel node operations to build reliable signature paths. Motivated by context distillation, when guiding the generation of positive and negative trajectories using a teacher model, we provide reference function call sequences as positive hints in context and contrastive, incorrect function calls as negative hints. Experiments show that training with the positive trajectories with supervised fine-tuning and preference optimization against negative trajectories, our 14B model, Magnet-14B-mDPO, obtains 68.01 on BFCL-v3 and 73.30 on ToolQuery, surpassing the performance of the teacher model Gemini-1.5-pro-002 by a large margin in function calling.

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

↑