summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-08-27 15:24:40 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-08-27 15:24:58 +0300
commit25423e9185b7c2a1881ed8f85cc752a12370be9d (patch)
tree9f3c09a73c9a5175e24c5fa416c4a5f357ff1eb6
parenta6d1189fdd4c1ab4ba23f9d777f8950901dcffb2 (diff)
scripts : helper convert script
-rwxr-xr-xscripts/convert-gg.sh26
-rwxr-xr-xscripts/qnt-all.sh2
-rwxr-xr-xscripts/run-all-perf.sh2
-rwxr-xr-xscripts/run-all-ppl.sh2
4 files changed, 32 insertions, 0 deletions
diff --git a/scripts/convert-gg.sh b/scripts/convert-gg.sh
new file mode 100755
index 00000000..01fda16f
--- /dev/null
+++ b/scripts/convert-gg.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+# LLaMA v1
+python3 convert.py ../llama1/7B --outfile models/llama-7b/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../llama1/13B --outfile models/llama-13b/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../llama1/30B --outfile models/llama-30b/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../llama1/65B --outfile models/llama-65b/ggml-model-f16.gguf --outtype f16
+
+# LLaMA v2
+python3 convert.py ../llama2/llama-2-7b --outfile models/llama-7b-v2/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../llama2/llama-2-13b --outfile models/llama-13b-v2/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../llama2/llama-2-70b --outfile models/llama-70b-v2/ggml-model-f16.gguf --outtype f16
+
+# Code Llama
+python3 convert.py ../codellama/CodeLlama-7b/ --outfile models/codellama-7b/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../codellama/CodeLlama-13b/ --outfile models/codellama-13b/ggml-model-f16.gguf --outtype f16
+python3 convert.py ../codellama/CodeLlama-34b/ --outfile models/codellama-34b/ggml-model-f16.gguf --outtype f16
+
+# Falcon
+python3 convert-falcon-hf-to-gguf.py ../falcon/falcon-7b 1
+mv -v ../falcon/falcon-7b/ggml-model-f16.gguf models/falcon-7b/ggml-model-f16.gguf
+
+python3 convert-falcon-hf-to-gguf.py ../falcon/falcon-40b 1
+mv -v ../falcon/falcon-40b/ggml-model-f16.gguf models/falcon-40b/ggml-model-f16.gguf
diff --git a/scripts/qnt-all.sh b/scripts/qnt-all.sh
index 1b3d07da..1376e419 100755
--- a/scripts/qnt-all.sh
+++ b/scripts/qnt-all.sh
@@ -20,6 +20,8 @@ fi
model="$1"
out="../tmp/results-${model}"
+set -e
+
mkdir -p ${out}
for q in ${qnt[@]}; do
diff --git a/scripts/run-all-perf.sh b/scripts/run-all-perf.sh
index 91a6d853..7391e3dd 100755
--- a/scripts/run-all-perf.sh
+++ b/scripts/run-all-perf.sh
@@ -20,6 +20,8 @@ fi
model="$1"
out="../tmp/results-${model}"
+set -e
+
mkdir -p ${out}
mstr=""
diff --git a/scripts/run-all-ppl.sh b/scripts/run-all-ppl.sh
index 366d0866..f643ca3a 100755
--- a/scripts/run-all-ppl.sh
+++ b/scripts/run-all-ppl.sh
@@ -17,6 +17,8 @@ if [ ! -z "$3" ]; then
args="$3"
fi
+set -e
+
model="$1"
out="../tmp/results-${model}"