From patchwork Sun Sep 8 14:39:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 67767 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B11FE27BBEA; Sun, 8 Sep 2024 15:41:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F7E127BBE2 for ; Sun, 8 Sep 2024 15:41:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snJ67-0001bU-IF; Sun, 08 Sep 2024 10:41:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snJ66-0001al-0C for guix-patches@gnu.org; Sun, 08 Sep 2024 10:41:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snJ65-00006V-Nk for guix-patches@gnu.org; Sun, 08 Sep 2024 10:41:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9b17omu0MEDzNaQZWwjQJuMu7IEGiJlOwlbENl4RXS0=; b=NvTJpehJlgP2wg2xk5IivR1tfUwHaXhXmdKybtbi7GyugPaYcSDlGXuW4OV0d6wg+S4EyR9uyzmobQd9303VYdzaDoRX2clqNo/IC+2eMcQkWZrssiP02xPGKNnKWeckbsYZac/iy6jwHGwSxZiCKWO2/SGo6Eg3xwx4uFjgWQhfo6+pa6lU4QaCphrhgUGcXC6hQYaFM1iykGOHQtoAfj3Zf68Q/dQUdnBj1JW3KlbOVS351d96/mlpZqYOEztesMtejY9mp5IvyJ8cTVypRk+PrrUL1XSfzjFr+36lu0NwtaxXbYZgN5UkViagZ5DImTMzfuBhaKMOehjQMGzcgw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snJ67-0000ST-VF for guix-patches@gnu.org; Sun, 08 Sep 2024 10:41:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73094] [PATCH v2 09/10] gnu: Add rust-safetensors. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Sep 2024 14:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73094 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73094@debbugs.gnu.org Cc: herman@rimm.ee, ngraves@ngraves.fr Received: via spool by 73094-submit@debbugs.gnu.org id=B73094.17258064151652 (code B ref 73094); Sun, 08 Sep 2024 14:41:03 +0000 Received: (at 73094) by debbugs.gnu.org; 8 Sep 2024 14:40:15 +0000 Received: from localhost ([127.0.0.1]:59854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snJ5K-0000QY-UV for submit@debbugs.gnu.org; Sun, 08 Sep 2024 10:40:15 -0400 Received: from 9.mo582.mail-out.ovh.net ([87.98.171.146]:55729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snJ5G-0000Ko-1L for 73094@debbugs.gnu.org; Sun, 08 Sep 2024 10:40:11 -0400 Received: from director3.ghost.mail-out.ovh.net (unknown [10.109.176.103]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 4X1t0k2NNmz1Qwy for <73094@debbugs.gnu.org>; Sun, 8 Sep 2024 14:40:05 +0000 (UTC) Received: from ghost-submission-55b549bf7b-mf6jt (unknown [10.110.164.228]) by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 9B1411FD2C; Sun, 8 Sep 2024 14:40:05 +0000 (UTC) Received: from ngraves.fr ([37.59.142.105]) by ghost-submission-55b549bf7b-mf6jt with ESMTPSA id ZLvrFEW33WYKvAUAEhG6Lw (envelope-from ); Sun, 08 Sep 2024 14:40:05 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-105G0067ab81db8-64d4-471f-b4bc-8a98002220e6, 1B24502937BE6AAC558E984F82BC0F282F1693D3) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sun, 8 Sep 2024 16:39:25 +0200 Message-ID: <20240908143935.22543-9-ngraves@ngraves.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240908143935.22543-1-ngraves@ngraves.fr> References: <20240908143935.22543-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13205961486307943045 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrudeihedgjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvffehgeekhfekgffgleehffetiefggeeitdduteekfffhkeehveejfeejledtieenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejfedtleegseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedvpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=9b17omu0MEDzNaQZWwjQJuMu7IEGiJlOwlbENl4RXS0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1725806406; v=1; b=OoJqii85WZlvrigpABvW04LyGRyysJPiwQXt5iKk067nFPTQupMXuZqUM4yIxG6/QjdEZ26V TKNJH9GpoBSlNlArLzMJ5K56JgHUa+zN931DdJAkLHmPgpf0mFdZq2jjVE3KgGCfMwfJlg3yN6D f7DILjZ1zmgRKkPZ88NZboPD5AIR76ogm3z/MD7nzJ0mMbOqMobWC9CCa0b0MDP1SHJH16UJMjH vwzNyTKbQ+AhSeyZ0J17xbSuHX0ioncjjtqqye/so8oKp8y8ACWYdBO2jFGFMvQXwypo7AznxwJ Grkix4AHdVcrVWnISZOOmCe1bhBOwnzGRdGZ5d82IjYYQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer -;;; Copyright © 2022, 2023 Nicolas Graves +;;; Copyright © 2022, 2023, 2024 Nicolas Graves ;;; Copyright © 2022 Kiran Shila ;;; Copyright © 2023 zamfofex ;;; Copyright © 2023 Navid Afkhami @@ -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")