all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 73094@debbugs.gnu.org
Cc: Nicolas Graves <ngraves@ngraves.fr>
Subject: [bug#73094] [PATCH v3 09/10] gnu: Add rust-safetensors.
Date: Mon,  9 Sep 2024 12:08:02 +0200	[thread overview]
Message-ID: <20240909100804.13552-10-herman@rimm.ee> (raw)
In-Reply-To: <20240909100804.13552-1-herman@rimm.ee>

From: Nicolas Graves <ngraves@ngraves.fr>

* 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 34dc5c8d26..410b71b061 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2022, 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022, 2023, 2024 Nicolas Graves <ngraves@ngraves.fr>
 ;;; Copyright © 2022 Kiran Shila <me@kiranshila.com>
 ;;; Copyright © 2023 zamfofex <zamfofex@twdb.moe>
 ;;; Copyright © 2023 Navid Afkhami <navid.afkhami@mdc-berlin.de>
@@ -51,6 +51,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)
@@ -76,6 +77,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)
@@ -1055,6 +1057,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





  parent reply	other threads:[~2024-09-09 10:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07  9:36 [bug#73094] [PATCH 00/10] Add python-safetensors Nicolas Graves via Guix-patches via
2024-09-07 10:08 ` [bug#73094] [PATCH 01/10] gnu: rust-darling-core-0.20: Update to 0.20.8 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 02/10] gnu: rust-darling-macro-0.20: " Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 03/10] gnu: rust-darling-0.20: " Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 04/10] gnu: Add rust-derive-builder-core-0.20 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 05/10] gnu: Add rust-derive-builder-macro-0.20 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 06/10] gnu: Add rust-derive-builder-0.20 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 07/10] gnu: Add rust-unicode-normalization-alignments-0.1 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 08/10] gnu: Add rust-rayon-cond-0.3 Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 09/10] gnu: Add rust-safetensors Nicolas Graves via Guix-patches via
2024-09-07 10:08   ` [bug#73094] [PATCH 10/10] gnu: Add python-safetensors Nicolas Graves via Guix-patches via
2024-09-08 12:46 ` [bug#73094] [PATCH 00/10] " Herman Rimm via Guix-patches via
2024-09-08 14:39 ` [bug#73094] [PATCH v2 01/10] gnu: rust-darling-core-0.20: Update to 0.20.8 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 02/10] gnu: rust-darling-macro-0.20: " Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 03/10] gnu: rust-darling-0.20: " Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 04/10] gnu: Add rust-derive-builder-core-0.20 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 05/10] gnu: Add rust-derive-builder-macro-0.20 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 06/10] gnu: Add rust-derive-builder-0.20 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 07/10] gnu: Add rust-unicode-normalization-alignments-0.1 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 08/10] gnu: Add rust-rayon-cond-0.3 Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 09/10] gnu: Add rust-safetensors Nicolas Graves via Guix-patches via
2024-09-08 14:39   ` [bug#73094] [PATCH v2 10/10] gnu: Add python-safetensors Nicolas Graves via Guix-patches via
2024-09-09 10:07 ` [bug#73094] [PATCH v3 00/10] " Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 01/10] gnu: rust-darling-core-0.20: Update to 0.20.8 Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 02/10] gnu: rust-darling-macro-0.20: " Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 03/10] gnu: rust-darling-0.20: " Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 04/10] gnu: Add rust-derive-builder-core-0.20 Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 05/10] gnu: Add rust-derive-builder-macro-0.20 Herman Rimm via Guix-patches via
2024-09-09 10:07   ` [bug#73094] [PATCH v3 06/10] gnu: Add rust-derive-builder-0.20 Herman Rimm via Guix-patches via
2024-09-09 10:08   ` [bug#73094] [PATCH v3 07/10] gnu: Add rust-unicode-normalization-alignments-0.1 Herman Rimm via Guix-patches via
2024-09-09 10:08   ` [bug#73094] [PATCH v3 08/10] gnu: Add rust-rayon-cond-0.3 Herman Rimm via Guix-patches via
2024-09-09 10:08   ` Herman Rimm via Guix-patches via [this message]
2024-09-09 10:08   ` [bug#73094] [PATCH v3 10/10] gnu: Add python-safetensors Herman Rimm via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240909100804.13552-10-herman@rimm.ee \
    --to=guix-patches@gnu.org \
    --cc=73094@debbugs.gnu.org \
    --cc=herman@rimm.ee \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.