summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/llama-cpp-python
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/llama-cpp-python')
-rw-r--r--pkgs/development/python-modules/llama-cpp-python/default.nix20
1 files changed, 6 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/llama-cpp-python/default.nix b/pkgs/development/python-modules/llama-cpp-python/default.nix
index db736284c427..6a331b1d0b11 100644
--- a/pkgs/development/python-modules/llama-cpp-python/default.nix
+++ b/pkgs/development/python-modules/llama-cpp-python/default.nix
@@ -4,7 +4,6 @@
gcc13Stdenv,
buildPythonPackage,
fetchFromGitHub,
- fetchpatch2,
# nativeBuildInputs
cmake,
@@ -40,28 +39,18 @@ let
in
buildPythonPackage rec {
pname = "llama-cpp-python";
- version = "0.3.6";
+ version = "0.3.8";
pyproject = true;
src = fetchFromGitHub {
owner = "abetlen";
repo = "llama-cpp-python";
tag = "v${version}";
- hash = "sha256-d5nMgpS7m6WEILs222ztwphoqkAezJ+qt6sVKSlpIYI=";
+ hash = "sha256-F1E1c2S1iIL3HX/Sot/uIIrOWvfPU1dCrHx14A1Jn9E=";
fetchSubmodules = true;
};
# src = /home/gaetan/llama-cpp-python;
- patches = [
- # fix segfault when running tests due to missing default Metal devices
- (fetchpatch2 {
- url = "https://github.com/ggml-org/llama.cpp/commit/acd38efee316f3a5ed2e6afcbc5814807c347053.patch?full_index=1";
- stripLen = 1;
- extraPrefix = "vendor/llama.cpp/";
- hash = "sha256-71+Lpg9z5KPlaQTX9D85KS2LXFWLQNJJ18TJyyq3/pU=";
- })
- ];
-
dontUseCmakeConfigure = true;
SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" (
# Set GGML_NATIVE=off. Otherwise, cmake attempts to build with
@@ -72,7 +61,10 @@ buildPythonPackage rec {
# -mcpu, breaking linux build as follows:
#
# cc1: error: unknown value ‘native+nodotprod+noi8mm+nosve’ for ‘-mcpu’
- [ "-DGGML_NATIVE=off" ]
+ [
+ "-DGGML_NATIVE=off"
+ "-DGGML_BUILD_NUMBER=1"
+ ]
++ lib.optionals cudaSupport [
"-DGGML_CUDA=on"
"-DCUDAToolkit_ROOT=${lib.getDev cudaPackages.cuda_nvcc}"