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
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.
Take the next step
Try CoreModels, talk with our team, or explore more resources.