ToolAlpaca  by tangqiaoyu

Tool-learning framework for language models, research paper

created 2 years ago
881 stars

Top 41.7% on sourcepulse

GitHubView on GitHub
Project Summary

ToolAlpaca provides a framework and dataset for training compact language models to generalize tool-use capabilities with minimal human supervision. It addresses the challenge of tool learning by simulating multi-agent interactions to generate a large-scale tool-use corpus, enabling models to effectively interact with over 400 APIs.

How It Works

The framework generates a comprehensive tool-use dataset by simulating interactions between agents. It leverages OpenAPI specifications to create natural language documentation and instruction formats for APIs. The core innovation lies in its multi-agent simulation environment, which generates diverse tool-use instances, including intermediate steps and final outputs, facilitating robust learning for language models.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python, git clone of the repository, OpenAI API key (for data generation).
  • Data Generation: Requires public-apis.json and involves several Python scripts for toolset construction and instance generation.
  • Training: Uses DeepSpeed for distributed training. Requires a base model (e.g., Vicuna-7B) and a specified deepspeed config path.
  • Links: Huggingface Models

Highlighted Details

  • Dataset includes 3.9k tool-use instances across 400+ APIs.
  • Evaluation data covers both simulated and real-world APIs.
  • Training focuses on optimizing specific components of the tool-use process (thought, action, action input).
  • Supports training with DeepSpeed for efficient distributed learning.

Maintenance & Community

The project is associated with Qiaoyu Tang and other authors from the paper "ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases." Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The repository's license is not explicitly stated in the README. The dataset includes real APIs, some of which may require authentication, implying potential usage restrictions depending on the specific API terms of service.

Limitations & Caveats

The README indicates that some real APIs require authentication, which may complicate direct usage or evaluation without obtaining necessary API keys. The data generation process relies on an OpenAI API key, which incurs costs.

Health Check
Last commit

9 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
6 stars in the last 90 days

Explore Similar Projects

Starred by Ying Sheng Ying Sheng(Author of SGLang), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

ToolBench by OpenBMB

0.1%
5k
Open platform for LLM tool learning (ICLR'24 spotlight)
created 2 years ago
updated 2 months ago
Feedback? Help us improve.