sabeeralikp/llama_flow

7

stars

84

commits

Python

primary language

May 28, 2024

updated

README

llama_flow Logo

πŸ¦™βœ¨ llama_flow

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub release downloads

llama_flow is an open-source application designed to develop and customize Retrieval-Augmented Generation (RAG) workflows without code. Easily run it locally using a variety of open-source and closed-source large language models, vector databases, embedding models, and chunking strategies.

πŸš€ Features

πŸ–₯️ Frontend

πŸ› οΈ Backend

Supported Components

Basic RAG Workflow

WorkflowStatus
Default with Huggingfaceβœ…
Support for llamacpp and ollamaβœ…

Vector DB

Vector DBStatus
chromadbβœ…
waviate⏳
faiss⏳
qdrant⏳

Embed Model Provider

Embed Model ProviderStatus
Huggingfaceβœ…
Ollama⏳
OpenAI⏳
Cohere⏳

Embed Models (Huggingface)

LLM Providers

LLM ProviderStatus
Huggingfaceβœ…
llamacppβœ…
ollamaβœ…
Huggingface API⏳
OpenAI⏳
Cohere⏳

Huggingface LLMs

llamacpp LLMs

llamacpp LLMStatus
llama2-7bβœ…
llama2-13bβœ…
llama3-8bβœ…

ollama LLMs

ollama LLMStatus
llama3βœ…
phi3βœ…
mistralβœ…
neural-chatβœ…
starling-lmβœ…
codellamaβœ…
gemma:2bβœ…
gemma:7bβœ…
solarβœ…

Chunking Strategy

Chunking StrategyStatus
semantic-splittingβœ…
simple-node-parser⏳
sentence-splitting⏳
sentence-window⏳
token-splitting⏳
hierarchical-splitting⏳

Planned Features

  • Advanced RAG workflow (See illustration below)
  • Custom workflow with drag-and-drop functionality
Advanced RAG Workflow

πŸ› οΈ Installation

1. Frontend UI Application

Download the desktop application for your OS:

2. Backend Configuration

Option 1: Dockerized Backend

  1. Clone the repo
    git clone https://github.com/sabeeralikp/llama_flow.git
    cd llama_flow
    
  2. Build and Run Docker Container
    docker build -t llama_flow_image . 
    docker run -d --name llama_flow_container -p 8000:8000 llama_flow_image
    

Option 2: Manual Setup with FastAPI

  1. Clone the repo
    git clone https://github.com/sabeeralikp/llama_flow.git
    cd llama_flow
    
  2. Create a virtual environment
    python -m venv env
    source env/bin/activate   # On Windows use `env\Scripts\activate`
    
  3. Install necessary packages
    pip install -r requirements.txt
    
  4. Run the backend with Uvicorn
    uvicorn main:app --workers 4
    

Option 3: Colab/Kaggle Notebooks

Instructions:

  1. Create a Ngrok account.
  2. Go to the Ngrok dashboard, create an auth tunnel, copy the auth token, and paste it into Colab.
  3. Open the notebook file in Colab and run all cells.
  4. Copy the external link from the cell output.
  5. Open the desktop application, go to settings, change the backend to remote, and paste the copied external domain link in the base URL text field.

Additional Backend Configurations

Using llamacpp

pip install -q llama-cpp-python \
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu122  # For CUDA version 12.2
pip install -q llama_index llama-index-llms-llama-cpp

Using Ollama

Follow the official Ollama installation guide for different devices.

apt install lshw
curl -fsSL https://ollama.com/install.sh | sh
pip install -q llama-index-llms-ollama

🀝 Contribution Guidelines

We welcome all contributions to improve llama_flow. Please follow these steps:

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature-branch
    
  3. Commit your changes
    git commit -m 'Add some feature'
    
  4. Push to the branch
    git push origin feature-branch
    
  5. Create a new Pull Request

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


Stay tuned for exciting updates! πŸš€βœ¨

Contributors

sabeeralikp

77 commits

ADeeBz23

7 commits

sabeeralikp/llama_flow

7

stars

