π πFramework for Trustworthy LLM development: RAG + FineTune + AI Safety Measurementππ
Request Safety Evaluation for your LLMs & Chatbots at β TigerLab.ai β
Details can be found at: Metrics Defination
Find more demos at TigerLab.ai
TigerRag.SDK.Demo.mp4
FineTune.mp4
![Untitled-2](https://private-user-images.githubusercontent.com/148816206/279892794-6616f960-1dc0-4e70-b44e-b34e20730152.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNTI4MTcsIm5iZiI6MTcyNDE1MjUxNywicGF0aCI6Ii8xNDg4MTYyMDYvMjc5ODkyNzk0LTY2MTZmOTYwLTFkYzAtNGU3MC1iNDRlLWIzNGUyMDczMDE1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMFQxMTE1MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ODM2OGRlODM2MzY2MDhjYzVlNDA3NjI5ZDQzZDhlOTFkMGRlY2RjN2U0ODQ3YWQyYTY5Y2NjNzY0MzdiNGY4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.PS1i3Uxz4MDJEejWQeam_IrGb_Yqv_mlzISezCCZD_A)
- 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
andDistilBERT
. - 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.
Before you begin setting up this project, please ensure you have completed the following tasks:
π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:
- Go to the OpenAI website and sign up for an account if you haven't already.
- Once you're logged in, navigate to the API keys page.
- Generate a new API key by clicking on the "Create API Key" button.
- Copy the API key and store it safely.
- Add the API key to your environment variable, e.g.
export OPENAI_API_KEY=<your API key>
-
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
- 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
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.
- Join us on Discord
@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.