Updated build information

First update to the build instructions to include BLAS.
This commit is contained in:
DaniAndTheWeb 2023-04-26 00:15:56 +02:00 committed by GitHub
parent 54bb60e268
commit e2bb127fd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,15 +167,17 @@ cd llama.cpp
### Build
In order to build llama.cpp you have three different options.
Note: For Windows, CMake or Zig can be used.
1. Use `make`
- Using `make`
```bash
make
```
1. Use CMake
- Using CMake
```bash
mkdir build
@ -184,12 +186,49 @@ Note: For Windows, CMake or Zig can be used.
cmake --build . --config Release
```
1. Use Zig
- Using Zig
```bash
zig build -Drelease-fast
```
BLAS acceleration is not enabled by default, in order to use it you have different options:
- OpenBLAS
This provides a faster evaluation time using only the CPU. Make sure to have OpenBLAS installed on your machine.
- Using `make`
```bash
make LLAMA_OPENBLAS=1
```
Note: in order to build with OpenBLAS enabled on Arch Linux you must edit the Makefile adding at the end of the line 105: `-lcblas`
- Using CMake
```bash
mkdir build
cd build
cmake .. -DLLAMA_OPENBLAS=ON
cmake --build . --config Release
```
- cuBLAS
This provides a faster evaluation time using the CUDA cores of your Nvidia GPU. Make sure to have the CUDA toolkit installed.
- Using `make`
```bash
make LLAMA_CUBLAS=1
```
- Using CMake
```bash
mkdir build
cd build
cmake .. -DLLAMA_CUBLAS=ON
cmake --build . --config Release
```
### Prepare Data & Run
```bash