summaryrefslogtreecommitdiff
path: root/gnu/packages/machine-learning.scm
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2026-02-08 11:13:14 +0100
committerCayetano Santos <csantosb@inventati.org>2026-02-11 08:10:15 +0100
commit02dba5ab3ec6d13c75c0778bb087a1875cdc7c2f (patch)
tree655f6615dff9979e4eef5da72e05f45ad2827abd /gnu/packages/machine-learning.scm
parentff3813891a9beebf9b608be7c74c898e197ce916 (diff)
gnu: Add ggml.
* gnu/packages/machine-learning.scm (ggml): New variable. Merges guix/guix!6238 Change-Id: Iebfff1cd9587a3ba3bb02020533c658b6c21f614
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r--gnu/packages/machine-learning.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index c4f4ef42305..c8f7e8727cb 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -207,6 +207,52 @@ frameworks.")
representations and sentence classification.")
(license license:expat)))
+(define-public ggml
+ (package
+ (name "ggml")
+ (version "0.9.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ggml-org/ggml")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0l979hsbqbiwi8wl6z43r2gras4xhw1v1dd3rcap97s3jysb6bda"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list #$(string-append "-DGGML_BUILD_NUMBER=" version)
+ "-DBUILD_SHARED_LIBS_DEFAULT=ON"
+ "-DGGML_BACKEND_DL=ON"
+ "-DGGML_VULKAN=ON"
+ "-DGGML_BUILD_TESTS=ON"
+ "-DGGML_OPENCL=ON"
+ "-DGGML_NATIVE_DEFAULT=OFF" ;no '-march=native'
+ "-DGGML_BLAS_DEFAULT=ON"
+ "-DGGML_BLAS_VENDOR_DEFAULT=OpenBLAS")))
+ (inputs
+ (list glslang
+ openblas
+ openblas-ilp64
+ opencl-icd-loader
+ shaderc
+ spirv-headers
+ spirv-tools
+ vulkan-headers
+ vulkan-loader))
+ (native-inputs
+ (list opencl-headers pkg-config python-minimal-wrapper))
+ (properties '((tunable? . #true)))
+ (home-page "https://github.com/ggml-org/ggml")
+ (synopsis "Tensor library for machine learning")
+ (description "@code{ggml} is a @acronym{ML, Machine Learning} library
+written in C and C++ with a focus on transformer inference, similar to ML
+libraries such as PyTorch and TensorFlow.")
+ (license license:expat)))
+
(define-public python-apricot-select
(package
(name "python-apricot-select")