From 4eaeff997907bc1b67884a6dc087756a50f175e2 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sat, 21 Dec 2024 02:15:39 +0100 Subject: gnu: Add whisper-cpp. * gnu/packages/machine-learning.scm (whisper-cpp): New variable. Change-Id: I1ab60be8a64b517d537fad651a7fabcd012025a1 --- gnu/packages/machine-learning.scm | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index badbcd6deb..45a62583ac 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -648,6 +648,50 @@ of foundation language models. It requires models parameters to be downloaded independently to be able to run a LLaMA model.") (license license:expat)))) +(define-public whisper-cpp + (package + (name "whisper-cpp") + (version "1.7.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ggerganov/whisper.cpp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rrkgrx8akw91b77kl36i03i39a79r0p69glhhidm28qfw02icjx")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #false ; uhh. They have it commented out in CMakeLists.txt + #:configure-flags + #~(list "-DBUILD_SHARED_LIBS=ON" + "-DGGML_BLAS=ON" + "-DGGML_BLAS_VENDOR=OpenBLAS" + (string-append "-DBLAS_INCLUDE_DIRS=" + #$(this-package-input "openblas") + "/include") + (string-append "-DBLAS_LIBRARIES=" + #$(this-package-input "openblas") + "/lib/libopenblas.so") + + "-DGGML_NATIVE=OFF" ;no '-march=native' + "-DGGML_FMA=OFF" ;and no '-mfma', etc. + "-DGGML_AVX2=OFF" + "-DGGML_AVX512=OFF" + "-DGGML_AVX512_VBMI=OFF" + "-DGGML_AVX512_VNNI=OFF"))) + (native-inputs + (list pkg-config)) + (inputs + (list openblas)) + (synopsis "Speech recognition") + (description "This package provides speech recognition.") + (properties '((tunable? . #true))) ;use AVX512, FMA, etc. when available + (home-page "https://github.com/ggerganov/whisper.cpp") + (license license:expat))) + (define-public mcl (package (name "mcl") -- cgit v1.2.3