Git Product home page Git Product logo

tigerlab-ai / tiger Goto Github PK

View Code? Open in Web Editor NEW
388.0 11.0 26.0 1.88 MB

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

Home Page: https://www.tigerlab.ai

License: Apache License 2.0

Python 14.30% Jupyter Notebook 85.70%
classification fine-tuning llm llm-training rag ai-safety data-augmentation large-language-models aisafety

tiger's Introduction

TigerLab - Open Source LLM Toolkit



πŸ…πŸš€Framework for Trustworthy LLM development: RAG + FineTune + AI Safety MeasurementπŸš€πŸ…

πŸ™Œ AI Safety Report

Request Safety Evaluation for your LLMs & Chatbots at ⭐ TigerLab.ai ⭐

Details can be found at: Metrics Defination

tigerlab_ai_safe_report

✨ 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 fine-tune, make inference, and evaluate Text Generation models and Text Classification models. The notebook demo fine-tuned Llama2 and DistilBERT.
  • TigerDA: Data Augmentation Toolkit. The generation-based augmenter supports data augmentation with fine-tuned (instruction-based) GPT2. Top-k and Top-p Sampling has been used for decoding. Perturbation-based augmenter coming soon!
  • TigerArmor AI safety Toolkit. It contains metrics, datasets, evaluation tools for measure AI safety for LLMs, like Llama 2, GPT-4, Mistral, etc.

πŸ‘¨β€πŸš€ 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 .

    Demo:

    cd demos/movie_recs
    python demo_ebr.py
    python demo_rag.py
    python demo_gar.py
    
  • Step 3. Install TigerTune

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

    Demo:

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

    CUDA GPU is needed to run generation_example.py. If you don't have a CUDA GPU connected, you can leverage our notebooks in notebooks/.

  • Step 4. Install TigerDA

    • Install all Python requirements
    cd tiger/TigerDA
    pip install --upgrade -e .

    Demo:

    python examples/text_generation_augmenter_example.py 
    

πŸ“ Roadmap

  • Launch v0.0.1
  • Release TigerDA
  • Release TigerArmor
  • Add additional model support in TigerTune
  • Add perturbation-based augmenters in TigerDA
  • Release GPT Text Completion Models comparisions
  • TigerLab Safety dataset crowd sourcing program
  • TigerLab AI Safety Leaderboard for LLMs
  • TigerLab Leaderboard for dataset contributors
  • VectorDB for TigerRAG
  • WebApp

🫢 Contribute to TigerLab

Please check out our Contribution Guide!

For bug fixes and feature requests, please file a Github issue.

In addition to the mentioned roadmap, we also maintain a backlog at https://github.com/tigerlab-ai/tiger/issues.

πŸ’ͺ Contributors

🎲 Community

πŸ“ Citation

@misc{TigerLabAI_2023,
  title={TigerLab AI Repository},
  author={TigerLab AI},
  howpublished={GitHub. Available online: https://github.com/tigerlab-ai/tiger},
  year={2023}
}

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 factual and safety 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 trustworthy 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 precision and safety.

tiger's People

Contributors

gjyotin305 avatar habichta avatar leannezhang avatar lilinwang avatar pycui avatar tigerlab-ai avatar wendyran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiger's Issues

[Documentation] TigerTune: Document supported hyperparameters in README

Both textGenerationTransformersFineTuneEngine and textClassificationTransformersFineTuneEngine support a bunch of hyper parameters. They're only documented in the code, but not README:

hyperparameters (`Optional[Dict[str, Union[str, int, float]]]`):
and
hyperparameters (`Optional[Dict[str, Union[str, int, float]]]`):

It will be useful to also document these hyper parameters in TigerTune/README.md

[Enhancement] TigerTune: additional experiments

If you use TigerTune to finetuning with new dataset, we'll be exicited to learn your results. Feel free to add more examples and datasets in the tigertune/examples/ and tigertune/datasets folders.

Feel free to include your eval results together with the examples, in any format (diagram, txt, etc)

[Enhancement] TigerTune: Support more Llama2 and Falcon models

Currently, the logic tell if a model is Llama2 or Falcon is via hardcoded strings, like "tiiuae/falcon-7b", at

if base_model_id == "tiiuae/falcon-7b":
and
if self.base_model_id == "tiiuae/falcon-7b":
.

It would be useful to replace these hardcoded strings with a more systematic approach.

Reorganize Folders to TigerCore

To better organize the folders for better readability, now we've added TigerCommons folder, we would like to move the four major components (TigerArmor, TigerDA, TigerRag, TigerTune) into a folder called "TigerCore".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.