From e767b6eba3340400be1bb682adc1dd0995df1088 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 29 Sep 2024 03:33:05 -0700 Subject: [PATCH] Update Documentation with flags to enable GPU on Khoj pip install - Use tabs for GPU/CPU type khoj being install on - Update CMAKE flags to use to install Khoj with correct GPU support Previous flags used DLLAMA, this has been updated to use DGGML now in llama.cpp --- documentation/docs/get-started/setup.mdx | 82 +++++++++++++++++------- src/khoj/main.py | 2 +- 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/documentation/docs/get-started/setup.mdx b/documentation/docs/get-started/setup.mdx index 4d479825..44d2ba06 100644 --- a/documentation/docs/get-started/setup.mdx +++ b/documentation/docs/get-started/setup.mdx @@ -124,39 +124,77 @@ Run the following command in your terminal to install the Khoj server. + + + ```shell +CMAKE_ARGS="-DGGML_METAL=on" python -m pip install khoj + ``` + + ```shell -# ARM/M1+ Machines -MAKE_ARGS="-DLLAMA_METAL=on" python -m pip install khoj - -# Intel Machines python -m pip install khoj ``` + + Run the following command in PowerShell on Windows - ```shell - # 1. (Optional) To use NVIDIA (CUDA) GPU - $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on" - # 1. (Optional) To use AMD (ROCm) GPU - $env:CMAKE_ARGS = "-DLLAMA_HIPBLAS=on" - # 1. (Optional) To use VULCAN GPU - $env:CMAKE_ARGS = "-DLLAMA_VULKAN=on" - + + + ```shell + # Install Khoj + py -m pip install khoj + ``` + + + ```shell + # 1. To use NVIDIA (CUDA) GPU + $env:CMAKE_ARGS = "-DGGML_CUDA=on" # 2. Install Khoj py -m pip install khoj ``` + + + ```shell + # 1. To use AMD (ROCm) GPU + $env:CMAKE_ARGS = "-DGGML_HIPBLAS=on" + # 2. Install Khoj + py -m pip install khoj + ``` + + + ```shell + # 1. To use VULCAN GPU + $env:CMAKE_ARGS = "-DGGML_VULKAN=on" + # 2. Install Khoj + py -m pip install khoj + ``` + + - ```shell - # CPU - python -m pip install khoj - # NVIDIA (CUDA) GPU - CMAKE_ARGS="DLLAMA_CUDA=on" FORCE_CMAKE=1 python -m pip install khoj - # AMD (ROCm) GPU - CMAKE_ARGS="-DLLAMA_HIPBLAS=on" FORCE_CMAKE=1 python -m pip install khoj - # VULCAN GPU - CMAKE_ARGS="-DLLAMA_VULKAN=on" FORCE_CMAKE=1 python -m pip install khoj - ``` + + + ```shell + python -m pip install khoj + ``` + + + ```shell + CMAKE_ARGS="-DGGML_CUDA=on" FORCE_CMAKE=1 python -m pip install khoj + ``` + + + ```shell + CMAKE_ARGS="-DGGML_HIPBLAS=on" FORCE_CMAKE=1 python -m pip install khoj + ``` + + + ```shell + CMAKE_ARGS="-DGGML_VULKAN=on" FORCE_CMAKE=1 python -m pip install khoj + ``` + + diff --git a/src/khoj/main.py b/src/khoj/main.py index 272c9bb8..a64813cc 100644 --- a/src/khoj/main.py +++ b/src/khoj/main.py @@ -1,4 +1,4 @@ -""" Main module for Khoj Assistant +""" Main module for Khoj isort:skip_file """