summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302023-03-28 00:33:58 +0200
committerM0Rf302023-03-28 00:33:58 +0200
commit420a79728948ffd30bdc0acab77a2070f4aaf1fe (patch)
tree249436f60c5b6c480d696439e79650da8683efb2
downloadaur-420a79728948ffd30bdc0acab77a2070f4aaf1fe.tar.gz
alpaca.cpp-git: first commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD43
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f10e36085df4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = alpaca.cpp-git
+ pkgdesc = Locally run an Instruction-Tuned Chat-Style LLM
+ pkgver = 81bd894.r3.6041736
+ pkgrel = 1
+ url = https://github.com/antimatter15/alpaca.cpp
+ arch = armv7h
+ arch = aarch64
+ arch = x86_64
+ license = MIT
+ makedepends = cmake
+ provides = alpaca.cpp
+ conflicts = alpaca.cpp
+ source = alpaca.cpp::git+https://github.com/antimatter15/alpaca.cpp
+ sha256sums = SKIP
+
+pkgname = alpaca.cpp-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..74e7d5b1afb4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: robertfoster
+
+pkgname=alpaca.cpp-git
+pkgver=81bd894.r3.6041736
+pkgrel=1
+pkgdesc="Locally run an Instruction-Tuned Chat-Style LLM"
+arch=('armv7h' 'aarch64' 'x86_64')
+url="https://github.com/antimatter15/alpaca.cpp"
+license=("MIT")
+depends=()
+makedepends=('cmake')
+conflicts=("${pkgname%-git}")
+provides=("${pkgname%-git}")
+source=("${pkgname%-git}::git+${url}")
+
+pkgver() {
+ cd "${srcdir}/${pkgname%-git}"
+ printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+build() {
+ cd "${srcdir}/${pkgname%-git}"
+
+ cmake -B ./build \
+ -S . \
+ -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" \
+ -DCMAKE_BUILD_TYPE=Release
+
+ cmake --build ./build
+}
+
+package() {
+ cd "${srcdir}/${pkgname%-git}"
+
+ cmake --install ./build
+
+ install -Dm755 "build/chat" \
+ "${pkgdir}/usr/bin/${pkgname%-git}-chat"
+ install -Dm755 "build/quantize" \
+ "${pkgdir}/usr/bin/${pkgname%-git}-quantize"
+}
+
+sha256sums=('SKIP')