Giter Club home page Giter Club logo

local_llama's Introduction

Local Llama

This project enables you to chat with your PDFs, TXT files, or Docx files entirely offline, free from OpenAI dependencies. It's an evolution of the gpt_chatwithPDF project, now leveraging local LLMs for enhanced privacy and offline functionality.

Features

  • Offline operation: Run in airplane mode
  • Local LLM integration: Uses Ollama for improved performance
  • Multiple file format support: PDF, TXT, DOCX, MD
  • Persistent vector database: Reusable indexed documents
  • Streamlit-based user interface

New Updates

  • Ollama integration for significant performance improvements
  • Uses nomic-embed-text and llama3:8b models (can be changed to your liking)
  • Upgraded to Haystack 2.0
  • Persistent Chroma vector database to enable re-use of previously updloaded docs

Installation

  1. Install Ollama from https://ollama.ai/download
  2. Clone this repository
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Pull required Ollama models:
    ollama pull nomic-embed-text
    ollama pull llama3:8b
    

Usage

  1. Start the Ollama server:
    ollama serve
    
  2. Run the Streamlit app:
    python -m streamlit run local_llama_v3.py
    
  3. Upload your documents and start chatting!

How It Works

  1. Document Indexing: Uploaded files are processed, split, and embedded using Ollama.
  2. Vector Storage: Embeddings are stored in a local Chroma vector database.
  3. Query Processing: User queries are embedded and relevant document chunks are retrieved.
  4. Response Generation: Ollama generates responses based on the retrieved context and chat history.

License

This project is licensed under the Apache 2.0 License.

Acknowledgements

  • Ollama team for their excellent local LLM solution
  • Haystack for providing the RAG framework
  • The-Bloke for the GGUF models

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.