Highlight

Toolformer: Language Models Can Teach Themselves to Use Tools

Introduces Toolformer, a language model that self-supervises when and how to call external tool APIs to improve zero-shot task performance.

Based on

Toolformer: Language Models Can Teach Themselves to Use Tools

By Timo Schick, Jane Dwivedi-Yu, Roberto Dessì et al.Neural Information Processing Systems
Read original article →

Toolformer addresses a paradox in large language models: they solve new tasks from few examples or instructions, yet struggle with basic functionality such as arithmetic or factual lookup that much simpler models handle well. The paper shows that a language model can teach itself to use external tools through simple APIs, training a model to decide which APIs to call, when to call them, what arguments to pass, and how best to incorporate the returned results into future token prediction. This is done in a self-supervised way, requiring only a handful of demonstrations for each API.

The approach incorporates a range of tools, including a calculator, a question-answering 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 becoming competitive with much larger models, while not sacrificing its core language modeling abilities. This demonstrates that tool use and strong language modeling can be combined in a single model, getting the best of both worlds.

Abstract

Toolformer shows that language models can teach themselves to use external tools via simple APIs, uniting LM strengths with skills like arithmetic and factual lookup where smaller models excel. It learns which APIs to call, when, what arguments to pass, and how to fold results into token prediction, self-supervised from only a handful of demonstrations per API. Tools include a calculator, Q&A, two search engines, a translator, and a calendar. It substantially improves zero-shot performance across many tasks, often rivaling larger models, without hurting language modeling.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

language modelstool useexternal APIsself-supervised learningzero-shot learningin-context learning
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.