PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
February 9, 2023400 citationsOpen Access

Toolformer: Language Models Can Teach Themselves to Use Tools

TSTimo SchickJDJane Dwivedi-YuRDRoberto Dessì

Key Points

  • To determine whether language models can teach themselves to autonomously call external digital tools through APIs to improve performance on tasks like arithmetic and factual retrieval.
  • Implemented a self-supervised training approach using a small set of human demonstrations per tool to teach the model how to make API calls.
  • Integrated external tools including a calculator, a question-answering system, two search engines, a translation system, and a calendar.
  • Trained the model to decide which API to invoke, generate appropriate arguments, and seamlessly inject the returned output into future token predictions.
  • Substantially boosted zero-shot performance across a variety of downstream tasks that require factual lookup and arithmetic calculations.
  • Achieved task performance competitive with substantially larger language models without compromising base language modeling capabilities.

Abstract

Language models (LMs) exhibit remarkable abilities to solve new tasks from just a few examples or textual instructions, especially at scale. They also, paradoxically, struggle with basic functionality, such as arithmetic or factual lookup, where much simpler and smaller models excel. In this paper, we show that LMs can teach themselves to use external tools via simple APIs and achieve the best of both worlds. We introduce Toolformer, a model trained to decide which APIs to call, when to call them, what arguments to pass, and how to best incorporate the results into future token prediction. This is done in a self-supervised way, requiring nothing more than a handful of demonstrations for each API. We incorporate a range of tools, including a calculator, a Q\&A system, two different search engines, a translation system, and a calendar. Toolformer achieves substantially improved zero-shot performance across a variety of downstream tasks, often competitive with much larger models, without sacrificing its core language modeling abilities.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Schick et al. (2023) studied this question.

synapsesocial.com/papers/6a08cd155686deba6901f232https://doi.org/10.48550/arxiv.2302.04761
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1Tool learning with language models: a comprehensive survey of methods, pipelines, and benchmarks2025 · 6 citations
  2. 2Tool learning with language models: a comprehensive survey of methods, pipelines, and benchmarks2025
  3. 3TOOLVERIFIER: Generalization to New Tools via Self-Verification2024
  4. 4Chain of Tools: Large Language Model is an Automatic Multi-tool Learner2024 · 6 citations
  5. 5Towards Practical Tool Usage for Continually Learning LLMs2024 · 2 citations