Coder Social home page Coder Social logo

private-ai's Introduction

Darkside

πŸš€ Welcome to Private-AI!

Private-AI is an innovative AI project designed for asking questions about your documents using powerful Large Language Models (LLMs). The unique feature? It works offline, ensuring 100% privacy with no data leaving your environment.

🌐 What does Private-AI offer?

  • High-level API: Abstracts the complexity of a Retrieval Augmented Generation (RAG) pipeline. Handles document ingestion, chat, and completions.

  • Low-level API: For advanced users to implement custom pipelines. Includes features like embeddings generation and contextual chunks retrieval.

🌟 Why Private-AI?

Privacy is the key motivator! Private-AI addresses concerns in data-sensitive domains like healthcare and legal, ensuring your data stays under your control.

πŸ€– installation


Private-Ai Installation Guide

Base Requirements:

  • Git clone Private-Ai repository:

    git clone https://github.com/AryanVBW/Private-Ai
    cd Private-Ai
  • Install Python 3.11 (or 3.12)

  • Using apt(Debian base linux like-kali,Ubantu etc. )

    sudo apt-get install python3.11
  • Using pyenv:

    pyenv install 3.11
    pyenv local 3.11
  • Install Poetry for dependency management.

  pip3 install poetry

Dependencies Installation:

  • Install make (OSX: brew install make, Windows: choco install make).
  • Install dependencies:
    poetry install --with ui

Local LLM Setup:

  • Install extra dependencies for local execution:
    poetry install --with local
  • Use the setup script to download embedding and LLM models:
    poetry run python scripts/setup

Verification:

  • Run make run or poetry run python -m private_gpt.
  • Open http://localhost:8001 to see Gradio UI with a mock LLM echoing input.

πŸ‘πŸ‘All Done πŸ‘πŸ‘

For GPU utilization and customization, follow the steps below:

  • For Private-Ai to run fully locally GPU acceleration is required (CPU execution is possible, but very slow)

Customization:

  • Customize low-level parameters in private_gpt/components/llm/llm_component.py.
  • Configure LLM options in settings.yaml.

GPU Support:

  • OSX: Build llama.cpp with Metal support.

    CMAKE_ARGS="-DLLAMA_METAL=on" pip install --force-reinstall --no-cache-dir llama-cpp-python
  • Windows NVIDIA GPU: Install VS2022, CUDA toolkit, and run:

    $env:CMAKE_ARGS='-DLLAMA_CUBLAS=on'; poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python
  • Linux NVIDIA GPU and Windows-WSL: Install CUDA toolkit and run:

    CMAKE_ARGS='-DLLAMA_CUBLAS=on' poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python

Troubleshooting:

  • Check GPU support and dependencies for your platform.
  • For C++ compiler issues, follow troubleshooting steps.

Note: If any issues, retry in verbose mode with -vvv during installations.

Troubleshooting C++ Compiler:

  • Windows 10/11: Install Visual Studio 2022 and MinGW.
  • OSX: Ensure Xcode is installed or install clang/gcc with Homebrew.

🧩 Architecture Highlights:

  • FastAPI-Based API: Follows the OpenAI API standard, making it easy to integrate.

  • LlamaIndex Integration: Leverages LlamaIndex for the RAG pipeline, providing flexibility and extensibility.

  • Present and Future: Evolving into a gateway for generative AI models and primitives. Stay tuned for exciting new features!

πŸ’‘ How to Contribute?

Contributions are welcome! Check the ProjectBoard for ideas. Ensure code quality with format and typing checks (run make check).

πŸ€—Supporters:

Supported by Qdrant, Fern, and LlamaIndex. Influenced by projects like LangChain, GPT4All, LlamaCpp, Chroma, and SentenceTransformers.

πŸ‘ Thank you for contributing to the future of private and powerful AI with Private-AI! πŸ“ License: Apache-2.0

Copyright Notice

This is a modified version of PrivateGPT. All rights and licenses belong to the PrivateGPT team.

Β© 2023 PrivateGPT Developers. All rights reserved.

private-ai's People

Contributors

imartinez avatar aryanvbw avatar lopagela avatar pabloogc avatar r-y-m-r avatar alxspiker avatar maozdemir avatar jiangzhuo avatar mdeweerd avatar andreakiro avatar fabio3rs avatar tech1shop avatar github-actions[bot] avatar ivan-ontruck avatar abhiruka avatar elicherla01 avatar doskoi avatar hikalucrezia avatar parampavar avatar milescattini avatar sorin avatar gianniacquisto avatar frangsierra avatar vilaca avatar ishaandatta avatar nb-programmer avatar zishon89us avatar vaiton avatar shivam250702 avatar 0xsaurabhx avatar

Watchers

 avatar

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.