Reproduce “Hammer: Robust Function-Calling for On-Device Language Models via Function Masking” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Qiqiang Lin, Muning Wen, Qiuying Peng, Guanyu Nie, Junwei Liao, Jun Wang, Xiaoyun Mo, Jiamu Zhou and 4 more

OPPO Research Institute, in collaboration with Shanghai Jiao Tong University and Iowa State University, developed "Hammer" models, which achieve state-of-the-art robust and generalizable function-calling for on-device language models. This is primarily enabled by a novel function masking technique and an irrelevance-augmented dataset, leading to more reliable LLM-powered agents suitable for resource-constrained devices.

Key insights

  • Over-reliance on surface-level naming conventions hinders function-calling model robustness; semantic understanding from descriptions is crucial for generalization.
  • Explicitly masking function and parameter names during training forces models to learn deeper semantic representations from descriptions, improving adaptability.
  • A balanced approach to training data, incorporating specific "no-call" examples, is essential to mitigate the trade-off between function selection accuracy and irrelevance detection.
  • High-performance, robust function-calling is achievable on lightweight models, making on-device deployment practical.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.