This repo contains all code for running a paper explained by AI given a user input. This was made at its simplest level with no UI, just running commands.
Demonstration of understanding
- Run
download_model.shto first download 'Meta-Llama-3-8B-Instruct.Q2_K' locally given that you created a HuggingFace account. This will also create amodels/llama3nested file. - Run
file_manager.pyto insert your target research paper. Only one file can be read at a given time. This will create adata/papersnested file. - Run
run_indexer.pyto embed the target research paper. This will create a vector store which will be using by the LLM later on.run_indexer.pyuses subcomponents fromsrc/indexer/subcomponentsModels/Algo employed for this task:- Langchain Recursive Text Splitter
- FAISS
- Sentence Transformer: all-MiniLM-L6-v2
- Run
main.pywhich orchestrates everything together
Do keep in mind that this serves as a POC for future project as many improvements are planned to be done.
src contains main working directories: indexer, retriever, llm
indexer
Contains components used to build indexer: subcomponent directory, paper_indexer.py which puts all subcomponents together
retriever
Contains vec_loader and vec_retriever which are used for model RAG
llm
Contains components loading the LLM and what it output.
- Loads the model
load_local_model.py - Reads paper and answers with
paper_reader.py prompt.pyMain prompt for confining the LLMcitator.pyprovides sources of where the information was found