From ab2a79180fb2b2d9bbe7531d0280d7099c773937 Mon Sep 17 00:00:00 2001 From: Sergey Alirzaev Date: Wed, 29 Jan 2025 01:11:11 +0100 Subject: [PATCH] sci-misc/llama-cpp: new package, add 0_pre4576, 9999 Signed-off-by: Sergey Alirzaev --- sci-misc/llama-cpp/Manifest | 1 + sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild | 33 +++++++++++++++++++ sci-misc/llama-cpp/llama-cpp-9999.ebuild | 33 +++++++++++++++++++ sci-misc/llama-cpp/metadata.xml | 11 +++++++ 4 files changed, 78 insertions(+) create mode 100644 sci-misc/llama-cpp/Manifest create mode 100644 sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild create mode 100644 sci-misc/llama-cpp/llama-cpp-9999.ebuild create mode 100644 sci-misc/llama-cpp/metadata.xml diff --git a/sci-misc/llama-cpp/Manifest b/sci-misc/llama-cpp/Manifest new file mode 100644 index 0000000000..b7c2a37bbf --- /dev/null +++ b/sci-misc/llama-cpp/Manifest @@ -0,0 +1 @@ +DIST llama-cpp-0_pre4576.tar.gz 20506059 BLAKE2B 8f011811e4df1f8d0c26b19f96a709980e078dc7e769b33cbbb03a852a29b489f80c8a1e298fecea53997068f6b7897e4536ba5db289aa445a1a6f16f98adce3 SHA512 21150721524283454ab53e370fdaf4e766f89fbb8d4b43072b10657d8c8b686630616cddbae7954147a2ba0360ad20c4643761f3774481e13a7b180812935c4e diff --git a/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild b/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild new file mode 100644 index 0000000000..18a0a72d96 --- /dev/null +++ b/sci-misc/llama-cpp/llama-cpp-0_pre4576.ebuild @@ -0,0 +1,33 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ "${PV}" != "9999" ]]; then + KEYWORDS="~amd64" + MY_PV="b${PV#0_pre}" + S="${WORKDIR}/llama.cpp-${MY_PV}" + SRC_URI="https://github.com/ggerganov/llama.cpp/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" +else + inherit git-r3 + EGIT_REPO_URI="https://github.com/ggerganov/llama.cpp.git" +fi + +DESCRIPTION="Port of Facebook's LLaMA model in C/C++" +HOMEPAGE="https://github.com/ggerganov/llama.cpp" + +LICENSE="MIT" +SLOT="0" +CPU_FLAGS_X86=( avx avx2 f16c ) + +src_configure() { + local mycmakeargs=( + -DLLAMA_BUILD_TESTS=OFF + -DLLAMA_BUILD_SERVER=ON + -DCMAKE_SKIP_BUILD_RPATH=ON + -DBUILD_NUMBER="1" + ) + cmake_src_configure +} 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 0000000000..18a0a72d96 --- /dev/null +++ b/sci-misc/llama-cpp/llama-cpp-9999.ebuild @@ -0,0 +1,33 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ "${PV}" != "9999" ]]; then + KEYWORDS="~amd64" + MY_PV="b${PV#0_pre}" + S="${WORKDIR}/llama.cpp-${MY_PV}" + SRC_URI="https://github.com/ggerganov/llama.cpp/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz" +else + inherit git-r3 + EGIT_REPO_URI="https://github.com/ggerganov/llama.cpp.git" +fi + +DESCRIPTION="Port of Facebook's LLaMA model in C/C++" +HOMEPAGE="https://github.com/ggerganov/llama.cpp" + +LICENSE="MIT" +SLOT="0" +CPU_FLAGS_X86=( avx avx2 f16c ) + +src_configure() { + local mycmakeargs=( + -DLLAMA_BUILD_TESTS=OFF + -DLLAMA_BUILD_SERVER=ON + -DCMAKE_SKIP_BUILD_RPATH=ON + -DBUILD_NUMBER="1" + ) + cmake_src_configure +} diff --git a/sci-misc/llama-cpp/metadata.xml b/sci-misc/llama-cpp/metadata.xml new file mode 100644 index 0000000000..af5a5e03eb --- /dev/null +++ b/sci-misc/llama-cpp/metadata.xml @@ -0,0 +1,11 @@ + + + + + ggerganov/llama.cpp + + + l29ah@riseup.net + Sergey Alirzaev + +