self-discover  by catid

Google SELF-DISCOVER algorithm implementation

created 1 year ago
297 stars

Top 90.4% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository implements Google's SELF-DISCOVER algorithm, a method for enabling large language models (LLMs) to autonomously discover and utilize tools. It's designed for researchers and developers looking to enhance LLM capabilities in complex problem-solving scenarios.

How It Works

SELF-DISCOVER employs a multi-stage process: SELECT, ADAPT, and IMPLEMENT. In the SELECT stage, the LLM identifies relevant tools or reasoning modules from a predefined set. The ADAPT stage refines these selections, tailoring them to the specific problem context. Finally, the IMPLEMENT stage generates a structured reasoning process, breaking down the problem and applying the adapted modules to arrive at a solution. This iterative refinement and structured approach aim to improve LLM reliability and transparency in tool use.

Quick Start & Requirements

  • Install:
    conda create -n sd python=3.10 -y
    conda activate sd
    git clone https://github.com/catid/self-discover.git
    cd self-discover
    pip install -r requirements.txt
    
  • Prerequisites: OpenAI API key (or compatible LLM endpoint), Python 3.10.
  • Demo: Edit self_discover.py with your API key and run python self_discover.py. The README provides an example output using a self-hosted Miqu 70B model on two 4090 GPUs.

Highlighted Details

  • Implements the algorithm from Google's research paper (arxiv.org/pdf/2402.03620.pdf).
  • Demonstrates a multi-stage reasoning process (SELECT, ADAPT, IMPLEMENT).
  • Provides a clear example of problem decomposition and tool selection for a math word problem.
  • Supports self-hosted models, as shown with the Miqu 70B example.

Maintenance & Community

The repository is maintained by catid. No specific community channels or roadmap details are provided in the README.

Licensing & Compatibility

The repository's license is not specified in the README.

Limitations & Caveats

The README does not specify the license, which may impact commercial use. The implementation relies on an external OpenAI API key or a compatible LLM, and successful execution may depend on the quality and capabilities of the chosen LLM.

Health Check
Last commit

11 months ago

Responsiveness

1 week

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

Explore Similar Projects

Feedback? Help us improve.