Added cuda for faster processing and moved document

This commit is contained in:
Viswamedha Nalabotu 2025-11-19 21:56:26 +00:00
parent d45c4efac4
commit 6930c5130c
2 changed files with 9 additions and 9 deletions

View file

@ -10,7 +10,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 33, "execution_count": 7,
"id": "4c312410", "id": "4c312410",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -24,18 +24,18 @@
"CONTEXT_SIZE = 8192\n", "CONTEXT_SIZE = 8192\n",
"EMBEDDER = \"all-MiniLM-L6-v2\"\n", "EMBEDDER = \"all-MiniLM-L6-v2\"\n",
"RAG_PATH = \"./build/rag_db\"\n", "RAG_PATH = \"./build/rag_db\"\n",
"DOCS_PATH = \"fNIRS_Glossary_Hardware.docx\"" "DOCS_PATH = \"./documents/fNIRS_Glossary_Hardware.docx\""
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 34, "execution_count": 8,
"id": "90bae527", "id": "90bae527",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"\n", "\n",
"model = GPT4All(model_name = MODEL, n_ctx = CONTEXT_SIZE, allow_download = True)\n", "model = GPT4All(model_name = MODEL, n_ctx = CONTEXT_SIZE, allow_download = True, device = \"cuda\")\n",
"embedder = SentenceTransformer(EMBEDDER)\n", "embedder = SentenceTransformer(EMBEDDER)\n",
"client = PersistentClient(path = RAG_PATH)\n", "client = PersistentClient(path = RAG_PATH)\n",
"\n", "\n",
@ -61,7 +61,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 35, "execution_count": 9,
"id": "34efbc7c", "id": "34efbc7c",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -84,7 +84,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": 10,
"id": "ed2cc1ff", "id": "ed2cc1ff",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -119,7 +119,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 37, "execution_count": 11,
"id": "6fa9fd10", "id": "6fa9fd10",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -145,7 +145,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 38, "execution_count": 12,
"id": "5a82353e", "id": "5a82353e",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -155,7 +155,7 @@
"'Frequency-domain (FD) multidistance NIRS technique can estimate absolute values of absorption and scattering of the medium, and subsequently chromophore concentrations.'" "'Frequency-domain (FD) multidistance NIRS technique can estimate absolute values of absorption and scattering of the medium, and subsequently chromophore concentrations.'"
] ]
}, },
"execution_count": 38, "execution_count": 12,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }