Skip to content

Commit d4d7d2f

Browse files
committed
ci : add open llama 3B-v2 tg tests for q4 and q5 quantizations
ggml-ci
1 parent 74aed41 commit d4d7d2f

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

ci/run.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,39 @@ function gg_run_open_llama_3b_v2 {
125125
set -e
126126

127127
path_models="../models-mnt/open-llama/3B-v2"
128+
128129
model_f16="${path_models}/ggml-model-f16.bin"
129130
model_q4_0="${path_models}/ggml-model-q4_0.bin"
131+
model_q4_1="${path_models}/ggml-model-q4_1.bin"
132+
model_q5_0="${path_models}/ggml-model-q5_0.bin"
133+
model_q5_1="${path_models}/ggml-model-q5_1.bin"
130134

131135
python3 ../convert.py ${path_models}
136+
132137
./bin/quantize ${model_f16} ${model_q4_0} q4_0
138+
./bin/quantize ${model_f16} ${model_q4_1} q4_1
139+
./bin/quantize ${model_f16} ${model_q5_0} q5_0
140+
./bin/quantize ${model_f16} ${model_q5_1} q5_1
133141

134-
(time ./bin/main --model ${model_f16} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg.log
135-
(time ./bin/main --model ${model_q4_0} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg.log
142+
(time ./bin/main --model ${model_f16} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg-f16.log
143+
(time ./bin/main --model ${model_q4_0} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg-q4_0.log
144+
(time ./bin/main --model ${model_q4_1} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg-q4_1.log
145+
(time ./bin/main --model ${model_q5_0} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg-q5_0.log
146+
(time ./bin/main --model ${model_q5_1} -s 1234 -n 64 -t 8 -p "I believe the meaning of life is") 2>&1 | tee -a $OUT/${ci}-tg-q5_1.log
136147

137148
set +e
138149
}
139150

140151
function gg_sum_open_llama_3b_v2 {
141152
gg_printf '### %s\n\n' "${ci}"
142153

143-
gg_printf 'OpenLLaMA 3B-v2\n'
154+
gg_printf 'OpenLLaMA 3B-v2: text generation\n'
144155
gg_printf '- status: %s\n' "$(cat $OUT/${ci}.exit)"
145-
gg_printf '```\n'
146-
gg_printf '%s\n' "$(cat $OUT/${ci}-tg.log)"
147-
gg_printf '```\n'
156+
gg_printf '- f16: \n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-f16.log)"
157+
gg_printf '- q4_0:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q4_0.log)"
158+
gg_printf '- q4_1:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q4_1.log)"
159+
gg_printf '- q5_0:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q5_0.log)"
160+
gg_printf '- q5_1:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q5_1.log)"
148161
}
149162

150163
## main

0 commit comments

Comments
 (0)