blob: 59557e4fcc988bc82276a6be46bef04bed9f90f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Maintainer: Orion-zhen <https://github.com/Orion-zhen>
pkgname=ik-llama.cpp
_pkgname=ik_llama.cpp
pkgver=r3871.d10d90ae
pkgrel=1
pkgdesc="llama.cpp fork with additional SOTA quants and improved performance (OpenBLAS Backend)"
arch=(x86_64 armv7h aarch64)
url="https://github.com/ikawrakow/ik_llama.cpp"
license=("MIT")
depends=(
openblas
openblas64
blas64-openblas
curl
gcc-libs
glibc
python
)
makedepends=(
cmake
git
)
optdepends=(
'python-numpy: needed for convert_hf_to_gguf.py'
'python-safetensors: needed for convert_hf_to_gguf.py'
'python-sentencepiece: needed for convert_hf_to_gguf.py'
'python-pytorch: needed for convert_hf_to_gguf.py'
'python-transformers: needed for convert_hf_to_gguf.py'
)
conflicts=(
libggml
ggml
llama.cpp
llama.cpp-vulkan
llama.cpp-cuda
llama.cpp-hip
ik-llama.cpp-cuda
ik-llama.cpp-vulkan
)
provides=(llama.cpp)
options=(lto !debug)
source=()
sha256sums=()
prepare() {
cd "$srcdir"
git clone --single-branch --branch main "${url}" "${_pkgname}"
}
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
local _cmake_options=(
-B build
-S "${_pkgname}"
-DCMAKE_INSTALL_PREFIX='/usr'
-DBUILD_SHARED_LIBS=ON
-DLLAMA_CURL=ON
-DLLAMA_BUILD_TESTS=OFF
# -DLLAMA_USE_SYSTEM_GGML=OFF
-DGGML_ALL_WARNINGS=OFF
-DGGML_ALL_WARNINGS_3RD_PARTY=OFF
-DGGML_BUILD_EXAMPLES=OFF
-DGGML_BUILD_TESTS=OFF
-DGGML_BLAS=ON
-DGGML_BLAS_VENDOR=OpenBLAS
-DGGML_LTO=ON
-DGGML_RPC=ON
-DGGML_NATIVE=ON
-Wno-dev
)
cmake "${_cmake_options[@]}"
cmake --build build --config Release
}
package() {
DESTDIR="${pkgdir}" cmake --install build
}
|