gnu: Add whisper-cpp.

* gnu/packages/machine-learning.scm (whisper-cpp): New variable.

Change-Id: I1ab60be8a64b517d537fad651a7fabcd012025a1
This commit is contained in:
Danny Milosavljevic 2024-12-21 02:15:39 +01:00
parent 5eac2391de
commit 4eaeff9979
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -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")