From: Andy Tai <atai@atai.org>
To: 71219@debbugs.gnu.org
Cc: Andy Tai <atai@atai.org>
Subject: [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build.
Date: Tue, 11 Jun 2024 00:30:20 -0700 [thread overview]
Message-ID: <6757d7bf6c980f67a9dbae7af763ac1eeb0d34b6.1718090954.git.atai@atai.org> (raw)
Message-ID: <20240611073020.7JFu-OnP2Qe5dGIk6K05gi56nKE5N_-9qzspKsBrH7s@z> (raw)
In-Reply-To: <6c6fc91b2febb791d50aac5e9a16a220090eb31d.1716786995.git.atai@atai.org>
* gnu/packages/machine-learning.scm (lama-cpp): Update to commit a5735e with
pkf-config support.
[arguments](configure-flags): add cmake configure flag
for shared library build and adjust arguments to make openblas
found by cmake.
(phases) 'install-python-scripts: Remove references to deleted scripts
and add new ones upsteeam.
Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14
---
gnu/packages/machine-learning.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a385ddc18c..f433f8cd65 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -524,7 +524,7 @@ (define-public guile-aiscm-next
(deprecated-package "guile-aiscm-next" guile-aiscm))
(define-public llama-cpp
- (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
+ (let ((commit "a5735e4426b19a3ebd0c653ad8ac01420458ee95")
(revision "2"))
(package
(name "llama-cpp")
@@ -537,12 +537,16 @@ (define-public llama-cpp
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "16rm9gy0chd6k07crm8rkl2j3hg7y7h0km7k6c8q7bmm2jrd64la"))))
+ (base32 "0nx55wchwf204ld6jygfn37cjrzc4lspwn5v0qk8i6p92499bv0h"))))
(build-system cmake-build-system)
(arguments
(list
- #:configure-flags #~'("-DLLAMA_BLAS=ON"
+ #:configure-flags
+ #~(list "-DBUILD_SHARED_LIBS=ON"
+ "-DLLAMA_BLAS=ON"
"-DLLAMA_BLAS_VENDOR=OpenBLAS"
+ (string-append "-DBLAS_INCLUDE_DIRS=" #$(this-package-input "openblas") "/include")
+ (string-append "-DBLAS_LIBRARIES=" #$(this-package-input "openblas") "/lib/libopenblas.so")
"-DLLAMA_NATIVE=OFF" ;no '-march=native'
"-DLLAMA_FMA=OFF" ;and no '-mfma', etc.
@@ -584,14 +588,14 @@ (define-public llama-cpp
(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"))))
+ (make-script "convert-hf-to-gguf-update.py"))))
(add-after 'install-python-scripts 'wrap-python-scripts
(assoc-ref python:%standard-phases 'wrap))
(add-after 'install 'install-main
(lambda _
- (copy-file "bin/main" (string-append #$output "/bin/llama")))))))
+ (with-directory-excursion (string-append #$output "/bin")
+ (symlink "main" "llama"))))
+ )))
(inputs (list python))
(native-inputs (list pkg-config))
(propagated-inputs
base-commit: bc8a41f4a8d9f1f0525d7bc97c67ed3c8aea3111
--
2.45.1
next prev parent reply other threads:[~2024-06-11 17:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 5:16 [bug#71219] [PATCH] gnu: llama-cpp: Update configure flags for shared library build Andy Tai
2024-05-28 1:57 ` [bug#71219] [PATCH v2] " Andy Tai
2024-06-03 15:43 ` [bug#71219] [PATCH v3] gnu: llama-cpp: Update commit and update " Andy Tai
2024-06-06 17:52 ` [bug#71219] Andy Tai
2024-06-06 18:12 ` [bug#71219] Christopher Baines
2024-06-11 11:41 ` Andy Tai [this message]
2024-06-11 7:30 ` [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build Andy Tai
2024-06-11 12:02 ` [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and " Andy Tai
2024-07-10 13:47 ` bug#71219: " Ludovic Courtès
2024-07-10 13:49 ` [bug#71219] " Ludovic Courtès
2024-07-10 4:00 ` [bug#71219] Andy Tai via Guix-patches
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6757d7bf6c980f67a9dbae7af763ac1eeb0d34b6.1718090954.git.atai@atai.org \
--to=atai@atai.org \
--cc=71219@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).