GPT4Tools: Teaching Large Language Model to Use Tools via Self-instruction
Authors:
Preprint
Abstract
This paper aims to efficiently enable Large Language Models (LLMs) to use multimodal tools. Advanced proprietary LLMs, such as ChatGPT and GPT-4, have shown great potential for tool usage through sophisticated prompt engineering. Nevertheless, these models typically rely on prohibitive computational costs and publicly inaccessible data. To address these challenges, we propose the GPT4Tools based on self-instruct to enable open-source LLMs, such as LLaMA and OPT, to use tools. It generates an instruction-following dataset by prompting an advanced teacher with various multi-modal contexts. By using the Low-Rank Adaptation (LoRA) optimization, our approach facilitates the open-source LLMs to solve a range of visual problems, including visual comprehension and image generation. Moreover, we provide a benchmark to evaluate the ability of LLMs to use tools, which is performed in both zero-shot and fine-tuning ways. Extensive experiments demonstrate the effectiveness of our method on various language models, which not only significantly improves the accuracy of invoking seen tools, but also enables the zero-shot capacity for unseen tools. The code and demo are available at https://github.com/StevenGrove/GPT4Tools.Keywords
All Related Versions
This publication has 17 references indexed in Scilit:
- Grounding DINO: Marrying DINO with Grounded Pre-training for Open-Set Object Detection2024
- BoxSnake: Polygonal Instance Segmentation with Box Supervision2023
- ChatGPT outperforms crowd workers for text-annotation tasksProceedings of the National Academy of Sciences of the United States of America, 2023
- InstructPix2Pix: Learning to Follow Image Editing Instructions2023
- High-Resolution Image Synthesis with Latent Diffusion Models2022
- Uni-Perceiver: Pre-training Unified Architecture for Generic Perception for Zero-shot and Few-shot Tasks2022
- End-to-End Object Detection with Fully Convolutional Network2021
- Learning Dynamic Routing for Semantic Segmentation2020
- TACNet: Transition-Aware Context Network for Spatio-Temporal Action Detection2019
- Microsoft COCO: Common Objects in Context2014