From 20ef100bd0223935e5871823f1907a4480a75539 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sun, 4 Jun 2023 13:41:14 -0400 Subject: Add sci-misc/llama-cpp --- README.md | 1 + sci-misc/llama-cpp/llama-cpp-9999.ebuild | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 sci-misc/llama-cpp/llama-cpp-9999.ebuild diff --git a/README.md b/README.md index e5b1190..303fa51 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ other overlays, or modifying less-than-ideals in the upstream ebuild repository. - [guile-email](https://guile-email.systemreboot.net/) as dev-scheme/guile-email - [GoatTracker 2](http://covertbitops.c64.org/) as media-sound/goattracker - [Lean 4](https://leanprover.github.io/) as sci-mathematics/lean +- [llama.cpp](https://github.com/ggerganov/llama.cpp) as sci-misc/llama-cpp - [MilkyTracker](https://milkytracker.titandemo.org/) as media-sound/milkytracker - [NBlood](https://nukeykt.retrohost.net/) as games-fps/nblood - [xremap](https://github.com/k0kubun/xremap) as x11-misc/xremap 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 +} -- cgit v1.3