/tiger

Open Source LLM toolkit to build LLM applications. TigerRag (embedding, RAG), TigerTune (fine-tuning), TigerArmor (AI safety)

Primary LanguagePythonApache License 2.0Apache-2.0

TigerLab - Open Source LLM Toolkit



πŸ…πŸš€LLM Toolkit: RAG + FineTune + ?πŸš€πŸ…

Join our Discord Twitter Follow GitHub GitHub License

A significant gap has arisen between general Large Language Models (LLMs) and the data stores that provide them with contextual information. Bridging this gap is a crucial step towards grounding AI systems in efficient and factual domains, where their value lies not only in their generality but also in their specificity and uniqueness.

In pursuit of this goal, we are thrilled to introduce the Tiger toolkit (TigerRag, TigerTune, TigerDA, TigerArmor) as an open-source resource for developers to create AI models and language applications tailored to their specific needs.

We believe that our efforts will play a pivotal role in shaping the next phase of language modeling. This phase involves organizations customizing AI systems to align with their unique intellectual property and safety requirements, ushering in a new era of AI customization and precision.

✨ Demo

Find more demos at TigerLab.ai

Demo 1 - Enhanced Retrieval Capabilities w/ EBR, RAG and GAR

Demo 1 - Youtube

TigerRag.SDK.Demo.mp4

Demo 2 - Fine-tuning Llama2 and DistilBERT

Demo 2 - Youtube

FineTune.mp4

πŸ”¬ Tech stack

Untitled-2
  • TigerRag: Use embeddings-based retrieval (EBR), retrieval-augmented generation (RAG), and generation-augmented retrieval (GAR) to fulfill queries. The demo used BERT for embedding, FAISS for indexing, text-davinci-003 for generation.
  • TigerTune: Python SDK to finetune, make inference, and evaluate Text Generation models and Text Classification models. The notebook demo finetuned Llama2 and DistilBERT.
  • TigerDA: Data Augmentation Toolkit. Coming soon!
  • TigerArmor AI safety Toolkit. Coming soon!

πŸ‘¨β€πŸš€ Prerequisites

Before you begin setting up this project, please ensure you have completed the following tasks:

0. Setup Tutorial

1. LLM - OpenAI API Token

πŸ‘‡click me This application utilizes the OpenAI API to access its powerful language model capabilities. In order to use the OpenAI API, you will need to obtain an API token.

To get your OpenAI API token, follow these steps:

  1. Go to the OpenAI website and sign up for an account if you haven't already.
  2. Once you're logged in, navigate to the API keys page.
  3. Generate a new API key by clicking on the "Create API Key" button.
  4. Copy the API key and store it safely.
  5. Add the API key to your environment variable, e.g. export OPENAI_API_KEY=<your API key>

πŸ’Ώ Installation

  • Step 1. Clone the repo

    git clone https://github.com/tigerlab-ai/tiger.git
  • Step 2. Install TigerRag

    • Install all Python requirements
    cd tiger/TigerRag 
    pip install -r tigerrag/requirements.txt

    Demo:

    cd tigerrag/demo/movie_recs
    python demo.py
    
  • Step 3. Install TigerTune

    • Install all Python requirements
    cd tiger/TigerTune
    pip install -r tigertune/requirements.txt
    pip install --upgrade -e .

    Demo:

    python tigertune/examples/classification_example.py 
    python tigertune/examples/generation_example.py 
    

    CUDA GPU is needed to run generation_example.py

πŸ“ Roadmap

  • Launch v0.0.1
  • Release TigerDA
  • Release TigerArmor
  • Add additional model support in TigerTune
  • VectorDB for TigerRag
  • WebApp

🫢 Contribute to TigerLab

Please check out our Contribution Guide!

πŸ’ͺ Contributors

🎲 Community