← 开源
ctlllll

LLM-ToolMaker

Model DevelopmentJupyter Notebook
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.07k
Star
97
Fork
+0
本周
1
贡献者
创建于 2023-05-25 · 更新于 2026-10-01 · 今日第 11789 名
主要开发者
ctlllll

ctlllll/LLM-ToolMaker 排名第 11,789,有 1,066 个星标。

同类别比较

ctlllll/LLM-ToolMaker 排名第 11,789,此处有 8 个同类条目;X-LANCE/SLAM-LLM 排名第 11,788。

同类别比较
名称排名指标
MatthieuCourbariaux/BinaryNet11,778
语言:
Python
星标数:
1,068
分叉数:
338
简介:
Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1
lucidrains/mlp-mixer-pytorch11,782
语言:
Python
星标数:
1,068
分叉数:
107
简介:
An All-MLP solution for Vision, from Google AI
NVIDIA/sentiment-discovery11,786
语言:
Python
星标数:
1,067
分叉数:
208
简介:
Unsupervised Language Modeling at scale for robust sentiment classification
X-LANCE/SLAM-LLM11,788
语言:
Python
星标数:
1,066
分叉数:
119
简介:
A Framework for Speech, Language, Audio, Music Processing with Large Language Model
isl-org/MultiObjectiveOptimization11,792
语言:
Python
星标数:
1,066
分叉数:
173
简介:
Source code for Neural Information Processing Systems (NeurIPS) 2018 paper "Multi-Task Learning as Multi-Objective Optimization"
openai/summarize-from-feedback11,798
语言:
Python
星标数:
1,065
分叉数:
154
简介:
Code for "Learning to summarize from human feedback"
jsyoon0823/TimeGAN11,804
语言:
Jupyter Notebook
星标数:
1,064
分叉数:
325
简介:
Codebase for Time-series Generative Adversarial Networks (TimeGAN) - NeurIPS 2019
J535D165/recordlinkage11,807
语言:
Python
星标数:
1,063
分叉数:
153
简介:
A powerful and modular toolkit for record linkage and duplicate detection in Python
关键参数与规格
关键参数与规格
参数值
语言Jupyter Notebook
类别Model Development
关键词Agent
星标数1,066
分叉数97
贡献者1
创建日期2023-05-25
更新日期2026-10-01
1 天星标数0
7 天星标数0
排名11,789
上次排名11,713
排名变化-76
7 天星标排名13,135
上次 7 天星标排名13,157
7 天星标排名变化22
总星标排名10,624
上次总星标排名10,608
总星标排名变化-16
国家USA
README 摘录

Large Language Models as Tool Makers *Tianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen, Denny Zhou* Paper link Motivation Recent research shows the potential of enhancing the problem-solving ability of large language models (LLMs) through the use of external tools. However, prior work along this line depends on the availability of existing tools. In this work, we take an initial step towards removing this dependency by proposing a closed-loop framework, referred to as LLMs A s Tool M

akers (LATM), where LLMs create their own reusable tools for problem-solving. Overview Our approach consists of two key phases: 1) tool making: an LLM acts as the tool maker that crafts tools for given tasks, where a tool is implemented as a Python utility function. 2) tool using: an LLM acts as the tool user, which applies the tool built by the tool maker for problem-solving. The tool user can be either the same or a different LLM

from the tool maker. Tool-making enables an LLM to continually generate tools that can be applied to different requests so that future requests can call the corresponding APIs when beneficial for solving the tasks. Furthermore, the division of labor among LLMs for tool-making and tool-using phases introduces the opportunity to achieve cost effectiveness without degrading the quality of generated tools and problem solutions. For example, recognizing that tool-making demands more sophisticated capabilities than tool-using, we

can apply a powerful yet resource-intensive model as the tool maker, and a lightweight while cost-effective model as the tool user. We validate the effectiveness of our approach across a variety of complex reasoning tasks, including Big-Bench tasks. 5 as the tool user, LATM can achieve performance that is on par with using GPT-4 for both tool making and tool using, while the inference cost is significantly reduced. Pipeline LATM can be divided into two stages

: 1) tool making: a powerful yet more expensive model serves as the tool maker to generate generic and reusable tools from a few demonstrations; 2) tool using: a lightweight and cheaper model serves as the tool user to use the tool to solve various instances of the task. The tool-making stage can be further divided into three sub-stages: (i) tool proposing: the tool maker makes an attempt to generate the tool (Python function) from a few training demonstrations

