From patchwork Mon Sep 9 10:08:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 67803 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 2375C27BBEA; Mon, 9 Sep 2024 11:10:51 +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, URIBL_BLOCKED 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 1313627BBEA for ; Mon, 9 Sep 2024 11:10:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snbLa-0004yQ-KI; Mon, 09 Sep 2024 06:10:14 -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 1snbLP-0004qz-Ja for guix-patches@gnu.org; Mon, 09 Sep 2024 06:10:03 -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 1snbLP-0000HV-9Q for guix-patches@gnu.org; Mon, 09 Sep 2024 06:10:03 -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=0fQ3poQcnBU3UiegpzW97m8zHwLZ95YG52IS10+3BYI=; b=cOdbzpURgeAcM6wojf5jb8Brd711bUjyjgmRBrFLDDACYUy+dm1+XtCUC7LGUUH0Of9w6hQy9Nr5cf0XBYcp3jgLNMEyndyLgE/RC/uzC5+Xb8NSOFzwO4r40joNpuiK+m1c838UKyqYGd00093hThXS501Y4owxoHWg9+NBVkl3lcZUKoZYEKcXZv2xUC2o5VQWRLgi7QPnKEtm6ulQTKVJ2KrmVnT+vFnlNdLMk0DqpmiXM5N5u08fZAIULgHacaVtTKfkHgd2JU0uheXAs7tE5P9VHFfHs9RyMBt4SkOqqzWziNzxIUVFdWJdtuvzXd2rofax3zStYA+pClRtxg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snbLS-0003T7-Kc for guix-patches@gnu.org; Mon, 09 Sep 2024 06:10:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73094] [PATCH v3 09/10] gnu: Add rust-safetensors. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Sep 2024 10:10:06 +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: Nicolas Graves Received: via spool by 73094-submit@debbugs.gnu.org id=B73094.172587655813164 (code B ref 73094); Mon, 09 Sep 2024 10:10:06 +0000 Received: (at 73094) by debbugs.gnu.org; 9 Sep 2024 10:09:18 +0000 Received: from localhost ([127.0.0.1]:60701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snbKg-0003QA-38 for submit@debbugs.gnu.org; Mon, 09 Sep 2024 06:09:18 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:35621 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snbKa-0003NV-DH for 73094@debbugs.gnu.org; Mon, 09 Sep 2024 06:09:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1725876537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0fQ3poQcnBU3UiegpzW97m8zHwLZ95YG52IS10+3BYI=; b=Z24s8RIAY5u/8j7Jy+jqjkIQrHSSe8XvWzv7DnERIG0klu9CZLXWcqQNXBPThWanHF0UNk sWBdQW1fKRRw0A0xpkUVTyIrOp7Ahl+xuzi92UAuZUz/CYVHib3yOxfHJJnTtaqjZ6d99k WgqpXgcvyp8ut3viaqrOiFCz75Pnb1tdri1wb9Ux+C9VkyGQidlEydkS4wQ6fbFIfz7TzM nFFvaHaEcZQa+1MIBplXzT3Gi/6MVv3xZgJfhuPGH1RqDugpYw7nKyS56Uwk46e69HwKZX tok5ma0zgHoXAJjHpu1p0Dms2n2xtcCFe+d/DNkJYs+pe+8E10npiz+9wvxxig== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 0dba3c21 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 9 Sep 2024 10:08:57 +0000 (UTC) Date: Mon, 9 Sep 2024 12:08:02 +0200 Message-ID: <20240909100804.13552-10-herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240909100804.13552-1-herman@rimm.ee> References: <20240909100804.13552-1-herman@rimm.ee> MIME-Version: 1.0 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: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm 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 From: Nicolas Graves * 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 ;;; 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 @@ -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")