atlas

Research map / Large language models / Agents, code and math

Robust Function-Calling for On-Device Language Model via Function Masking

ICLR 2025 · Large language models › Agents, code and math · approach: Long-horizon LLM agents

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Hammer, small on-device function-calling models fine-tuned on xLAM data plus 7.5k irrelevance examples and a function-masking scheme that replaces function/parameter names with random strings to improve cross-benchmark robustness.

Problem

Function-calling models show inconsistent performance across benchmarks, often because they over-rely on function and parameter naming conventions and fail to detect irrelevant functions.

Approach

Mask function and parameter names with random strings during fine-tuning so the model relies on descriptions, and augment training data with irrelevance examples where the correct function is removed and the target is an empty list.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune Qwen2-7B-Instruct with function masking and irrelevance-augmented data (ablation)Qwen2-7B-Instruct (Hammer-7B) · Academic benchmarks averageF1 Func. + Args: 59.84 -> 76.21Helped
Fine-tune Qwen1.5-4B-Chat with function masking and irrelevance-augmented data (ablation)Qwen1.5-4B-Chat (Hammer-4B) · Academic benchmarks averageF1 Func. + Args: 42.25 -> 71.35Helped
Fine-tune Qwen2-1.5B-Instruct with function masking and irrelevance-augmented data (ablation)Qwen2-1.5B-Instruct (Hammer-1.5B) · Academic benchmarks averageF1 Func. + Args: 52.67 -> 66.20Helped
Fine-tune Deepseek-Coder-7B-Instruct with the Hammer approach (ablation)Deepseek-Coder-7B-Instruct · Academic benchmarks averageF1 Func. + Args: 45.67 -> 74.94Helped
Fine-tune Deepseek-Coder-1.3B-Instruct with the Hammer approach (ablation)Deepseek-Coder-1.3B-Instruct · Academic benchmarks averageF1 Func. + Args: 19.78 -> 70.91Helped
Increase the function-masking ratio (ablation)Qwen2-1.5B trained on Seal-Tools · Seal-Toolsperformance (metric not specified)Hurt
Increase the function-masking ratio (ablation)Qwen2-1.5B trained on Seal-Tools · API-Bankperformance (metric not specified)Helped
Add irrelevance-augmented training examples (ablation)Qwen2-1.5B-Instruct · BFCLirrelevance detection and function-calling performanceMixed
Use approximately 10% irrelevance-augmented data (ablation)Qwen2-1.5B-Instruct (Hammer) · BFCLoverall performanceHelped
Apply function masking during training to reduce reliance on function and parameter namesHammer · Seal-Tools with names masked at test timeperformance drop under name obfuscationHelped
Use function masking for complex Parallel Multiple callsHammer-7B · BFCL Parallel MultipleAST and executable accuracy: 84.08 AST; 85.00 Exec.Helped

Surprising findings

Limitations

Experimental setup

Datasets: xLAM-function-calling-60k Seal-Tools training set BFCL API-Bank Tool-Alpaca Seal-Tools Nexus Raven API Evaluation

Benchmarks: BFCL API-Bank Tool-Alpaca Seal-Tools Nexus Raven API Evaluation

Metrics: accuracy AST accuracy executable accuracy F1 function name F1 function name and arguments

Baselines: GPT-4 GPT-4o xLAM-7B-fc xLAM-1.3B-fc Granite-20B-FunctionCalling Gorilla-OpenFunctions-v2-7B Functionary-Small-v3.1-8B Hermes-2-Pro

Builds on: xLAM-function-calling-60k DPO

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy