arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.20192cs.LGcs.IR
收藏

FunReason: 通过自精炼多尺度损失和自动化数据精炼增强大语言模型的功能调用

FunReason: Enhancing Large Language Models' Function Calling via Self-Refinement Multiscale Loss and Automated Data Refinement

AWorld Team, Inclusion AI(AWorld Team,Inclusion AI);City University of Hong Kong(香港城市大学);Southwest Jiaotong University(西南交通大学)

Bingguang Hao, ZengZhuang Xu, Maolin Wang, Yuntao Wen, Yicheng Chen, Cunyin Peng, Long Chen, Dong Wang, Xiangyu Zhao, Jinjie Gu, Chenyi Zhuang, Ji Zhang

AI总结:

FunReason通过自精炼多尺度损失和自动化数据精炼方法,提升大语言模型的功能调用能力,实现性能接近GPT-4o并缓解微调中的灾难性遗忘。

摘要:

将大语言模型(LLMs)与功能调用整合起来,已成为增强其在现实应用中实用性的关键能力。然而,有效结合推理过程与准确的功能执行仍是一个重大挑战。传统训练方法往往难以平衡详细的推理步骤与功能调用的精度,导致性能不佳。为了解决这些限制,我们引入了FunReason,一种新的框架,通过自动化数据精炼策略和自精炼多尺度损失(SRML)方法来增强LLMs的功能调用能力。FunReason利用LLMs的自然推理能力生成高质量的训练示例,重点关注查询解析性、推理连贯性和功能调用精度。SRML方法在训练过程中动态平衡推理过程和功能调用准确性,解决这两个关键方面之间的固有权衡。FunReason在性能上可与GPT-4o相媲美,同时有效缓解微调过程中的灾难性遗忘。FunReason通过引入平衡的训练方法和数据精炼流水线,为增强LLMs的功能调用能力提供了全面的解决方案。对于代码和数据集,请参考我们的GitHub仓库:https://github.com/BingguangHao/FunReason

英文摘要:

The integration of large language models (LLMs) with function calling has emerged as a crucial capability for enhancing their practical utility in real-world applications. However, effectively combining reasoning processes with accurate function execution remains a significant challenge. Traditional training approaches often struggle to balance the detailed reasoning steps with the precision of function calls, leading to suboptimal performance. To address these limitations, we introduce FunReason, a novel framework that enhances LLMs' function calling capabilities through an automated data refinement strategy and a Self-Refinement Multiscale Loss (SRML) approach. FunReason leverages LLMs' natural reasoning abilities to generate high-quality training examples, focusing on query parseability, reasoning coherence, and function call precision. The SRML approach dynamically balances the contribution of reasoning processes and function call accuracy during training, addressing the inherent trade-off between these two critical aspects. FunReason achieves performance comparable to GPT-4o while effectively mitigating catastrophic forgetting during fine-tuning. FunReason provides a comprehensive solution for enhancing LLMs' function calling capabilities by introducing a balanced training methodology and a data refinement pipeline. For code and dataset, please refer to our repository at GitHub https://github.com/BingguangHao/FunReason

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

↑