dh-mc commited on
Commit
fabb1cc
·
1 Parent(s): 0d0811c

added submodule

Browse files
Files changed (3) hide show
  1. .gitattributes +0 -2
  2. README.md +11 -10
  3. ragas_extended +1 -0
.gitattributes CHANGED
@@ -35,5 +35,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  data/faiss_1024_512/index.faiss filter=lfs diff=lfs merge=lfs -text
37
  data/faiss_1024_512/index.pkl filter=lfs diff=lfs merge=lfs -text
38
- data/chromadb_1024_512/9ccc1a9f-e406-4855-be51-a5d2aa027345 filter=lfs diff=lfs merge=lfs -text
39
- data/chromadb_1024_512/chroma.sqlite3 filter=lfs diff=lfs merge=lfs -text
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  data/faiss_1024_512/index.faiss filter=lfs diff=lfs merge=lfs -text
37
  data/faiss_1024_512/index.pkl filter=lfs diff=lfs merge=lfs -text
 
 
README.md CHANGED
@@ -25,6 +25,7 @@ Tech stack used includes LangChain, Gradio, Chroma and FAISS.
25
 
26
  1. Check pre-conditions:
27
 
 
28
  - Run `python --version` to make sure you're running Python version 3.10 or above.
29
  - The latest PyTorch with GPU support must have been installed. Here is a sample `conda` command:
30
  ```
@@ -38,12 +39,14 @@ sudo apt install cmake
38
  2. Clone the repo
39
 
40
  ```
41
- git clone https://github.com/smu-ai/Evaluation-of-Orca-2-Models-for-Conversational-RAG.git
 
42
  ```
43
 
44
 
45
  3. Install packages
46
 
 
47
  On Linux/WSL2:
48
  ```
49
  pip install -r requirements.txt
@@ -68,7 +71,7 @@ python app.py
68
 
69
  ## Talk to Your Own PDF Files
70
 
