* [bug#71219] [PATCH v2] gnu: llama-cpp: Update configure flags for shared library build.
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 ` Andy Tai
2024-06-03 15:43 ` [bug#71219] [PATCH v3] gnu: llama-cpp: Update commit and update " Andy Tai
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2024-05-28 1:57 UTC (permalink / raw)
To: 71219; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (lama-cpp):
[arguments](configure-flags): add cmake configure flag
for shared library build.
Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14
---
gnu/packages/machine-learning.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a385ddc18c..8a332a8b6f 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -541,7 +541,8 @@ (define-public llama-cpp
(build-system cmake-build-system)
(arguments
(list
- #:configure-flags #~'("-DLLAMA_BLAS=ON"
+ #:configure-flags #~'("-DBUILD_SHARED_LIBS=ON"
+ "-DLLAMA_BLAS=ON"
"-DLLAMA_BLAS_VENDOR=OpenBLAS"
"-DLLAMA_NATIVE=OFF" ;no '-march=native'
@@ -591,7 +592,9 @@ (define-public llama-cpp
(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: 0f3a25a25e212bfa8ab9db37d267fb260a087e5d
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#71219] [PATCH v3] gnu: llama-cpp: Update commit and update configure flags for shared library build.
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 ` Andy Tai
2024-06-06 17:52 ` [bug#71219] Andy Tai
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2024-06-03 15:43 UTC (permalink / raw)
To: 71219; +Cc: Andy Tai
* 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.
(phases) 'install-python-scripts: Remove references to deleted scripts
and add new ones upsteeam.
Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14
---
gnu/packages/machine-learning.scm | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a385ddc18c..52966bd8bc 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,11 +537,12 @@ (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 #~'("-DBUILD_SHARED_LIBS=ON"
+ "-DLLAMA_BLAS=ON"
"-DLLAMA_BLAS_VENDOR=OpenBLAS"
"-DLLAMA_NATIVE=OFF" ;no '-march=native'
@@ -584,14 +585,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: 879fc9b3f0c2e58c6232da03b94eba98c78e2d99
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#71219]
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 ` Andy Tai
2024-06-06 18:12 ` [bug#71219] Christopher Baines
2024-06-11 11:41 ` [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build Andy Tai
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Andy Tai @ 2024-06-06 17:52 UTC (permalink / raw)
To: 71219
patch passes Guix QA
https://qa.guix.gnu.org/issue/71219
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build.
2024-05-27 5:16 [bug#71219] [PATCH] gnu: llama-cpp: Update configure flags for shared library build Andy Tai
` (2 preceding siblings ...)
2024-06-06 17:52 ` [bug#71219] Andy Tai
@ 2024-06-11 11:41 ` Andy Tai
2024-06-11 7:30 ` Andy Tai
2024-06-11 12:02 ` [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and " Andy Tai
2024-07-10 4:00 ` [bug#71219] Andy Tai via Guix-patches
5 siblings, 1 reply; 11+ messages in thread
From: Andy Tai @ 2024-06-11 11:41 UTC (permalink / raw)
To: 71219; +Cc: Andy Tai
* 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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build.
2024-06-11 11:41 ` [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build Andy Tai
@ 2024-06-11 7:30 ` Andy Tai
0 siblings, 0 replies; 11+ messages in thread
From: Andy Tai @ 2024-06-11 7:30 UTC (permalink / raw)
To: 71219; +Cc: Andy Tai
* 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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and configure flags for shared library build.
2024-05-27 5:16 [bug#71219] [PATCH] gnu: llama-cpp: Update configure flags for shared library build Andy Tai
` (3 preceding siblings ...)
2024-06-11 11:41 ` [bug#71219] [PATCH v4] gnu: llama-cpp: Update commit and update configure flags for shared library build Andy Tai
@ 2024-06-11 12:02 ` 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
5 siblings, 2 replies; 11+ messages in thread
From: Andy Tai @ 2024-06-11 12:02 UTC (permalink / raw)
To: 71219; +Cc: Andy Tai
* gnu/packages/machine-learning.scm (lama-cpp): Update to commit a5735e with
pkg-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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#71219: [PATCH v5] gnu: llama-cpp: Update commit and configure flags for shared library build.
2024-06-11 12:02 ` [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and " Andy Tai
@ 2024-07-10 13:47 ` Ludovic Courtès
2024-07-10 13:49 ` [bug#71219] " Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-07-10 13:47 UTC (permalink / raw)
To: Andy Tai; +Cc: 71219-done
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Hi Andy,
Andy Tai <atai@atai.org> skribis:
> * gnu/packages/machine-learning.scm (lama-cpp): Update to commit a5735e with
> pkg-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
Applied with the indentation changes shown below. Thanks!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1902 bytes --]
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a2be0bf9c8..1cb6586e81 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -567,18 +567,22 @@ (define-public llama-cpp
(arguments
(list
#: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")
+ #~(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.
- "-DLLAMA_AVX2=OFF"
- "-DLLAMA_AVX512=OFF"
- "-DLLAMA_AVX512_VBMI=OFF"
- "-DLLAMA_AVX512_VNNI=OFF")
+ "-DLLAMA_NATIVE=OFF" ;no '-march=native'
+ "-DLLAMA_FMA=OFF" ;and no '-mfma', etc.
+ "-DLLAMA_AVX2=OFF"
+ "-DLLAMA_AVX512=OFF"
+ "-DLLAMA_AVX512_VBMI=OFF"
+ "-DLLAMA_AVX512_VNNI=OFF")
#:modules '((ice-9 textual-ports)
(guix build utils)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and configure flags for shared library build.
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 ` Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2024-07-10 13:49 UTC (permalink / raw)
To: Andy Tai; +Cc: 71219
Andy Tai <atai@atai.org> skribis:
> (define-public llama-cpp
> - (let ((commit "fed0108491a3a3cbec6c6480dc8667ffff9d7659")
> + (let ((commit "a5735e4426b19a3ebd0c653ad8ac01420458ee95")
> (revision "2"))
Also bumped ‘revision’, as explained here:
https://guix.gnu.org/manual/devel/en/html_node/Version-Numbers.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#71219]
2024-05-27 5:16 [bug#71219] [PATCH] gnu: llama-cpp: Update configure flags for shared library build Andy Tai
` (4 preceding siblings ...)
2024-06-11 12:02 ` [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and " Andy Tai
@ 2024-07-10 4:00 ` Andy Tai via Guix-patches
5 siblings, 0 replies; 11+ messages in thread
From: Andy Tai via Guix-patches @ 2024-07-10 4:00 UTC (permalink / raw)
To: 71219
patch passed QA
https://qa.guix.gnu.org/issue/71219
^ permalink raw reply [flat|nested] 11+ messages in thread