84

commits

Python

primary language

May 28, 2024

updated

README

llama_flow Logo

πŸ¦™βœ¨ llama_flow

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub release downloads

llama_flow is an open-source application designed to develop and customize Retrieval-Augmented Generation (RAG) workflows without code. Easily run it locally using a variety of open-source and closed-source large language models, vector databases, embedding models, and chunking strategies.

πŸš€ Features

πŸ–₯️ Frontend

πŸ› οΈ Backend

Supported Components

Basic RAG Workflow

WorkflowStatus
Default with Huggingfaceβœ…
Support for llamacpp and ollamaβœ…

Vector DB

Vector DBStatus
chromadbβœ…
waviate⏳
faiss⏳
qdrant⏳

Embed Model Provider

Embed Model ProviderStatus
Huggingfaceβœ…
Ollama⏳
OpenAI⏳
Cohere⏳

Embed Models (Huggingface)

LLM Providers

LLM ProviderStatus
Huggingfaceβœ…
llamacppβœ…
ollamaβœ…
Huggingface API⏳
OpenAI⏳
Cohere⏳

Huggingface LLMs

llamacpp LLMs

llamacpp LLMStatus
llama2-7bβœ…
llama2-13bβœ…
llama3-8bβœ…

ollama LLMs

ollama LLMStatus
llama3βœ…
phi3βœ…
mistralβœ…
neural-chatβœ…
starling-lmβœ…
codellamaβœ…
gemma:2bβœ…
gemma:7bβœ…
solarβœ…

Chunking Strategy

Chunking StrategyStatus
semantic-splittingβœ…
simple-node-parser⏳
sentence-splitting⏳
sentence-window⏳
token-splitting⏳
hierarchical-splitting⏳

Planned Features

  • Advanced RAG workflow (See illustration below)
  • Custom workflow with drag-and-drop functionality
Advanced RAG Workflow

πŸ› οΈ Installation

1. Frontend UI Application

Download the desktop application for your OS:

2. Backend Configuration

Option 1: Dockerized Backend

  1. Clone the repo
    git clone https://github.com/sabeeralikp/llama_flow.git
    cd llama_flow
    
  2. Build and Run Docker Container
    docker build -t llama_flow_image . 
    docker run -d --name llama_flow_container -p 8000:8000 llama_flow_image
    

Option 2: Manual Setup with FastAPI

  1. Clone the repo
    git clone https://github.com/sabeeralikp/llama_flow.git
    cd llama_flow
    
  2. Create a virtual environment
    python -m venv env
    source env/bin/activate   # On Windows use `env\Scripts\activate`
    
  3. Install necessary packages
    pip install -r requirements.txt
    
  4. Run the backend with Uvicorn
    uvicorn main:app --workers 4
    

Option 3: Colab/Kaggle Notebooks

Instructions:

  1. Create a Ngrok account.
  2. Go to the Ngrok dashboard, create an auth tunnel, copy the auth token, and paste it into Colab.
  3. Open the notebook file in Colab and run all cells.
  4. Copy the external link from the cell output.
  5. Open the desktop application, go to settings, change the backend to remote, and paste the copied external domain link in the base URL text field.

Additional Backend Configurations

Using llamacpp

pip install -q llama-cpp-python \
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu122  # For CUDA version 12.2
pip install -q llama_index llama-index-llms-llama-cpp

Using Ollama

Follow the official Ollama installation guide for different devices.

apt install lshw
curl -fsSL https://ollama.com/install.sh | sh
pip install -q llama-index-llms-ollama

🀝 Contribution Guidelines

We welcome all contributions to improve llama_flow. Please follow these steps:

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature-branch
    
  3. Commit your changes
    git commit -m 'Add some feature'
    
  4. Push to the branch
    git push origin feature-branch
    
  5. Create a new Pull Request

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


Stay tuned for exciting updates! πŸš€βœ¨

Contributors

sabeeralikp

77 commits

ADeeBz23

7 commits

Languages

Python

84.9%

Jupyter Notebook

14.1%

Dockerfile

1.0%