Skip to content
Back to the collection

Toolformer: Language Models Can Teach Themselves to Use Tools

Timo Schick, Jane Dwivedi-Yu, Roberto Dessì

Show all 8 authors

Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom

2023 · arXiv

Read the paper
HN score
2
Mentions
24
Readers
18
Months
5
What’s in a score?

From the 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.

Metadata: arXiv. Abstracts retain their original authors’ rights.

In the conversation

Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels

20 selected excerpts · 24 total mentions

Version467
Recommendation · rule
The recent post from Stephen Wolfram[1] is pretty good as an introduction, but I haven't seen any super comprehensive material that tries do dissect all the interesting behaviour we see in the really big llms. For that just reading the relevant papers themselves has been pretty fruitful for me. Some of them are actually very well written, even if you aren't used to reading scientific papers. I can recommend the Sparks of AGI paper[2] and the toolformer paper[3]. Obviously there's much more out there, those three things are a pretty good read. [1]: https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-... [2]: https://arxiv.org/abs/2303.12712 [3]: https://arxiv.org/abs/2302.04761
ninjin
Recommendation · rule
I am actually not quite sure what would be best to recommend, as the pandemic has seen me lag behind the zeitgeist somewhat. A recent favourite would be the Toolformer paper [1], that I intend to read in detail later today. If an LLM would be able to use external tools efficiently, it could be rather powerful and perhaps allow us to scale down the parameter sizes, which somewhat fascinates me. [1]: https://arxiv.org/abs/2302.04761 Other research questions, but without concrete papers to reference to that current keeps me up at night: 1.) to which degree can we train substantially smaller LLMs for specific tasks that could be run in-house, 2.) it seems like these new…
Read the full comment
breakthroughs may need a different mode of evaluation compared to what we have used since the 80s in the field and I am not sure what that would look like (maybe along the lines of HELM [2]?), and 3.) can AI academia continue to operate in the way it currently does with small research teams or is a change towards what we see in the physical sciences necessary? [2]: https://arxiv.org/abs/2211.09110
seanhunter
Neutral mention · rule
It does. This is the plugins methodology described in the toolformers paper which I've linked elsewhere[1]. The model learns that for certain types of problems certain specific "tools" are the best way to solve the problem. The problem is of course it's simple to argue that the LLM learns to use the tool(s) and can't reason itself about the underlying problem. The question boils down to whether you're more interested in machines which can think (whatever that means) or having a super-powered co-pilot which can help with a wide variety of tasks. I'm quite biased towards the second so I have the wolfram alpha plugin enabled in my chat gpt. I can't say it solves all the math-related hallucinations I see but I might not be using it right. [1] But here it is again https://arxiv.org/abs/2302.04761
og_kalu
Neutral mention · rule
It should be in line with the likes of this - https://arxiv.org/abs/2302.04761 or https://twitter.com/minosvasilias/status/1627076214639976449 I didn't say guardrail to mean anything particularly elaborate. The pre-prompt for Bing has instructions to avoid adversarial arguments.
sprobertson
Neutral mention · rule
He likely meant techniques such as ToolFormer[1] where the language model will output a "request" (in some text syntax) that another system can parse, run and report back. [1] https://arxiv.org/abs/2302.04761
williamcotton
Neutral mention · rule
Here you go, here's a bunch of papers that you have not read. If you had read them then you would know that the errors are predictable and therefore there are many measurable ways to make improvements. Toolformer: Language Models Can Teach Themselves to Use Tools: https://arxiv.org/abs/2302.04761 PAL: Program-aided Language Models: https://arxiv.org/abs/2211.10435 TALM: Tool Augmented Language Models: https://arxiv.org/abs/2205.12255 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models: https://arxiv.org/abs/2201.11903 Survey of Hallucination in Natural Language Generation: https://arxiv.org/abs/2202.03629
jackblemming
Neutral mention · rule
Hooking ChatGPT (and similar architectures) into applications is going to be the next big thing. It just takes time to hook up various systems. Eventually a vision module will be integrated and it will probably be able to "figure out" most systems. There's a lot of money to be made in hooking up these "brains" into apps. I hope people get on it, since it will be quite convenient. See: Act-1: https://news.ycombinator.com/item?id=32842860 Open-Assistant: https://github.com/LAION-AI/Open-Assistant Toolformer: https://arxiv.org/abs/2302.04761 Understanding HTML with LLMs: https://arxiv.org/abs/2210.03945
imranq
Neutral mention · rule
You can make small LLMs more performant than large ones like GPT-3 by fine-tuning on specific tasks or providing them tools to offload precise calculations: e.g. Toolformer: https://arxiv.org/abs/2302.04761 which uses APIs and functions to improve GPT-J beyond GPT-3 for various tasks
BoorishBears
Neutral mention · rule
There's research being done on this: https://arxiv.org/abs/2302.04761 At its core using an LM alone to solve factual problems seems silly: It's not unlike asking Dall-E to draw DOT compliant road signs. I've gone at length at how unfortunate it would be if LMs start to get a bad rap because they're being shoehorned into being "Ask Jeeves 2.0" when they could be so much more.
danielbln
Neutral mention · rule
They literally "do context", as they do in-context learning. Also, factuality can effectively be solved by chain-of-thought prompting[0] and the use of external tools[1], also see toolformerzero[2] for a simple example. [0]: https://arxiv.org/abs/2201.11903 [1]: https://arxiv.org/abs/2302.04761 [2]: https://toolformerzero.com/ [2]: https://toolformerzero.com/
valine
Neutral mention · rule
In their current iteration the models are very neutered. It’s been demonstrated that GPT models are fairly good at choosing when to perform a task. Obviously lots of APIs and machinery is needed to actually perform tasks, but the heavy lifting “intelligence” portion can be almost entirely performed by our existing models. Some basic text based APIs that would quickly improve LLM utility: Calculators Database storage and retrieval Web access (already kind of done by bing) Shell scripting Thinking further into the future of multimodal models, it’s not hard to imagine this sort of thing could be extended to include image based APIs. Imagine a LLM looking at your gui and clicking on things. The sky’s the limit at that point. Checkout toolformer, they’ve got this mostly working with a much smaller model than gpt3.5. https://arxiv.org/abs/2302.04761
btown
Neutral mention · rule
I love the mental model of GPT as only one part of the brain, but I believe that the integration of other "parts" of the brain will come sooner than you think. See, for instance, https://twitter.com/mathemagic1an/status/1624870248221663232 / https://arxiv.org/abs/2302.04761 where the language model is used to create training data that allows it to emit tokens that function as lookup oracles by interacting with external APIs. And an LLM can itself understand when a document is internally inconsistent, relative to other documents, so it can integrate the results of these oracles if properly trained to do so. We're only at the surface of what's possible here! I also look to…
Read the full comment
the example of self-driving cars - just because Tesla over-promised, that didn't discourage its competitors from moving forward slowly but surely. It's hard to pick a winner right now, though - so much culturally in big tech is up in the air with the simultaneity of layoffs and this sea change in AI viability, it's hard to know who will be first to release something that truly feels rock-solid.
localhost
Neutral mention · rule
Relevant to this discussion is the Toolformer paper that was just released today from Meta AI. To me the exciting result from the paper is that it appears that much smaller models can be used to translate human intent into actions: https://arxiv.org/abs/2302.04761
seanhunter
Neutral mention · rule
That’s sort of what happens in the “toolformer” paper[1] which sets out the basic architecture by which things like chatGPT plugins work. Language models can learn to use “tools” provided by plugins. Those tools might themselves bee the specialized models you are describing (although for some plugins they could be a non-AI tool such as web search or whatever). [1] https://arxiv.org/pdf/2302.04761.pdf

Keep following the thread.

More in Language models

More from the same topics.