Skip to content

Commit 68d4dd3

Browse files
committed
ci : add open llama 3B-v2 tests
ggml-ci
1 parent d2c3214 commit 68d4dd3

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

ci/run.sh

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -108,45 +108,44 @@ function gg_sum_ctest_release {
108108
gg_printf '```\n'
109109
}
110110

111-
# mpt
112-
113-
#function gg_run_mpt {
114-
# cd ${SRC}
115-
#
116-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/raw/main/config.json
117-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/raw/main/tokenizer.json
118-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/raw/main/tokenizer_config.json
119-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/raw/main/pytorch_model.bin.index.json
120-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/raw/main/configuration_mpt.py
121-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/resolve/main/pytorch_model-00001-of-00002.bin
122-
# gg_wget models/mpt/7B/ https://huggingface.co/mosaicml/mpt-7b/resolve/main/pytorch_model-00002-of-00002.bin
123-
#
124-
# cd build-ci-release
125-
#
126-
# set -e
127-
#
128-
# path_models="../models/mpt/7B"
129-
# model_f16="${path_models}/ggml-model-f16.bin"
130-
# model_q4_0="${path_models}/ggml-model-q4_0.bin"
131-
#
132-
# python3 ../examples/mpt/convert-h5-to-ggml.py ${path_models} 1
133-
# ./bin/mpt-quantize ${model_f16} ${model_q4_0} q4_0
134-
#
135-
# (time ./bin/mpt --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
136-
# (time ./bin/mpt --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
137-
#
138-
# set +e
139-
#}
140-
#
141-
#function gg_sum_mpt {
142-
# gg_printf '### %s\n\n' "${ci}"
143-
#
144-
# gg_printf 'Runs short MPT text generation\n'
145-
# gg_printf '- status: %s\n' "$(cat $OUT/${ci}.exit)"
146-
# gg_printf '```\n'
147-
# gg_printf '%s\n' "$(cat $OUT/${ci}-tg.log)"
148-
# gg_printf '```\n'
149-
#}
111+
# open_llama_3b_v2
112+
113+
function gg_run_open_llama_3b_v2 {
114+
cd ${SRC}
115+
116+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/config.json
117+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/resolve/main/tokenizer.model
118+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/tokenizer_config.json
119+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/special_tokens_map.json
120+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/resolve/main/pytorch_model.bin
121+
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/generation_config.json
122+
123+
cd build-ci-release
124+
125+
set -e
126+
127+
path_models="../models-mnt/open-llama/3B-v2"
128+
model_f16="${path_models}/ggml-model-f16.bin"
129+
model_q4_0="${path_models}/ggml-model-q4_0.bin"
130+
131+
python3 ../convert.py ${path_models}
132+
./bin/quantize ${model_f16} ${model_q4_0} q4_0
133+
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
136+
137+
set +e
138+
}
139+
140+
function gg_sum_open_llama_3b_v2 {
141+
gg_printf '### %s\n\n' "${ci}"
142+
143+
gg_printf 'OpenLLaMA 3B-v2\n'
144+
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'
148+
}
150149

151150
## main
152151

@@ -164,8 +163,8 @@ ret=0
164163
test $ret -eq 0 && gg_run ctest_debug
165164
test $ret -eq 0 && gg_run ctest_release
166165

167-
#if [ -z $GG_BUILD_LOW_PERF ]; then
168-
# test $ret -eq 0 && gg_run mpt
169-
#fi
166+
if [ -z $GG_BUILD_LOW_PERF ]; then
167+
test $ret -eq 0 && gg_run open_llama_3b_v2
168+
fi
170169

171170
exit $ret

0 commit comments

Comments
 (0)