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
This commit is contained in:
Debanjum Singh Solanky 2024-09-29 03:33:05 -07:00
parent 63a2b5b3c4
commit e767b6eba3
2 changed files with 61 additions and 23 deletions

View file

@ -124,40 +124,78 @@ Run the following command in your terminal to install the Khoj server.
<Tabs groupId="operating-systems" queryString="os">
<TabItem value="macos" label="MacOS">
<Tabs groupId="gpu" queryString="gpu">
<TabItem value="arm" label="ARM/M1+">
```shell
CMAKE_ARGS="-DGGML_METAL=on" python -m pip install khoj
```
</TabItem>
<TabItem value="intel" label="Intel">
```shell
# ARM/M1+ Machines
MAKE_ARGS="-DLLAMA_METAL=on" python -m pip install khoj
# Intel Machines
python -m pip install khoj
```
</TabItem>
</Tabs>
</TabItem>
<TabItem value="windows" label="Windows">
Run the following command in PowerShell on Windows
<Tabs groupId="gpu" queryString="gpu">
<TabItem value="cpu" label="CPU">
```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"
# Install Khoj
py -m pip install khoj
```
</TabItem>
<TabItem value="nvidia" label="NVIDIA (CUDA) GPU">
```shell
# 1. To use NVIDIA (CUDA) GPU
$env:CMAKE_ARGS = "-DGGML_CUDA=on"
# 2. Install Khoj
py -m pip install khoj
```
</TabItem>
<TabItem value="linux" label="Linux">
<TabItem value="amd" label="AMD (ROCm) GPU">
```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
# 1. To use AMD (ROCm) GPU
$env:CMAKE_ARGS = "-DGGML_HIPBLAS=on"
# 2. Install Khoj
py -m pip install khoj
```
</TabItem>
<TabItem value="vulkan" label="VULKAN GPU">
```shell
# 1. To use VULCAN GPU
$env:CMAKE_ARGS = "-DGGML_VULKAN=on"
# 2. Install Khoj
py -m pip install khoj
```
</TabItem>
</Tabs>
</TabItem>
<TabItem value="linux" label="Linux">
<Tabs groupId="gpu" queryString="gpu">
<TabItem value="cpu" label="CPU">
```shell
python -m pip install khoj
```
</TabItem>
<TabItem value="nvidia" label="NVIDIA (CUDA) GPU">
```shell
CMAKE_ARGS="-DGGML_CUDA=on" FORCE_CMAKE=1 python -m pip install khoj
```
</TabItem>
<TabItem value="amd" label="AMD (ROCm) GPU">
```shell
CMAKE_ARGS="-DGGML_HIPBLAS=on" FORCE_CMAKE=1 python -m pip install khoj
```
</TabItem>
<TabItem value="vulkan" label="VULKAN GPU">
```shell
CMAKE_ARGS="-DGGML_VULKAN=on" FORCE_CMAKE=1 python -m pip install khoj
```
</TabItem>
</Tabs>
</TabItem>
</Tabs>
<h3>4. Start Khoj Server</h3>

View file

@ -1,4 +1,4 @@
""" Main module for Khoj Assistant
""" Main module for Khoj
isort:skip_file
"""