Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f8cf52

Browse filesBrowse files
committed
Update README
1 parent 3adc8fb commit 4f8cf52
Copy full SHA for 4f8cf52

File tree

Expand file treeCollapse file tree

1 file changed

+25
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-3
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+25-3Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This package provides:
1515
- OpenAI-like API
1616
- LangChain compatibility
1717

18-
## Installation
18+
## Installation from PyPI (recommended)
1919

2020
Install from PyPI (requires a c compiler):
2121

@@ -26,8 +26,30 @@ pip install llama-cpp-python
2626
The above command will attempt to install the package and build build `llama.cpp` from source.
2727
This is the recommended installation method as it ensures that `llama.cpp` is built with the available optimizations for your system.
2828

29-
This method defaults to using `make` to build `llama.cpp` on Linux / MacOS and `cmake` on Windows.
30-
You can force the use of `cmake` on Linux / MacOS setting the `FORCE_CMAKE=1` environment variable before installing.
29+
30+
### Installation with OpenBLAS / cuBLAS / CLBlast
31+
32+
`llama.cpp` supports multiple BLAS backends for faster processing.
33+
Use the `FORCE_CMAKE=1` environment variable to force the use of `cmake` and install the pip package for the desired BLAS backend.
34+
35+
To install with OpenBLAS, set the `LLAMA_OPENBLAS=1` environment variable before installing:
36+
37+
```bash
38+
LLAMA_OPENBLAS=1 FORCE_CMAKE=1 pip install llama-cpp-python
39+
```
40+
41+
To install with cuBLAS, set the `LLAMA_CUBLAS=1` environment variable before installing:
42+
43+
```bash
44+
LLAMA_CUBLAS=1 FORCE_CMAKE=1 pip install llama-cpp-python
45+
```
46+
47+
To install with CLBlast, set the `LLAMA_CLBLAST=1` environment variable before installing:
48+
49+
```bash
50+
LLAMA_CLBLAST=1 FORCE_CMAKE=1 pip install llama-cpp-python
51+
```
52+
3153

3254
## High-level API
3355

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.