conda create -n mindbot python=3.8 -y
- Locate your Anaconda installed folder in your windows machine and head straight to the script folder.
- Now copy the absolute path and put it in you environment variable (Adding only the "C:...\anaconda3\Scripts" directory to the system PATH is generally safer than adding the entire Anaconda installation directory.)
- Now run
conda create -n yourenvname
- Now activate the env by using
conda activate yourenvname
- If you face any conda init error simply run
conda init bash
and close the git bash from your vscode and rerun step 4 - Run
pip install -r requirements.txt
- Ctransformers is needed because I will run this model in cpu so we need ctransformers to load the quantized model. and also I will be using langchain so that's why this package is needed.
- Sentence-Transformer is for embedding purpose. It's opensource and free.
- Pinecone for the vector database.
- Langchain - A framework that empowers developers to create data-aware and agentic applications using language models.
- Python Flask for front-end development
llama-2-7b-chat.ggmlv3.q4_0.bin from here: https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/tree/main
from here: https://app.pinecone.io/
- We've tested around ~102 pages of PDF file(4.2MB) to perform summarization, NER and LDA(Topic Modeler) to workout the
main_query
andcontext_queries
in json format which took around 13mins 37seconds on a T4 GPU of 15GiB. - Then the json is being feeded into the Llama2 model for question-answering to check the performance.
- The performance is much more better with the RAG modeling than just feeding the complete RAW pdf file into the Llama2.