, if the tool is not executable, report the error and generate a new one (fix the issues in the function); (ii) tool verification: the tool maker runs unit tests on validation samples, if the tool does not pass the tests, report the error and generate new tests (fix the issues in function calls in unit tests); and (iii) tool wrapping: wrapping up the function code and the demonstrations of how to convert a question into a function call from unit

tests, preparing usable tools for tool user. Example An illustration of the Tool Proposing and Tool Using stages of the

常见问题

记录了多少星标和分叉?

ctlllll/LLM-ToolMaker 有 1,066 个星标和 97 个分叉。

仓库排名是多少?

ctlllll/LLM-ToolMaker 排名第 11,789。

记录的语言和类别是什么?

ctlllll/LLM-ToolMaker 有 1,066 个星标,语言为 Jupyter Notebook,类别为 Model Development。

哪个仓库排名最接近?

ctlllll/LLM-ToolMaker 与 X-LANCE/SLAM-LLM 比较,后者排名第 11,788,有 1,066 个星标。

README

Large Language Models as Tool Makers

Tianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen, Denny Zhou

Paper link

Motivation

Recent research shows the potential of enhancing the problem-solving ability of large language models (LLMs) through the use of external tools. However, prior work along this line depends on the availability of existing tools. In this work, we take an initial step towards removing this dependency by proposing a closed-loop framework, referred to as LLMs A s Tool M akers (LATM), where LLMs create their own reusable tools for problem-solving.

Overview

Our approach consists of two key phases: 1) tool making: an LLM acts as the tool maker that crafts tools for given tasks, where a tool is implemented as a Python utility function. 2) tool using: an LLM acts as the tool user, which applies the tool built by the tool maker for problem-solving. The tool user can be either the same or a different LLM from the tool maker. Tool-making enables an LLM to continually generate tools that can be applied to different requests so that future requests can call the corresponding APIs when beneficial for solving the tasks.

Furthermore, the division of labor among LLMs for tool-making and tool-using phases introduces the opportunity to achieve cost effectiveness without degrading the quality of generated tools and problem solutions. For example, recognizing that tool-making demands more sophisticated capabilities than tool-using, we can apply a powerful yet resource-intensive model as the tool maker, and a lightweight while cost-effective model as the tool user. We validate the effectiveness of our approach across a variety of complex reasoning tasks, including Big-Bench tasks. With GPT-4 as the tool maker and GPT-3.5 as the tool user, LATM can achieve performance that is on par with using GPT-4 for both tool making and tool using, while the inference cost is significantly reduced.

Pipeline

LATM can be divided into two stages: 1) tool making: a powerful yet more expensive model serves as the tool maker to generate generic and reusable tools from a few demonstrations; 2) tool using: a lightweight and cheaper model serves as the tool user to use the tool to solve various instances of the task. The tool-making stage can be further divided into three sub-stages: (i) tool proposing: the tool maker makes an attempt to generate the tool (Python function) from a few training demonstrations, if the tool is not executable, report the error and generate a new one (fix the issues in the function); (ii) tool verification: the tool maker runs unit tests on validation samples, if the tool does not pass the tests, report the error and generate new tests (fix the issues in function calls in unit tests); and (iii) tool wrapping: wrapping up the function code and the demonstrations of how to convert a question into a function call from unit tests, preparing usable tools for tool user.

Example

An illustration of the Tool Proposing and Tool Using stages of the LATM pipeline for the Logical Deduction task [Srivastava et al., 2022]. This task requires determining the order of five objects based on several given conditions. In the Tool Proposing stage, the tool maker (such as GPT-4) formulates a generic Python function capable of solving the provided k demonstrations from the task (where k equals 3 in our experiments). The tool maker generates a search algorithm that enumerates all possible orderings and verifies each against the provided conditions. During the tool-using stage, the tool user translates each natural language question into a series of conditions, generating function calls to utilize the tool for each task instance.

Code structure

  • schedule_meeting.ipynb -- notebook for constructing the schedule meeting dataset
  • toolmaker.ipynb -- notebook for making tools, the wrapped tools are stored in tools folder and are ready to use
  • tooluser.ipynb -- notebook for testing Tool User and Dispatcher
  • bbh folder -- the tasks from BigBench in json format
  • cot-prompts folder -- the Chain-of-Thought prompts

Citation

@article{cai2023large,
  title   = {Large Language Models as Tool Makers},
  author  = {Tianle Cai and Xuezhi Wang and Tengyu Ma and Xinyun Chen and Denny Zhou},
  year    = {2023},
  journal = {arXiv preprint arXiv: 2305.17126}
}
排名相邻
同类项目