From patchwork Fri Jan 26 12:20:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Pflug X-Patchwork-Id: 59420 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 192B027BBEA; Fri, 26 Jan 2024 12:22:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 EC89A27BBE2 for ; Fri, 26 Jan 2024 12:22:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTLDZ-0001P7-Vh; Fri, 26 Jan 2024 07:21:58 -0500 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 1rTLDY-0001ON-8s for guix-patches@gnu.org; Fri, 26 Jan 2024 07:21:56 -0500 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 1rTLDX-0006pr-T4 for guix-patches@gnu.org; Fri, 26 Jan 2024 07:21:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTLDd-0004bG-Uv for guix-patches@gnu.org; Fri, 26 Jan 2024 07:22:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68455] [PATCH v2] gnu: llama-cpp: Update to 1873. References: <20240114203255.26500-1-david@pflug.io> In-Reply-To: <20240114203255.26500-1-david@pflug.io> Resent-From: David Pflug Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Jan 2024 12:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68455 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68455@debbugs.gnu.org Cc: David Pflug Received: via spool by 68455-submit@debbugs.gnu.org id=B68455.170627170217652 (code B ref 68455); Fri, 26 Jan 2024 12:22:01 +0000 Received: (at 68455) by debbugs.gnu.org; 26 Jan 2024 12:21:42 +0000 Received: from localhost ([127.0.0.1]:50605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTLDK-0004ae-3n for submit@debbugs.gnu.org; Fri, 26 Jan 2024 07:21:42 -0500 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]:51608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTLDI-0004aP-Cr for 68455@debbugs.gnu.org; Fri, 26 Jan 2024 07:21:41 -0500 Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-7d2e1a0337bso149247241.3 for <68455@debbugs.gnu.org>; Fri, 26 Jan 2024 04:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tpflug-com.20230601.gappssmtp.com; s=20230601; t=1706271687; x=1706876487; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XZn10jdVCmsw6A0ehl/2OLgchbq4BGNZ6tssIna3fI0=; b=lSaLoYcFyo8oWDTDKVQPUOf9NZvfTBT4y2NM8JsfHe2XJao/At7iEPldFl9O8zIT1b PUSES/t+6Dr9CvRj7sDJeMzE8iPGm8gDIRlf9A9pQbnFyfRu4kvQhPeyVh8Vqkj5xyE4 Ujgk5vDhhvl3QVII09CK9qiJib4LFpNc4z2goaTZqSdCukxgSSRhW30mNLIbLNegwNus r/lb9ULp2qXcD4E7zaBTZzw0X4nrlZ/2AUbz6sdURdRFGngZ9cJlic5afvYJ7TmT6YMb xZtPwMfXKIEYncnqsAK3pqNf1bMyEuN69RFZmC0zzJy7p5vAwo6k34X+b6c+sFHp6+F5 zkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706271687; x=1706876487; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XZn10jdVCmsw6A0ehl/2OLgchbq4BGNZ6tssIna3fI0=; b=M8RHqlXMckSKeicxFQ0M8YyYTynaqednIYXRp7U7jPW2uhzpXjSsqyuQ9Vfzrp/aiw REJLClSuzVsW3uqVEuOhqBo6dRJpo03Jy0JZpo3pVy1ZjFodouUUUlqznKXTVcHLn8kN L6AUCG4pP4RM++OiLY/rGEhbOkZi+IfMzQMNYPDVa7NEV5Xq+Vzx5UlpiPbI/GnxxyTM JHKT8/NuKOTvJyikHg0yYmcKilFVJDlrpgSID1AJ6rBKOOKcn0RA+HnxNSmQtPCsA6rf mFYz0zRZnZO3HtUb5uxlVtjIS+HoyoDS+uiOHTvp3CSjmy9IRGhE4nOEevx1RsKYcVyt j80A== X-Gm-Message-State: AOJu0YzacF1PwMro3jyGniy4fQzNsVAlzu+ruKJDmYTqzqV/Tca+kdgw H23UyubmkJ8QwVZ684km3r7bWvFgqp2eYveDTBSgXtihuI1+bpO+OsQGmbra/AGlUZIup5Z8z/L b X-Google-Smtp-Source: AGHT+IGyrictmipIbQ3IHlA/aNxAm1ei6oOVNEzJtRc3/kznzphG93NnY+WcvXmduv5MQxQTgnmfUg== X-Received: by 2002:a05:6122:4782:b0:4b7:363d:89fd with SMTP id ee2-20020a056122478200b004b7363d89fdmr626441vkb.33.1706271686940; Fri, 26 Jan 2024 04:21:26 -0800 (PST) Received: from localhost.localdomain (2603-9001-0600-4cc0-6a05-caff-fe36-28a4.inf6.spectrum.com. [2603:9001:600:4cc0:6a05:caff:fe36:28a4]) by smtp.gmail.com with ESMTPSA id cb11-20020a056122408b00b004b71167e54dsm128174vkb.50.2024.01.26.04.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 04:21:26 -0800 (PST) From: David Pflug Date: Fri, 26 Jan 2024 07:20:21 -0500 Message-ID: <20240126122110.10991-1-david@pflug.io> X-Mailer: git-send-email 2.41.0 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: , 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 (llama-cpp): Update to 1873. python-gguf added by #68735 Change-Id: I091cd20192743c87b497ea3c5fd18a75ada75d9d --- gnu/packages/machine-learning.scm | 110 +++++++++++++++--------------- 1 file changed, 55 insertions(+), 55 deletions(-) base-commit: c5453fbfeb0dbd19cb402199fe1e5ad51a051e56 diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 0e88f7265b..1d590d1c1b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -519,63 +519,63 @@ (define-public guile-aiscm-next (deprecated-package "guile-aiscm-next" guile-aiscm)) (define-public llama-cpp - (let ((commit "f31b5397143009d682db90fd2a6cde83f1ef00eb") - (revision "0")) - (package - (name "llama-cpp") - (version (git-version "0.0.0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ggerganov/llama.cpp") - (commit (string-append "master-" (string-take commit 7))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0ys6n53n032zq1ll9f3vgxk8sw0qq7x3fi7awsyy13adzp3hn08p")))) - (build-system cmake-build-system) - (arguments - (list - #:modules '((ice-9 textual-ports) - (guix build utils) - ((guix build python-build-system) #:prefix python:) - (guix build cmake-build-system)) - #:imported-modules `(,@%cmake-build-system-modules - (guix build python-build-system)) - #:phases - #~(modify-phases %standard-phases - (add-before 'install 'install-python-scripts - (lambda _ - (let ((bin (string-append #$output "/bin/"))) - (define (make-script script) - (let ((suffix (if (string-suffix? ".py" script) "" ".py"))) - (call-with-input-file - (string-append "../source/" script suffix) - (lambda (input) - (call-with-output-file (string-append bin script) - (lambda (output) - (format output "#!~a/bin/python3\n~a" - #$(this-package-input "python") - (get-string-all input)))))) - (chmod (string-append bin script) #o555))) - (mkdir-p bin) - (make-script "convert-pth-to-ggml") - (make-script "convert-lora-to-ggml") - (make-script "convert")))) - (add-after 'install-python-scripts 'wrap-python-scripts - (assoc-ref python:%standard-phases 'wrap)) - (replace 'install - (lambda _ - (copy-file "bin/main" (string-append #$output "/bin/llama"))))))) - (inputs (list python)) - (propagated-inputs - (list python-numpy python-pytorch python-sentencepiece)) - (home-page "https://github.com/ggerganov/llama.cpp") - (synopsis "Port of Facebook's LLaMA model in C/C++") - (description "This package provides a port to Facebook's LLaMA collection + (package + (name "llama-cpp") + (version "1873") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ggerganov/llama.cpp") + (commit (string-append "b" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11may9gkafg5bfma5incijvkypjgx9778gmygxp3x2dz1140809d")))) + (build-system cmake-build-system) + (arguments + (list + #:modules '((ice-9 textual-ports) + (guix build utils) + ((guix build python-build-system) #:prefix python:) + (guix build cmake-build-system)) + #:imported-modules `(,@%cmake-build-system-modules + (guix build python-build-system)) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'install-python-scripts + (lambda _ + (let ((bin (string-append #$output "/bin/"))) + (define (make-script script) + (let ((suffix (if (string-suffix? ".py" script) "" ".py"))) + (call-with-input-file + (string-append "../source/" script suffix) + (lambda (input) + (call-with-output-file (string-append bin script) + (lambda (output) + (format output "#!~a/bin/python3\n~a" + #$(this-package-input "python") + (get-string-all input)))))) + (chmod (string-append bin script) #o555))) + (mkdir-p bin) + (make-script "convert-hf-to-gguf") + (make-script "convert-llama-ggml-to-gguf") + (make-script "convert-lora-to-ggml") + (make-script "convert-persimmon-to-gguf") + (make-script "convert")))) + (add-after 'install-python-scripts 'wrap-python-scripts + (assoc-ref python:%standard-phases 'wrap)) + (replace 'install + (lambda _ + (copy-file "bin/main" (string-append #$output "/bin/llama"))))))) + (inputs (list python)) + (propagated-inputs + (list python-numpy python-pytorch python-sentencepiece python-gguf)) + (home-page "https://github.com/ggerganov/llama.cpp") + (synopsis "Port of Facebook's LLaMA model in C/C++") + (description "This package provides a port to Facebook's LLaMA collection of foundation language models. It requires models parameters to be downloaded independently to be able to run a LLaMA model.") - (license license:expat)))) + (license license:expat))) (define-public mcl (package