summaryrefslogtreecommitdiff
path: root/sci-misc
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2023-06-04 13:41:14 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2023-06-04 13:41:48 -0400
commit20ef100bd0223935e5871823f1907a4480a75539 (patch)
tree6dcad067797a506db6e2358e435d83d763b2e332 /sci-misc
parent1f10f7da9d3f27248bd77c6f8b94e8be83712c10 (diff)
Add sci-misc/llama-cpp
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/llama-cpp/llama-cpp-9999.ebuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/sci-misc/llama-cpp/llama-cpp-9999.ebuild b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
new file mode 100644
index 0000000..65990ca
--- /dev/null
+++ b/sci-misc/llama-cpp/llama-cpp-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic git-r3
+
+DESCRIPTION="Port of Facebook's LLaMA model in C/C++"
+HOMEPAGE="https://github.com/ggerganov/llama.cpp"
+EGIT_REPO_URI="https://github.com/ggerganov/llama.cpp.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="blas"
+
+DEPEND="blas? ( sci-libs/openblas )"
+RDEPEND=${DEPEND}
+
+if [[ ${PV} = 9999 ]]; then
+ S=${WORKDIR}/llama-cpp-9999
+fi
+
+src_compile() {
+ if use blas; then
+ LLAMA_OPENBLAS="1" emake
+ else
+ emake
+ fi
+}
+
+src_install() {
+ mv main llama-cpp
+ dobin llama-cpp
+ dodoc README.md
+}