Giter Site home page Giter Site logo

imvision12 / rag-llamaindex Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 19 KB

Chat with your PDF files using LLM model and VectorDatabase

License: MIT License

Python 100.00%
langchain llama2 llamaindex llm vector-database huggingface sentence-transformers

rag-llamaindex's Introduction

RAG-LlamaIndex

RAG-LlamaIndex is a project aimed at leveraging RAG (Retriever, Reader, Generator) architecture along with Llama-2 and sentence transformers to create an efficient search and summarization tool for PDF documents. This tool allows users to query information from PDF files using natural language and obtain relevant answers or summaries.

Sample Input and Output

The data utilized in this scenario were research papers on Llama and Gemma.

Query: Which GPU was used to train LLaMA-65B? Output :

Loading checkpoint shards: 100% 2/2 [01:02<00:00, 31.34s/it]
LLM Output: LLaMA-65B was trained on A100-80GB.

Query: What is count of Embedding Parameters for gemma-2b and gemma-7b? Output :

Loading checkpoint shards: 100% 2/2 [01:02<00:00, 31.34s/it]
According to the context information, the count of embedding parameters for gemma-2b is 524,550,144, and for gemma-7b, it is 786,825,216.

Setup ๐Ÿ’ป

  1. Clone Github Repo:
$ git clone https://github.com/IMvision12/RAG-LlamaIndex.git
$ cd RAG-LlamaIndex
  1. Install Libraries
$ pip install -r requirements.txt
  1. Get PDF data

The provided links will download pdf files, which will then be stored in a folder named "data". If you have your own PDF files, please relocate them to the "data" folder.

$ python utils.py --links https://arxiv.org/pdf/2302.13971 https://arxiv.org/pdf/2403.08295
  1. Run Main.py
$python main.py --data-directory "/content/RAG-LlamaIndex/data" \
                --llm-model "meta-llama/Llama-2-7b-chat-hf" \
                --embed-model "sentence-transformers/all-mpnet-base-v2" \
                --hf-api "Your HuggingFace Access Token" \
                --query "Enter your Query!"

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.