From 6930c5130cea935d36a9e02fa980f3eeaf7e451f Mon Sep 17 00:00:00 2001 From: Viswamedha Nalabotu Date: Wed, 19 Nov 2025 21:56:26 +0000 Subject: [PATCH] Added cuda for faster processing and moved document --- .../fNIRS_Glossary_Hardware.docx | Bin .../local-model-rag-implementation.ipynb | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) rename notebooks/{ => documents}/fNIRS_Glossary_Hardware.docx (100%) diff --git a/notebooks/fNIRS_Glossary_Hardware.docx b/notebooks/documents/fNIRS_Glossary_Hardware.docx similarity index 100% rename from notebooks/fNIRS_Glossary_Hardware.docx rename to notebooks/documents/fNIRS_Glossary_Hardware.docx diff --git a/notebooks/local-model-rag-implementation.ipynb b/notebooks/local-model-rag-implementation.ipynb index 2d2242e..8ea0169 100644 --- a/notebooks/local-model-rag-implementation.ipynb +++ b/notebooks/local-model-rag-implementation.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 7, "id": "4c312410", "metadata": {}, "outputs": [], @@ -24,18 +24,18 @@ "CONTEXT_SIZE = 8192\n", "EMBEDDER = \"all-MiniLM-L6-v2\"\n", "RAG_PATH = \"./build/rag_db\"\n", - "DOCS_PATH = \"fNIRS_Glossary_Hardware.docx\"" + "DOCS_PATH = \"./documents/fNIRS_Glossary_Hardware.docx\"" ] }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 8, "id": "90bae527", "metadata": {}, "outputs": [], "source": [ "\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", "client = PersistentClient(path = RAG_PATH)\n", "\n", @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 9, "id": "34efbc7c", "metadata": {}, "outputs": [], @@ -84,7 +84,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 10, "id": "ed2cc1ff", "metadata": {}, "outputs": [], @@ -119,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 11, "id": "6fa9fd10", "metadata": {}, "outputs": [ @@ -145,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 12, "id": "5a82353e", "metadata": {}, "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.'" ] }, - "execution_count": 38, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" }