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

AI-generated keywords: Artificial Intelligence

AI-generated Key Points

  • Large Language Models (LLMs) are essential in artificial intelligence for their advanced text processing and generation capabilities.
  • A novel strategy is introduced to leverage on-device LLMs for invoking software APIs, addressing challenges in real-time updates and task execution.
  • Fine-tuning LLMs with 2B, 3B, and 7B parameters enhances their proficiency in software API interactions by refining understanding of API structures and syntax.
  • Conditional masking techniques ensure outputs in desired formats, reduce error rates, and maintain inference speeds during API function calls.
  • Octopus, a fine-tuned model, outperforms GPT-4 for software APIs calling, demonstrating superior performance.
  • The integration of LLMs with external APIs advances automated software development and API integration by balancing large-scale model dependency against efficiency and cost considerations.
  • Task-oriented LLMs are developed to preserve essential functionality while minimizing operational costs through curriculum learning strategies on an expansive dataset of over 30,000 widely-utilized APIs from Rapid API Hub.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Wei Chen, Zhiyuan Li, Mingyuan Ma

License: CC BY-NC-SA 4.0

Abstract: 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.

Submitted to arXiv on 02 Apr. 2024

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2404.01549v1

, , , , In the rapidly evolving field of artificial intelligence, Large Language Models (LLMs) have become essential due to their advanced text processing and generation capabilities. This study introduces a novel strategy aimed at leveraging on-device LLMs for invoking software APIs, addressing the challenges faced by LLMs in assimilating real-time updates and executing specific tasks. By compiling a dataset derived from software API documentation and applying fine-tuning to LLMs with capacities of 2B, 3B, and 7B parameters, the models' proficiency in software API interactions is significantly enhanced. The approach focuses on refining the models' understanding of API structures and syntax to improve the accuracy of API function calls. Additionally, conditional masking techniques are proposed to ensure outputs in desired formats and reduce error rates while maintaining inference speeds. A new benchmark is introduced to evaluate the effectiveness of LLMs in API interactions, with Octopus, the fine-tuned model, demonstrating superior performance compared to GPT-4 for software APIs calling. The integration of LLMs with external APIs represents a pivotal advancement in automated software development and API integration. By balancing large-scale model dependency against efficiency and cost considerations, smaller task-oriented LLMs are developed to preserve essential functionality while minimizing operational costs. The framework proposed in this study leverages curriculum learning strategies on an expansive dataset of over 30,000 widely-utilized APIs from Rapid API Hub. By selecting appropriate base models such as Codellama7b, Google's Gemma 7B & 2B, and Stable Code 3B, the effectiveness of the approach is underscored through outperforming GPT-4 benchmarks. Conditional masking techniques during inference ensure consistent output formatting, improving accuracy without sacrificing speed. This research contributes significantly towards enhancing automated software development processes and advancing the integration of LLM capabilities with practical software engineering applications.
Created on 11 Sep. 2024

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.