AIAny

Toolformer: Language Models Can Teach Themselves to Use Tools

Teaches a language model when and how to call external APIs using a few demonstrations and self-generated training data. Calls are retained only when their results improve prediction of subsequent text.

Introduction

Tool use can be learned from the language model’s own prediction errors. The useful signal is whether an API response makes subsequent text easier to predict, allowing ordinary text to supply supervision for choosing tools and arguments.

Key Findings
  • A few demonstrations seed candidate calls; execution and loss-based filtering create the fine-tuning data without extensive manual annotation.
  • On ASDiv, the GPT-J-based model scores 40.4 versus 14.8 with its APIs disabled, showing the contribution of calculator access.
  • Experiments cover question answering, search, arithmetic, translation, and dates while retaining general language modeling ability.
Who Should Read It

Great fit if you study how to generate tool-use training data. Look elsewhere if you need chained calls or interactive search: the method does not teach either, and useful examples for some tools are costly to obtain.

Information

  • Websitearxiv.org
  • OrganizationsMeta AI Research, Universitat Pompeu Fabra
  • AuthorsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom
  • Published date2023/02/09

More Items

Trains a vision-language model to gather visual evidence, combine tool outputs, and revise decisions using execution feedback. Supervised fine-tuning and agentic reinforcement learning help it transfer to embodied tasks without simulator rollouts during post-training.

Reuses Transformer weights across depth and neighboring tokens to improve language-model compute efficiency. It combines within-token iteration with cross-token state feedback, outperforming standard and looped baselines in matched-compute tests.

Evaluates how accurately and quickly GUI agents locate interface targets against expert completion times. Across 9,160 tasks, it finds the largest agent–human gaps in complex, time-sensitive scenarios.