diff options
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 3d29913703..1865b22895 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -683,7 +683,7 @@ Performance is achieved by using the LLVM JIT compiler.") (deprecated-package "guile-aiscm-next" guile-aiscm)) (define-public llama-cpp - (let ((tag "b5013")) + (let ((tag "b6056")) (package (name "llama-cpp") (version (string-append "0.0.0-" tag)) @@ -695,7 +695,7 @@ Performance is achieved by using the LLVM JIT compiler.") (commit tag))) (file-name (git-file-name name tag)) (sha256 - (base32 "0s73dz871x53dr366lkzq19f677bwgma2ri8m5vhbfa9p8yp4p3r")))) + (base32 "1y9blrd7c8snazjmjkzj0148v328pigncvf1l9g1ih735b67zpd0")))) (build-system cmake-build-system) (arguments (list @@ -730,11 +730,23 @@ Performance is achieved by using the LLVM JIT compiler.") #~(modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) - (substitute* "ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp" - (("\"/bin/sh\"") - (string-append "\"" (search-input-file inputs "/bin/sh") "\""))))) + (substitute* (format #f "~a~a" + "ggml/src/ggml-vulkan/vulkan-shaders/" + "vulkan-shaders-gen.cpp") + (("\"/bin/sh\"") + (string-append "\"" (search-input-file inputs "/bin/sh") + "\""))))) (add-after 'unpack 'fix-tests (lambda _ + ;; test-thread-safety downloads ML model from network, + ;; cannot run in Guix build environment + (substitute* '("tests/CMakeLists.txt") + (("llama_build_and_test\\(test-thread-safety.cpp.*") + "") + ;; error while handling argument "-m": expected value for + ;; argument + (("llama_build_and_test\\(test-arg-parser.cpp.*") + "")) ;; test-eval-callback downloads ML model from network, cannot ;; run in Guix build environment (substitute* '("examples/eval-callback/CMakeLists.txt") @@ -800,9 +812,15 @@ independently to be able to run a LLaMA model.") "-DGGML_AVX2=OFF" "-DGGML_AVX512=OFF" "-DGGML_AVX512_VBMI=OFF" - "-DGGML_AVX512_VNNI=OFF") + "-DGGML_AVX512_VNNI=OFF" + "-DGGML_VULKAN=ON") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp" + (("\"/bin/sh\"") + (string-append "\"" (search-input-file inputs "/bin/sh") "\""))))) #$@(if (not (target-64bit?)) '((add-after 'unpack 'skip-failing-tests (lambda _ @@ -823,9 +841,10 @@ independently to be able to run a LLaMA model.") (("\\$\\{VAD_TARGET\\} PROPERTIES LABELS \"base;en\"") "${VAD_TEST} PROPERTIES DISABLED true"))))))) (native-inputs - (list pkg-config)) + (list pkg-config shaderc)) (inputs - (list openblas sdl2 git)) + (list openblas sdl2 git spirv-headers spirv-tools + vulkan-headers vulkan-loader)) (synopsis "OpenAI's Whisper model in C/C++") (description "This package is a high-performance inference of OpenAI's @@ -843,7 +862,7 @@ without dependencies, with @item C-style API @end itemize") (properties '((tunable? . #true))) ;use AVX512, FMA, etc. when available - (home-page "https://github.com/ggerganov/whisper.cpp") + (home-page "https://github.com/ggml-org/whisper.cpp/") (license license:expat))) (define-public mcl |