summaryrefslogtreecommitdiff
path: root/scripts/run-all-perf.sh
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-08-24 19:26:19 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-08-24 19:26:47 +0300
commit8f8c28e89cb9531211783da697d6e7c445e2af1d (patch)
tree1952e494b5299d156650e4e68a1b78086f8a294a /scripts/run-all-perf.sh
parent7694adda8d1111b3cf758ad6c91d754a0a4cacff (diff)
convert : auto-determine model name based on dir + scripts update
Diffstat (limited to 'scripts/run-all-perf.sh')
-rwxr-xr-xscripts/run-all-perf.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/run-all-perf.sh b/scripts/run-all-perf.sh
new file mode 100755
index 00000000..91a6d853
--- /dev/null
+++ b/scripts/run-all-perf.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+qnt=(f16 q8_0 q6_k q5_k q5_1 q5_0 q4_k q4_1 q4_0 q3_k q2_k)
+args="-ngl 999 -n 64 -p 512"
+
+if [ -z "$1" ]; then
+ echo "usage: $0 <model> [qnt] [args]"
+ echo "default: $0 <model> \"${qnt[@]}\" \"${args}\""
+ exit 1
+fi
+
+if [ ! -z "$2" ]; then
+ qnt=($2)
+fi
+
+if [ ! -z "$3" ]; then
+ args="$3"
+fi
+
+model="$1"
+out="../tmp/results-${model}"
+
+mkdir -p ${out}
+
+mstr=""
+
+for q in ${qnt[@]}; do
+ mstr="${mstr} -m ../models/${model}/ggml-model-${q}.gguf"
+done
+
+./bin/llama-bench ${mstr} ${args} 2> /dev/null