HackerPapers

arXiv:2302.04761cs.CL

Toolformer: Language Models Can Teach Themselves to Use Tools

Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom

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.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language

On Hacker News

Linked by 22 identifiable commenters in 29 comments across 24 threads, from Feb 2023 to Nov 2023. Found in 3 HN submissions from Feb 2023 to Feb 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments24 threads

    • Nothing, and there are methods which allow these types of models to learn to use special purpose tools of this kind[1]. [1] https://arxiv.org/abs/2302.04761 Toolformer: Language Models Can Teach Themselves to Use Tools

      seanhunterView on HNParent context

    • 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…

      seanhunterView on HNParent context

    • Toolformer: Language Models Can Teach Themselves to Use Tools https://arxiv.org/abs/2302.04761 Older one, but still very nice work.

      manvel_hnView on HNParent context

    • 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…

      seanhunterView on HNParent context

    • 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.

      famouswafflesView on HNParent context

    • This document seems to have been written before the toolformer paper[0], which fine tunes the model to use tools (e.g search) to retrieve information. [0]: https://arxiv.org/abs/2302.04761

      johntb86View on HNParent context

  1. Saying Goodbye to GitHub 1 comment
    • 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…

      Version467View on HNParent context

    • > LLMs can't to my knowledge process a request into a lookup on say an actual database of facts at the moment or parse a request into API actions. They can: https://arxiv.org/abs/2302.04761 > In this paper, we show that LMs can teach themselves to use external tools

      pornelView on HNParent context

    • 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…

      ninjinView on HNParent context

    • They already can: https://arxiv.org/abs/2302.04761 (Toolformer) There's even a zero-shot version based on prompt engineering: https://toolformerzero.com/.

      grafs50View on HNParent context

    • Since the GPT-4 paper didn't reveal any details of their model, it's possible that GPT-4 is already using some variant of toolformer (https://arxiv.org/abs/2302.04761).

      goldwelder42View on HNParent context

    • Bing chat already hooks into a web search tool. It shows "Searching for: ..." when it does that. This is kind of the point of Bing chat. edit: a paper about how to hook up LLMs to any external tool https://arxiv.org/abs/2302.04761

      wcoenenView on HNParent context

  2. GPT-4 1 comment
    • 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

      sprobertsonView on HNParent context

    • That's called Toolformer (Facebook AI Research): https://arxiv.org/abs/2302.04761 Toolformer: Language Models Can Teach Themselves to Use Tools

      jkbycView on HNParent context

    • 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…

      williamcottonView on HNParent context

    • 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…

      jackblemmingView on HNParent context

    • Here’s some recent ML work from Meta that I really like: Toolformer: Language Models Can Teach Themselves to Use Tools https://arxiv.org/abs/2302.04761

      williamcottonView on HNParent context

    • 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…

      imranqView on HNParent context

    • 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…

      BoorishBearsView on HNParent context

    • One recent paper to be added to this list of Approaches/Techniques is: Toolformer: Language Models Can Teach Themselves to Use Tools https://arxiv.org/abs/2302.04761 The authors show a valuable method of using prompts to generate training data to be used for fine-tuning. Check…

      williamcottonView on HNParent context

    • Using the terminology that I'm working with this is an example of a second-order analytic augmentation! Here's another approach of second-order analytic augmentation, PAL: https://reasonwithpal.com Third-order, Toolformer: https://arxiv.org/abs/2302.04761 Third-order, Bing…

      williamcottonView on HNParent context

    • 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]…

      danielblnView on HNParent context

  3. Text Is All You Need 1 comment
    • 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…

      valineView on HNParent context

  4. Bing AI can't be trusted 2 comments
    • 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…

      btownView on HNParent context

    • Except it’s already been shown LLMs can do exactly that. You can prime the model to insert something like ${API CALL HERE} into its output. Then it’s just a matter of finding that string and calling the api. Toolformer does something really neat where they make the API call…

      valineView on HNParent context

    • 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

      localhostView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.