Octopus: On-device language model for function calling of software APIs
On the map: LLM agents and tool use → Tool learning and function calling
Abstract (arXiv)
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 textitconditional 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.
Key facts. Cited by 26 papers in the map (data through 7 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 36 of its 69 references that are in the map. First posted on arXiv 2 Apr 2024.
Builds on
36 of 69 references.
Closest ancestors · 5
Same direction, newest first
- 2024AnyTool: Self-Reflective, Hierarchical Agents for Large-Scale API Calls6 Feb
- 2023ToolQA: A Dataset for LLM Question Answering with External Tools23 Jun
- 2023ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases8 Jun
- 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs14 Apr
- 2023Toolformer: Language Models Can Teach Themselves to Use Tools9 Feb
Other references · 31
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,359
- 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,173
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
- 2023Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Modelscited by 695
19 more
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
- 2023LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Modelscited by 317
- 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 186
- 2023Guiding Instruction-based Image Editing via Multimodal Large Language Modelscited by 182
- 2023LLM Lies: Hallucinations are not Bugs, but Features as Adversarial Examplescited by 177
- 2023Progressive-Hint Prompting Improves Reasoning in Large Language Modelscited by 147
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2023Solving Math Word Problems by Combining Language Models With Symbolic Solverscited by 124
- 2023LawBench: Benchmarking Legal Knowledge of Large Language Modelscited by 111
- 2024Data-efficient Fine-tuning for LLM-based Recommendationcited by 103
- 2024Small LLMs Are Weak Tool Learners: A Multi-LLM Agentcited by 92
- 2024Let's Learn Step by Step: Enhancing In-Context Learning Ability with Curriculum Learningcited by 47
- 2024On the Prospects of Incorporating Large Language Models (LLMs) in Automated Planning and Scheduling (APS)cited by 40
- 2023TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systemscited by 39
- 2023ToolCoder: Teach Code Generation Models to use API search toolscited by 37
- 2023The ART of LLM Refinement: Ask, Refine, and Trustcited by 29
- 2023Guiding Language Models of Code with Global Context using Monitorscited by 20
- 2023LLM As DBAcited by 18
Built on by
Citing papers per year: 2024: 14; 2025: 10; 2026: 2.
26 papers.
Sort:
By area:
- 2025UI-TARS: Pioneering Automated GUI Interaction with Native Agentscited by 584
- 2024Large Language Model-Brained GUI Agents: A Surveycited by 160
- 2024On-Device Language Models: A Comprehensive Reviewcited by 101
- 2024TinyAgent: Function Calling at the Edgecited by 55
- 2024Hammer: Robust Function-Calling for On-Device Language Models via Function Maskingcited by 53
- 2024Granite-Function Calling Model: Introducing Function Calling Abilities via Multi-task Learning of Granular Taskscited by 52
- 2025MARFT: Multi-Agent Reinforcement Fine-Tuningcited by 51
- 2025AgentCPM-GUI: Building Mobile-Use Agents with Reinforcement Fine-Tuningcited by 44
- 2024LAMBDA: A Large Model Based Data Agentcited by 30
- 2025Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratchcited by 17
- 2025AutoNeural: Co-Designing Vision-Language Models for NPU Inferencecited by 17
- 2024MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Casescited by 13
14 more
- 2024Octopus v4: Graph of language modelscited by 11
- 2024Octopus v3: Technical Report for On-device Sub-billion Multimodal AI Agentcited by 7
- 2024Tulip Agent -- Enabling LLM-Based Agents to Solve Tasks Using Large Tool Librariescited by 7
- 2024CAMPHOR: Collaborative Agents for Multi-input Planning and High-Order Reasoning On Devicecited by 6
- 2024Optimizing RAG Techniques for Automotive Industry PDF Chatbots: A Case Study with Locally Deployed Ollama Modelscited by 4
- 2025Live API-Bench: 2500+ Live APIs for Testing Multi-Step Tool Callingcited by 4
- 2025Small Language Models (SLMs) Can Still Pack a Punch: A survey (updated 2026)cited by 2
- 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Callingcited by 2
- 2024Research on Tibetan Tourism Viewpoints information generation system based on LLMcited by 1
- 2024Less is More: Optimizing Function Calling for LLM Execution on Edge Devicescited by 1
- 2025Efficient On-Device Agents via Adaptive Context Managementcited by 1
- 2026GUARD-SLM: Token Activation-Based Defense Against Jailbreak Attacks for Small Language Modelscited by 1
- 2025Intelligent IoT Attack Detection Design via ODLLM with Feature Ranking-based Knowledge Basecited by 0
- 2026Beyond Fluent Generation: A CPU Reliability Benchmark for MCP-Style Tool Calling in Sub-2B Small Language Models for Edge Deploymentcited by 0
- 2026Beyond Fluent Generation: A CPU Reliability Benchmark for MCP-Style Tool Calling in Sub-2B Small Language Models for Edge Deployment7 Sep 2026
- 2026GUARD-SLM: Token Activation-Based Defense Against Jailbreak Attacks for Small Language Models28 Mar 2026
- 2025AutoNeural: Co-Designing Vision-Language Models for NPU Inference2 Dec 2025
- 2025Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratch2 Nov 2025
- 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Calling16 Oct 2025
- 2025Efficient On-Device Agents via Adaptive Context Management24 Sep 2025
- 2025Live API-Bench: 2500+ Live APIs for Testing Multi-Step Tool Calling12 Jun 2025
- 2025AgentCPM-GUI: Building Mobile-Use Agents with Reinforcement Fine-Tuning2 Jun 2025
- 2025MARFT: Multi-Agent Reinforcement Fine-Tuning21 Apr 2025
- 2025Intelligent IoT Attack Detection Design via ODLLM with Feature Ranking-based Knowledge Base27 Mar 2025
- 2025UI-TARS: Pioneering Automated GUI Interaction with Native Agents21 Jan 2025
- 2025Small Language Models (SLMs) Can Still Pack a Punch: A survey (updated 2026)3 Jan 2025
14 more
- 2024Large Language Model-Brained GUI Agents: A Survey27 Nov 2024
- 2024Less is More: Optimizing Function Calling for LLM Execution on Edge Devices23 Nov 2024
- 2024CAMPHOR: Collaborative Agents for Multi-input Planning and High-Order Reasoning On Device12 Oct 2024
- 2024Hammer: Robust Function-Calling for On-Device Language Models via Function Masking6 Oct 2024
- 2024TinyAgent: Function Calling at the Edge1 Sep 2024
- 2024On-Device Language Models: A Comprehensive Review26 Aug 2024
- 2024Optimizing RAG Techniques for Automotive Industry PDF Chatbots: A Case Study with Locally Deployed Ollama Models12 Aug 2024
- 2024Tulip Agent -- Enabling LLM-Based Agents to Solve Tasks Using Large Tool Libraries31 Jul 2024
- 2024LAMBDA: A Large Model Based Data Agent24 Jul 2024
- 2024Research on Tibetan Tourism Viewpoints information generation system based on LLM18 Jul 2024
- 2024Granite-Function Calling Model: Introducing Function Calling Abilities via Multi-task Learning of Granular Tasks27 Jun 2024
- 2024MobileAIBench: Benchmarking LLMs and LMMs for On-Device Use Cases12 Jun 2024
- 2024Octopus v4: Graph of language models30 Apr 2024
- 2024Octopus v3: Technical Report for On-device Sub-billion Multimodal AI Agent17 Apr 2024
- 2025UI-TARS: Pioneering Automated GUI Interaction with Native Agentscited by 584
- 2024Large Language Model-Brained GUI Agents: A Surveycited by 160
- 2024TinyAgent: Function Calling at the Edgecited by 55
- 2024Hammer: Robust Function-Calling for On-Device Language Models via Function Maskingcited by 53
- 2024Granite-Function Calling Model: Introducing Function Calling Abilities via Multi-task Learning of Granular Taskscited by 52
- 2025MARFT: Multi-Agent Reinforcement Fine-Tuningcited by 51
- 2025AgentCPM-GUI: Building Mobile-Use Agents with Reinforcement Fine-Tuningcited by 44
- 2024LAMBDA: A Large Model Based Data Agentcited by 30
- 2025Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratchcited by 17
- 2024Octopus v3: Technical Report for On-device Sub-billion Multimodal AI Agentcited by 7
- 2024Tulip Agent -- Enabling LLM-Based Agents to Solve Tasks Using Large Tool Librariescited by 7
- 2025Live API-Bench: 2500+ Live APIs for Testing Multi-Step Tool Callingcited by 4
12 most cited of 15 All 15 (JSON)
- 2026Beyond Fluent Generation: A CPU Reliability Benchmark for MCP-Style Tool Calling in Sub-2B Small Language Models for Edge Deployment7 Sep 2026
- 2025Tool Zero: Training Tool-Augmented LLMs via Pure RL from Scratch2 Nov 2025
- 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Calling16 Oct 2025
- 2025Live API-Bench: 2500+ Live APIs for Testing Multi-Step Tool Calling12 Jun 2025
- 2025AgentCPM-GUI: Building Mobile-Use Agents with Reinforcement Fine-Tuning2 Jun 2025
- 2025MARFT: Multi-Agent Reinforcement Fine-Tuning21 Apr 2025
- 2025UI-TARS: Pioneering Automated GUI Interaction with Native Agents21 Jan 2025
- 2024Large Language Model-Brained GUI Agents: A Survey27 Nov 2024
- 2024Less is More: Optimizing Function Calling for LLM Execution on Edge Devices23 Nov 2024
- 2024Hammer: Robust Function-Calling for On-Device Language Models via Function Masking6 Oct 2024
- 2024TinyAgent: Function Calling at the Edge1 Sep 2024
- 2024Tulip Agent -- Enabling LLM-Based Agents to Solve Tasks Using Large Tool Libraries31 Jul 2024
12 newest of 15 All 15 (JSON)
- 2025Efficient On-Device Agents via Adaptive Context Management24 Sep 2025
- 2024On-Device Language Models: A Comprehensive Reviewcited by 101
- 2024Octopus v4: Graph of language modelscited by 11
- 2025Small Language Models (SLMs) Can Still Pack a Punch: A survey (updated 2026)cited by 2
- 2024Research on Tibetan Tourism Viewpoints information generation system based on LLMcited by 1
- 2025Intelligent IoT Attack Detection Design via ODLLM with Feature Ranking-based Knowledge Basecited by 0
- 2025Intelligent IoT Attack Detection Design via ODLLM with Feature Ranking-based Knowledge Base27 Mar 2025
- 2025Small Language Models (SLMs) Can Still Pack a Punch: A survey (updated 2026)3 Jan 2025
- 2024On-Device Language Models: A Comprehensive Review26 Aug 2024
- 2024Research on Tibetan Tourism Viewpoints information generation system based on LLM18 Jul 2024
- 2024Octopus v4: Graph of language models30 Apr 2024
Similar, not cited
Close in wording, no citation either way
- 2025CallNavi, A Challenge and Empirical Study on LLM Function Calling and Routing
- 2024Harnessing LLMs for API Interactions: A Framework for Classification and Synthetic Data Generation
- 2024Creating an LLM-based AI-agent: A high-level methodology towards enhancing LLMs with APIs
- 2024Octopus v2: On-device language model for super agent
- 2026Beyond Perfect APIs: A Comprehensive Evaluation of LLM Agents Under Real-World API Complexity
- 2026LLM Serving in the Wild: An Empirical Study of Frameworks, Methods, and System Designs
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation
- 2024NESTFUL: A Benchmark for Evaluating LLMs on Nested Sequences of API Calls