GNU bug report logs -
#73094
[PATCH 00/10] Add python-safetensors
Previous Next
Reported by: Nicolas Graves <ngraves <at> ngraves.fr>
Date: Sat, 7 Sep 2024 09:39:01 UTC
Severity: normal
Tags: patch
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/machine-learning.scm (rust-safetensors): New variable.
Change-Id: I2733dbae90b292ed6485666cf875d6fb899c5d12
---
gnu/packages/machine-learning.scm | 32 ++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index d9a02b7093..a4aeb97be7 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -17,7 +17,7 @@
;;; Copyright © 2020 Edouard Klein <edk <at> beaver-labs.com>
;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego <at> posteo.net>
;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
-;;; Copyright © 2022, 2023 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2022, 2023, 2024 Nicolas Graves <ngraves <at> ngraves.fr>
;;; Copyright © 2022 Kiran Shila <me <at> kiranshila.com>
;;; Copyright © 2023 zamfofex <zamfofex <at> twdb.moe>
;;; Copyright © 2023 Navid Afkhami <navid.afkhami <at> mdc-berlin.de>
@@ -52,6 +52,7 @@ (define-module (gnu packages machine-learning)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix svn-download)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
@@ -77,6 +78,7 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages cmake)
#:use-module (gnu packages cpp)
#:use-module (gnu packages cran)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages databases)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages documentation)
@@ -1090,6 +1092,34 @@ (define-public python-sacrebleu
and reproducible BLEU, chrF, and TER scores for natural language processing.")
(license license:asl2.0)))
+(define-public rust-safetensors
+ (package
+ (name "rust-safetensors")
+ (version "0.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "safetensors" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1fbx56wikqcvqb4y0ym0cys68lj0v3cpanhsy5i13fkz5jr7dvcc"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1))
+ #:cargo-development-inputs
+ (("rust-criterion" ,rust-criterion-0.5)
+ ("rust-memmap2" ,rust-memmap2-0.9)
+ ("rust-proptest" ,rust-proptest-1))))
+ (home-page "https://github.com/huggingface/safetensors")
+ (synopsis "Simple and safe way to store and distribute tensors")
+ (description
+ "This package provides a fast (zero-copy) and safe (dedicated) format for
+storing tensors safely, named safetensors. They aim to be safer than their
+@code{PyTorch} counterparts.")
+ (license license:asl2.0)))
+
(define-public python-sentencepiece
(package
(name "python-sentencepiece")
--
2.45.2
This bug report was last modified 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.