@@ -5,9 +5,9 @@ PortGroup github 1.0
5
5
PortGroup cmake 1.1
6
6
PortGroup legacysupport 1.1
7
7
8
- github.setup ggerganov llama.cpp 4534 b
8
+ github.setup ggerganov llama.cpp 4574 b
9
9
github.tarball_from archive
10
- set git-commit 955a6c2
10
+ set git-commit 7fee288
11
11
# This line is for displaying commit in CLI only
12
12
revision 0
13
13
categories llm
@@ -19,9 +19,9 @@ long_description The main goal of ${name} is to enable LLM inference with
19
19
setup and state-of-the-art performance on a wide variety of hardware\
20
20
- locally and in the cloud.
21
21
22
- checksums rmd160 771fa15d2c7b6a3ef9114fd3c0afb676e0ba6559 \
23
- sha256 f4b57daa8d6bfe957f08a79f02ea9d24018ce9e73663c35a5c21f31ed3ccfcb8 \
24
- size 20496342
22
+ checksums rmd160 047ed3d0c1252e83dd78ade21175899e2c7c4b05 \
23
+ sha256 ce168eccb03da802c39486ab6b18dd225027d5c34cfbc5f46fec1870a1bdd624 \
24
+ size 20504479
25
25
26
26
# error: 'filesystem' file not found on 10.14
27
27
legacysupport.newest_darwin_requires_legacy \
@@ -41,8 +41,7 @@ post-patch {
41
41
42
42
compiler.cxx_standard 2017
43
43
44
- configure.args-append -LAH \
45
- -DGGML_LTO=ON \
44
+ configure.args-append -DGGML_LTO=ON \
46
45
-DGGML_CCACHE=OFF \
47
46
-DGGML_OPENMP=OFF \
48
47
-DLLAMA_CURL=ON
@@ -60,6 +59,10 @@ if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx" && \
60
59
-DGGML_METAL_EMBED_LIBRARY=OFF
61
60
}
62
61
62
+ post-destroot {
63
+ delete {*}[glob -directory ${destroot}${prefix} /bin/ convert*.py]
64
+ }
65
+
63
66
variant blas description {Uses BLAS, improves performance} {
64
67
configure.args-append \
65
68
-DGGML_BLAS=ON
@@ -90,6 +93,32 @@ variant openmp description {enable parallelism support using OpenMP} {
90
93
}
91
94
}
92
95
96
+ variant model_converters description {install extra model conversion Python scripts} {
97
+ set ::python_branch 3.12
98
+ set ::python_version [string map {. " " } ${::python_branch} ]
99
+ depends_run-append port:python${::python_version} \
100
+ port:py${::python_version} -numpy \
101
+ port:py${::python_version} -pytorch \
102
+ port:py${::python_version} -transformers \
103
+ port:py${::python_version} -gguf
104
+
105
+ post-patch {
106
+ reinplace " s|#!/usr/bin/env python3|#!${prefix} /bin/python${::python_branch} |" {*}[glob ${worksrcpath} /convert*.py]
107
+ }
108
+
109
+ post-destroot {
110
+ xinstall -d ${destroot}${prefix} /libexec/${name}
111
+ xinstall -m 755 {*}[glob ${worksrcpath} /convert*.py] ${destroot}${prefix} /libexec/${name}
112
+ foreach file [glob -directory ${destroot}${prefix} /libexec/${name} *.py] {
113
+ set filebasename [file rootname [file tail $file ]]
114
+ set link ${destroot}${prefix} /bin/[lindex [split ${name} .] 0]-[string map {_ -} ${filebasename} ]
115
+ set target [string replace ${file} 0 [string length ${destroot} ]-1]
116
+ ui_debug " Creating symlink: ${link} => ${target} "
117
+ ln -s ${target} ${link}
118
+ }
119
+ }
120
+ }
121
+
93
122
variant native description " Force local build and optimize for CPU" {
94
123
configure.args-append \
95
124
-DGGML_NATIVE=ON
0 commit comments