@@ -64,13 +64,13 @@ All `llama.cpp` cmake build options can be set via the `CMAKE_ARGS` environment
64
64
65
65
``` bash
66
66
# Linux and Mac
67
- CMAKE_ARGS=" -DLLAMA_BLAS =ON -DLLAMA_BLAS_VENDOR =OpenBLAS" \
67
+ CMAKE_ARGS=" -DGGML_BLAS =ON -DGGML_BLAS_VENDOR =OpenBLAS" \
68
68
pip install llama-cpp-python
69
69
```
70
70
71
71
``` powershell
72
72
# Windows
73
- $env:CMAKE_ARGS = "-DLLAMA_BLAS =ON -DLLAMA_BLAS_VENDOR =OpenBLAS"
73
+ $env:CMAKE_ARGS = "-DGGML_BLAS =ON -DGGML_BLAS_VENDOR =OpenBLAS"
74
74
pip install llama-cpp-python
75
75
```
76
76
</details >
@@ -83,13 +83,13 @@ They can also be set via `pip install -C / --config-settings` command and saved
83
83
``` bash
84
84
pip install --upgrade pip # ensure pip is up to date
85
85
pip install llama-cpp-python \
86
- -C cmake.args=" -DLLAMA_BLAS =ON;-DLLAMA_BLAS_VENDOR =OpenBLAS"
86
+ -C cmake.args=" -DGGML_BLAS =ON;-DGGML_BLAS_VENDOR =OpenBLAS"
87
87
```
88
88
89
89
``` txt
90
90
# requirements.txt
91
91
92
- llama-cpp-python -C cmake.args="-DLLAMA_BLAS =ON;-DLLAMA_BLAS_VENDOR =OpenBLAS"
92
+ llama-cpp-python -C cmake.args="-DGGML_BLAS =ON;-DGGML_BLAS_VENDOR =OpenBLAS"
93
93
```
94
94
95
95
</details >
@@ -101,20 +101,20 @@ Below are some common backends, their build commands and any additional environm
101
101
<details open >
102
102
<summary >OpenBLAS (CPU)</summary >
103
103
104
- To install with OpenBLAS, set the ` LLAMA_BLAS ` and ` LLAMA_BLAS_VENDOR ` environment variables before installing:
104
+ To install with OpenBLAS, set the ` GGML_BLAS ` and ` GGML_BLAS_VENDOR ` environment variables before installing:
105
105
106
106
``` bash
107
- CMAKE_ARGS=" -DLLAMA_BLAS =ON -DLLAMA_BLAS_VENDOR =OpenBLAS" pip install llama-cpp-python
107
+ CMAKE_ARGS=" -DGGML_BLAS =ON -DGGML_BLAS_VENDOR =OpenBLAS" pip install llama-cpp-python
108
108
```
109
109
</details >
110
110
111
111
<details >
112
112
<summary >CUDA</summary >
113
113
114
- To install with CUDA support, set the ` LLAMA_CUDA =on` environment variable before installing:
114
+ To install with CUDA support, set the ` GGML_CUDA =on` environment variable before installing:
115
115
116
116
``` bash
117
- CMAKE_ARGS=" -DLLAMA_CUDA =on" pip install llama-cpp-python
117
+ CMAKE_ARGS=" -DGGML_CUDA =on" pip install llama-cpp-python
118
118
```
119
119
120
120
** Pre-built Wheel (New)**
@@ -147,10 +147,10 @@ pip install llama-cpp-python \
147
147
<details >
148
148
<summary >Metal</summary >
149
149
150
- To install with Metal (MPS), set the ` LLAMA_METAL =on` environment variable before installing:
150
+ To install with Metal (MPS), set the ` GGML_METAL =on` environment variable before installing:
151
151
152
152
``` bash
153
- CMAKE_ARGS=" -DLLAMA_METAL =on" pip install llama-cpp-python
153
+ CMAKE_ARGS=" -DGGML_METAL =on" pip install llama-cpp-python
154
154
```
155
155
156
156
** Pre-built Wheel (New)**
@@ -170,54 +170,54 @@ pip install llama-cpp-python \
170
170
<details >
171
171
<summary >hipBLAS (ROCm)</summary >
172
172
173
- To install with hipBLAS / ROCm support for AMD cards, set the ` LLAMA_HIPBLAS =on` environment variable before installing:
173
+ To install with hipBLAS / ROCm support for AMD cards, set the ` GGML_HIPBLAS =on` environment variable before installing:
174
174
175
175
``` bash
176
- CMAKE_ARGS=" -DLLAMA_HIPBLAS =on" pip install llama-cpp-python
176
+ CMAKE_ARGS=" -DGGML_HIPBLAS =on" pip install llama-cpp-python
177
177
```
178
178
179
179
</details >
180
180
181
181
<details >
182
182
<summary >Vulkan</summary >
183
183
184
- To install with Vulkan support, set the ` LLAMA_VULKAN =on` environment variable before installing:
184
+ To install with Vulkan support, set the ` GGML_VULKAN =on` environment variable before installing:
185
185
186
186
``` bash
187
- CMAKE_ARGS=" -DLLAMA_VULKAN =on" pip install llama-cpp-python
187
+ CMAKE_ARGS=" -DGGML_VULKAN =on" pip install llama-cpp-python
188
188
```
189
189
190
190
</details >
191
191
192
192
<details >
193
193
<summary >Kompute</summary >
194
194
195
- To install with Kompute support, set the ` LLAMA_KOMPUTE =on` environment variable before installing:
195
+ To install with Kompute support, set the ` GGML_KOMPUTE =on` environment variable before installing:
196
196
197
197
``` bash
198
- CMAKE_ARGS=" -DLLAMA_KOMPUTE =on" pip install llama-cpp-python
198
+ CMAKE_ARGS=" -DGGML_KOMPUTE =on" pip install llama-cpp-python
199
199
```
200
200
</details >
201
201
202
202
<details >
203
203
<summary >SYCL</summary >
204
204
205
- To install with SYCL support, set the ` LLAMA_SYCL =on` environment variable before installing:
205
+ To install with SYCL support, set the ` GGML_SYCL =on` environment variable before installing:
206
206
207
207
``` bash
208
208
source /opt/intel/oneapi/setvars.sh
209
- CMAKE_ARGS=" -DLLAMA_SYCL =on -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx" pip install llama-cpp-python
209
+ CMAKE_ARGS=" -DGGML_SYCL =on -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx" pip install llama-cpp-python
210
210
```
211
211
</details >
212
212
213
213
<details >
214
214
<summary >RPC</summary >
215
215
216
- To install with RPC support, set the ` LLAMA_RPC =on` environment variable before installing:
216
+ To install with RPC support, set the ` GGML_RPC =on` environment variable before installing:
217
217
218
218
``` bash
219
219
source /opt/intel/oneapi/setvars.sh
220
- CMAKE_ARGS=" -DLLAMA_RPC =on" pip install llama-cpp-python
220
+ CMAKE_ARGS=" -DGGML_RPC =on" pip install llama-cpp-python
221
221
```
222
222
</details >
223
223
@@ -231,7 +231,7 @@ If you run into issues where it complains it can't find `'nmake'` `'?'` or CMAKE
231
231
232
232
``` ps
233
233
$env:CMAKE_GENERATOR = "MinGW Makefiles"
234
- $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS =on -DCMAKE_C_COMPILER=C:/w64devkit/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/w64devkit/bin/g++.exe"
234
+ $env:CMAKE_ARGS = "-DGGML_OPENBLAS =on -DCMAKE_C_COMPILER=C:/w64devkit/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/w64devkit/bin/g++.exe"
235
235
```
236
236
237
237
See the above instructions and set ` CMAKE_ARGS ` to the BLAS backend you want to use.
@@ -260,7 +260,7 @@ Otherwise, while installing it will build the llama.cpp x86 version which will b
260
260
Try installing with
261
261
262
262
``` bash
263
- CMAKE_ARGS=" -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DLLAMA_METAL =on" pip install --upgrade --verbose --force-reinstall --no-cache-dir llama-cpp-python
263
+ CMAKE_ARGS=" -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DGGML_METAL =on" pip install --upgrade --verbose --force-reinstall --no-cache-dir llama-cpp-python
264
264
```
265
265
</details >
266
266
@@ -667,7 +667,7 @@ python3 -m llama_cpp.server --model models/7B/llama-model.gguf
667
667
Similar to Hardware Acceleration section above, you can also install with GPU (cuBLAS) support like this:
668
668
669
669
``` bash
670
- CMAKE_ARGS=" -DLLAMA_CUDA =on" FORCE_CMAKE=1 pip install ' llama-cpp-python[server]'
670
+ CMAKE_ARGS=" -DGGML_CUDA =on" FORCE_CMAKE=1 pip install ' llama-cpp-python[server]'
671
671
python3 -m llama_cpp.server --model models/7B/llama-model.gguf --n_gpu_layers 35
672
672
```
673
673
0 commit comments