Upload folder using huggingface_hub
Browse files- .gitattributes +4 -0
- Llama-3.2-1B-Instruct-Q4_K_M.llamafile +3 -0
- Llama-3.2-1B-Instruct-Q5_K_M.llamafile +3 -0
- Llama-3.2-1B-Instruct-Q6_K.llamafile +3 -0
- Llama-3.2-1B-Instruct-Q8_0.llamafile +3 -0
- Llama-3.2-1B-Instruct.BF16.llamafile +2 -2
- Llama-3.2-1B-Instruct.F16.llamafile +2 -2
- llamafile-upgrade-engine +127 -0
.gitattributes
CHANGED
@@ -36,3 +36,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
36 |
Llama-3.2-1B-Instruct.Q6_K.llamafile filter=lfs diff=lfs merge=lfs -text
|
37 |
Llama-3.2-1B-Instruct.F16.llamafile filter=lfs diff=lfs merge=lfs -text
|
38 |
Llama-3.2-1B-Instruct.BF16.llamafile filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
36 |
Llama-3.2-1B-Instruct.Q6_K.llamafile filter=lfs diff=lfs merge=lfs -text
|
37 |
Llama-3.2-1B-Instruct.F16.llamafile filter=lfs diff=lfs merge=lfs -text
|
38 |
Llama-3.2-1B-Instruct.BF16.llamafile filter=lfs diff=lfs merge=lfs -text
|
39 |
+
Llama-3.2-1B-Instruct-Q4_K_M.llamafile filter=lfs diff=lfs merge=lfs -text
|
40 |
+
Llama-3.2-1B-Instruct-Q5_K_M.llamafile filter=lfs diff=lfs merge=lfs -text
|
41 |
+
Llama-3.2-1B-Instruct-Q6_K.llamafile filter=lfs diff=lfs merge=lfs -text
|
42 |
+
Llama-3.2-1B-Instruct-Q8_0.llamafile filter=lfs diff=lfs merge=lfs -text
|
Llama-3.2-1B-Instruct-Q4_K_M.llamafile
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ac1c2864000bad7f62ee56ee908d3f55dd051a267d015b15fa6e831e69767b55
|
3 |
+
size 1115445277
|
Llama-3.2-1B-Instruct-Q5_K_M.llamafile
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:776ad53e02829fcae92a0718ecf37cf0cfd7b78b5c3c818281ba6edc135bf3a7
|
3 |
+
size 1219254301
|
Llama-3.2-1B-Instruct-Q6_K.llamafile
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d0f60ff60aa529a3a3802203f555601e18357ee976fdfb0b3ae5d5f4cd60083
|
3 |
+
size 1329551385
|
Llama-3.2-1B-Instruct-Q8_0.llamafile
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e8cf4620df01da4b33821ab22cde3fdb31d68609bbeec83d5ef22a9103fb260
|
3 |
+
size 1628854297
|
Llama-3.2-1B-Instruct.BF16.llamafile
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dcf9cf3089feb7de425ea942027c4bf632d22ae99b3a4094ff82b51bd01dfe72
|
3 |
+
size 2787334162
|
Llama-3.2-1B-Instruct.F16.llamafile
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d055eb4177274f8fb3187331f3c3bc52fb5c287de62dc817dc4a32538439ef72
|
3 |
+
size 2787334160
|
llamafile-upgrade-engine
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
BIN="${0%/*}"
|
3 |
+
PROG="${0##*/}"
|
4 |
+
|
5 |
+
print_full_help() {
|
6 |
+
cat << EOF
|
7 |
+
Usage: $PROG [OPTION]... <old> (new)
|
8 |
+
Upgrade llamafile archives.
|
9 |
+
|
10 |
+
Options:
|
11 |
+
-h, --help display this help and exit
|
12 |
+
-f, --force skip version check
|
13 |
+
-v, --verbose verbose mode
|
14 |
+
|
15 |
+
Arguments:
|
16 |
+
<old> the name of the old llamafile archive to be upgraded
|
17 |
+
(new) the name of the new llamafile archive to be created
|
18 |
+
if not defined output will be <old>.updated.llamafile
|
19 |
+
|
20 |
+
Example:
|
21 |
+
$PROG old.llamafile new.llamafile
|
22 |
+
This command will upgrade the old_llamafile to a new llamafile named new_llamafile.
|
23 |
+
|
24 |
+
When you run this program, it's recommended that you've
|
25 |
+
downloaded or installed an official llamafile-VERSION.zip
|
26 |
+
from https://github.com/Mozilla-Ocho/llamafile/releases
|
27 |
+
because they include prebuilt DLLs for CUDA and ROCm.
|
28 |
+
You can verify your llamafile has them w/ unzip -vl
|
29 |
+
EOF
|
30 |
+
}
|
31 |
+
|
32 |
+
abort() {
|
33 |
+
echo "Error: $1" >&2
|
34 |
+
cat << EOF >&2
|
35 |
+
Usage: $PROG [OPTION]... <old> (new)
|
36 |
+
Upgrade llamafile archives.
|
37 |
+
Refer to --help for full instructions.
|
38 |
+
EOF
|
39 |
+
exit 1
|
40 |
+
}
|
41 |
+
|
42 |
+
if [ x"$1" = x"-h" ] || [ x"$1" = x"--help" ]; then
|
43 |
+
print_full_help >&2
|
44 |
+
exit 0
|
45 |
+
fi
|
46 |
+
|
47 |
+
|
48 |
+
# find paths of golden llamafile binaries
|
49 |
+
#
|
50 |
+
# 1. if user downloaded `llamafile-VERSION.zip`, extracted it, and ran
|
51 |
+
# `./llamafile-VERSION/bin/llamafile-upgrade-engine` directly, then we can
|
52 |
+
# support that by looking for a `llamafile` in the same bin folder.
|
53 |
+
#
|
54 |
+
# 2. otherwise, perform a $PATH lookup for llamafile
|
55 |
+
#
|
56 |
+
LLAMAFILE="$BIN/llamafile"
|
57 |
+
if [ ! -x "$LLAMAFILE" ]; then
|
58 |
+
LLAMAFILE="$(command -v llamafile)" || abort "llamafile not found in PATH"
|
59 |
+
fi
|
60 |
+
ZIPALIGN="$BIN/zipalign"
|
61 |
+
if [ ! -x "$ZIPALIGN" ]; then
|
62 |
+
ZIPALIGN="$(command -v zipalign)" || abort "zipalign not found in PATH"
|
63 |
+
fi
|
64 |
+
|
65 |
+
# Parse command-line options
|
66 |
+
force_upgrade=false
|
67 |
+
verbose=false
|
68 |
+
while getopts "fv" opt; do
|
69 |
+
case $opt in
|
70 |
+
f)
|
71 |
+
force_upgrade=true
|
72 |
+
echo "Skipping version check."
|
73 |
+
;;
|
74 |
+
v)
|
75 |
+
verbose=true
|
76 |
+
echo "Verbose Output Mode."
|
77 |
+
;;
|
78 |
+
esac
|
79 |
+
done
|
80 |
+
|
81 |
+
# Shift the option parameters
|
82 |
+
shift $((OPTIND - 1))
|
83 |
+
|
84 |
+
# Remove .llamafile extension from arguments if present
|
85 |
+
if [ -z "${1}" ]; then
|
86 |
+
abort "Missing path to old llamafile archive to be upgraded"
|
87 |
+
else
|
88 |
+
old_llamafile="${1%.llamafile}"
|
89 |
+
fi
|
90 |
+
|
91 |
+
if [ -z "$2" ]; then
|
92 |
+
new_llamafile="${old_llamafile}.updated"
|
93 |
+
else
|
94 |
+
new_llamafile="${2%.llamafile}"
|
95 |
+
fi
|
96 |
+
|
97 |
+
# Obtain versions of old and new llamafiles
|
98 |
+
old_llamafile_engine_version="$("./$old_llamafile".llamafile --version)" || abort "Failed to get version of old llamafile"
|
99 |
+
new_llamafile_engine_version="$("$LLAMAFILE" --version)" || abort "Failed to get version of new llamafile"
|
100 |
+
|
101 |
+
# Check if llamafile has been upgraded
|
102 |
+
echo "== Engine Version Check ==" >&2
|
103 |
+
echo "Engine version from $old_llamafile: $old_llamafile_engine_version" >&2
|
104 |
+
echo "Engine version from $LLAMAFILE: $new_llamafile_engine_version" >&2
|
105 |
+
if [ "$old_llamafile_engine_version" = "$new_llamafile_engine_version" ] && [ "$force_upgrade" != "true" ]; then
|
106 |
+
echo "Upgrade not required. Exiting..." >&2
|
107 |
+
exit 0
|
108 |
+
fi
|
109 |
+
|
110 |
+
if [ "$verbose" = "true" ]; then
|
111 |
+
echo "== Current Content ==" >&2
|
112 |
+
zipinfo "${old_llamafile}.llamafile" || abort "Failed to get current content of old llamafile"
|
113 |
+
fi
|
114 |
+
|
115 |
+
tempdir="$(mktemp -d)" || abort "Failed to create temporary directory"
|
116 |
+
trap 'rm -rf "$tempdir"' EXIT
|
117 |
+
|
118 |
+
echo "== Repackaging / Upgrading ==" >&2
|
119 |
+
echo "extracting..." >&2
|
120 |
+
unzip "${old_llamafile}.llamafile" -d "$tempdir" || abort "Failed to extract old llamafile"
|
121 |
+
echo "repackaging..." >&2
|
122 |
+
cp "$LLAMAFILE" "${new_llamafile}.llamafile" || abort "Failed to copy new llamafile"
|
123 |
+
"$ZIPALIGN" -j0 "${new_llamafile}.llamafile" "$tempdir"/*.gguf "$tempdir"/.args || abort "Failed to repackaging"
|
124 |
+
|
125 |
+
echo "== Completed ==" >&2
|
126 |
+
echo "Original File: ${old_llamafile}.llamafile" >&2
|
127 |
+
echo "Upgraded File: ${new_llamafile}.llamafile" >&2
|