arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.01549cs.CLcs.SE
收藏

章鱼:用于软件API函数调用的设备端语言模型

Octopus: On-device language model for function calling of software APIs

Stanford University(斯坦福大学);Harvard University(哈佛大学)

Wei Chen, Zhiyuan Li, Mingyuan Ma

AI总结:

研究利用设备端大语言模型调用软件API,通过编译数据集微调不同参数模型,提升其API交互能力,提出条件掩码技术和新基准,经微调的Octopus模型在API调用上性能超GPT-4,推动自动化软件开发和API集成。

摘要:

在快速发展的人工智能领域,大语言模型(LLMs)因其先进的文本处理和生成能力发挥着关键作用。本研究引入一种在调用软件API时利用设备端LLMs的新策略。精心编译源自软件API文档的数据集,对2B、3B和7B参数的LLMs进行微调,以提高其在软件API交互方面的能力,专注提升模型对API结构和语法的理解,增强API函数调用准确性。还提出条件掩码技术确保输出格式正确并降低错误率,同时保持推理速度。提出新基准评估LLMs在API交互中的有效性。经微调的Octopus模型在软件API调用方面性能优于GPT-4,推动了自动化软件开发和API集成。

英文摘要:

In the rapidly evolving domain of artificial intelligence, Large Language Models (LLMs) play a crucial role due to their advanced text processing and generation abilities. This study introduces a new strategy aimed at harnessing on-device LLMs in invoking software APIs. We meticulously compile a dataset derived from software API documentation and apply fine-tuning to LLMs with capacities of 2B, 3B and 7B parameters, specifically to enhance their proficiency in software API interactions. Our approach concentrates on refining the models' grasp of API structures and syntax, significantly enhancing the accuracy of API function calls. Additionally, we propose \textit{conditional masking} techniques to ensure outputs in the desired formats and reduce error rates while maintaining inference speeds. We also propose a novel benchmark designed to evaluate the effectiveness of LLMs in API interactions, establishing a foundation for subsequent research. Octopus, the fine-tuned model, is proved to have better performance than GPT-4 for the software APIs calling. This research aims to advance automated software development and API integration, representing substantial progress in aligning LLM capabilities with the demands of practical software engineering applications.

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

↑