71
- - The sample PDF files are downloaded from [PCI DSS official website](https://www.pcisecuritystandards.org/document_library/?category=pcidss) and the corresponding embeddings are stored in folder `data/faiss_1024_512` with FAISS format, which allows you to run locally without any additional effort.
72
 
73
  - You can also put your own PDF files into any folder specified in `SOURCE_PDFS_PATH` and run the command below to generate embeddings which will be stored in folder `FAISS_INDEX_PATH` or `CHROMADB_INDEX_PATH`. If both `*_INDEX_PATH` env vars are set, `FAISS_INDEX_PATH` takes precedence. Make sure the folder specified by `*_INDEX_PATH` doesn't exist; other wise the command will simply try to load index from the folder and do a simple similarity search, as a way to verify if embeddings are generated and stored properly. Please note the HuggingFace Embedding model specified by `HF_EMBEDDINGS_MODEL_NAME` will be used to generate the embeddings.
74
 
@@ -87,29 +90,27 @@ The source code supports different LLM types - as shown at the top of `.env.exam
87
  # LLM_MODEL_TYPE=gpt4all-j
88
  # LLM_MODEL_TYPE=gpt4all
89
  # LLM_MODEL_TYPE=llamacpp
90
- LLM_MODEL_TYPE=huggingface
91
  # LLM_MODEL_TYPE=mosaicml
92
  # LLM_MODEL_TYPE=stablelm
93
  # LLM_MODEL_TYPE=openllm
94
- # LLM_MODEL_TYPE=hftgi
95
  ```
96
 
97
- - By default, the app runs `lmsys/fastchat-t5-3b-v1.0` model with HF Transformers, which works well with most PCs/laptops with 32GB or more RAM, without any GPU. It also works on HF Spaces with their free-tier: 2 vCPU, 16GB RAM and 500GB hard disk, though the inference speed is very slow.
98
 
99
  - Uncomment/comment the above to play with different LLM types. You may also want to update other related env vars. E.g., here's the list of HF models which have been tested with the code:
100
 
101
  ```
102
- # HUGGINGFACE_MODEL_NAME_OR_PATH="databricks/dolly-v2-3b"
103
- # HUGGINGFACE_MODEL_NAME_OR_PATH="databricks/dolly-v2-7b"
104
- # HUGGINGFACE_MODEL_NAME_OR_PATH="databricks/dolly-v2-12b"
105
  # HUGGINGFACE_MODEL_NAME_OR_PATH="TheBloke/wizardLM-7B-HF"
106
  # HUGGINGFACE_MODEL_NAME_OR_PATH="TheBloke/vicuna-7B-1.1-HF"
107
  # HUGGINGFACE_MODEL_NAME_OR_PATH="nomic-ai/gpt4all-j"
108
  # HUGGINGFACE_MODEL_NAME_OR_PATH="nomic-ai/gpt4all-falcon"
109
- HUGGINGFACE_MODEL_NAME_OR_PATH="lmsys/fastchat-t5-3b-v1.0"
110
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-7b-chat-hf"
111
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-13b-chat-hf"
112
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-70b-chat-hf"
113
  ```
114
 
115
- The script `test.sh` automates running different LLMs and records the outputs in `data/logs` folder which currently contains a few log files created by previous test runs on Nvidia GeForce RTX 4090, A40 and L40 GPUs.
 
25
 
26
  1. Check pre-conditions:
27
 
28
+ - [Git Large File Storage (LFS)](https://git-lfs.com/) must have been installed.
29
  - Run `python --version` to make sure you're running Python version 3.10 or above.
30
  - The latest PyTorch with GPU support must have been installed. Here is a sample `conda` command:
31
  ```
 
39
  2. Clone the repo
40
 
41
  ```
42
+ git lfs install
43
+ git clone --recursive https://github.com/smu-ai/Evaluation-of-Orca-2-Models-for-Conversational-RAG.git
44
  ```
45
 
46
 
47
  3. Install packages
48
 
49
+
50
  On Linux/WSL2:
51
  ```
52
  pip install -r requirements.txt
 
71
 
72
  ## Talk to Your Own PDF Files
73
 
74
+ - The sample PDF files are downloaded from [PCI DSS official website](https://www.pcisecuritystandards.org/document_library/?category=pcidss) and the corresponding embeddings are stored in folders `data/chromadb_1024_512` and `data/faiss_1024_512` with Chroma & FAISS formats respectively, which allows you to run locally without any additional effort.
75
 
76
  - You can also put your own PDF files into any folder specified in `SOURCE_PDFS_PATH` and run the command below to generate embeddings which will be stored in folder `FAISS_INDEX_PATH` or `CHROMADB_INDEX_PATH`. If both `*_INDEX_PATH` env vars are set, `FAISS_INDEX_PATH` takes precedence. Make sure the folder specified by `*_INDEX_PATH` doesn't exist; other wise the command will simply try to load index from the folder and do a simple similarity search, as a way to verify if embeddings are generated and stored properly. Please note the HuggingFace Embedding model specified by `HF_EMBEDDINGS_MODEL_NAME` will be used to generate the embeddings.
77
 
 
90
  # LLM_MODEL_TYPE=gpt4all-j
91
  # LLM_MODEL_TYPE=gpt4all
92
  # LLM_MODEL_TYPE=llamacpp
93
+ # LLM_MODEL_TYPE=huggingface
94
  # LLM_MODEL_TYPE=mosaicml
95
  # LLM_MODEL_TYPE=stablelm
96
  # LLM_MODEL_TYPE=openllm
97
+ LLM_MODEL_TYPE=hftgi
98
  ```
99
 
100
+ - By default, the app runs `microsoft/orca-2-13b` model with HF Text Generation Interface, which runs on a research server and might be down from time to time.
101
 
102
  - Uncomment/comment the above to play with different LLM types. You may also want to update other related env vars. E.g., here's the list of HF models which have been tested with the code:
103
 
104
  ```
105
+ # HUGGINGFACE_MODEL_NAME_OR_PATH="microsoft/orca-2-7b"
106
+ HUGGINGFACE_MODEL_NAME_OR_PATH="microsoft/orca-2-13b"
 
107
  # HUGGINGFACE_MODEL_NAME_OR_PATH="TheBloke/wizardLM-7B-HF"
108
  # HUGGINGFACE_MODEL_NAME_OR_PATH="TheBloke/vicuna-7B-1.1-HF"
109
  # HUGGINGFACE_MODEL_NAME_OR_PATH="nomic-ai/gpt4all-j"
110
  # HUGGINGFACE_MODEL_NAME_OR_PATH="nomic-ai/gpt4all-falcon"
111
+ # HUGGINGFACE_MODEL_NAME_OR_PATH="lmsys/fastchat-t5-3b-v1.0"
112
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-7b-chat-hf"
113
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-13b-chat-hf"
114
  # HUGGINGFACE_MODEL_NAME_OR_PATH="meta-llama/Llama-2-70b-chat-hf"
115
  ```
116
 
 
ragas_extended ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit 5252cc877da5feedaaf73005e07f35469ef37089