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 --- sci-misc/llama-cpp/llama-cpp-9999.ebuild | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sci-misc/llama-cpp/llama-cpp-9999.ebuild (limited to 'sci-misc/llama-cpp') 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