gnu: llama-cpp: Update to b3907.

* gnu/packages/machine-learning.scm (llama-cpp): Update to b3907.
[arguments]<#:phases>[install-python-scripts]: Update script names.
[remove-tests]: New phase.

Change-Id: I0a3444f10679279b4517f2a002fead4cd5f45498
This commit is contained in:
Danny Milosavljevic 2024-10-11 23:59:56 +02:00
parent b64f7984a5
commit 7a89bbffd0
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -550,20 +550,19 @@ (define-public guile-aiscm-next
(deprecated-package "guile-aiscm-next" guile-aiscm))
(define-public llama-cpp
(let ((commit "a5735e4426b19a3ebd0c653ad8ac01420458ee95")
(revision "3"))
(let ((tag "b3907"))
(package
(name "llama-cpp")
(version (git-version "0.0.0" revision commit))
(version (string-append "0.0.0-" tag))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ggerganov/llama.cpp")
(commit commit)))
(file-name (git-file-name name version))
(commit tag)))
(file-name (git-file-name name tag))
(sha256
(base32 "0nx55wchwf204ld6jygfn37cjrzc4lspwn5v0qk8i6p92499bv0h"))))
(base32 "0vpqng1lq1r09vi7s1mhqgqgkxn69spp19c2s68i6kk3zbcl7i9b"))))
(build-system cmake-build-system)
(arguments
(list
@ -616,16 +615,17 @@ (define (make-script script)
(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-hf-to-gguf-update.py"))))
(make-script "convert_hf_to_gguf")
(make-script "convert_llama_ggml_to_gguf")
(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 _
(with-directory-excursion (string-append #$output "/bin")
(symlink "main" "llama"))))
)))
(add-after 'install 'remove-tests
(lambda* (#:key outputs #:allow-other-keys)
(for-each delete-file (find-files
(string-append (assoc-ref outputs "out")
"/bin")
"^test-")))))))
(inputs (list python))
(native-inputs (list pkg-config))
(propagated-inputs