Skip to content

Commit 55ac3b7

Browse files
authored
ci : use Pythia models instead of OpenLlama (ggml-org#7470)
* ci : start using Pythia models over OpenLlama ggml-ci * ci : disable q2_k ppl tests * ci : use convert-hf-to-gguf.py * ci : update gg_get_model * ci : fix convert outfile name ggml-ci * llama : gptneox arch use F32 attn prec ggml-ci
1 parent dacfceb commit 55ac3b7

File tree

2 files changed

+178
-42
lines changed

2 files changed

+178
-42
lines changed

ci/run.sh

Lines changed: 176 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,15 @@ function gg_sum_test_scripts_release {
202202
}
203203

204204
function gg_get_model {
205-
local gguf_3b="$MNT/models/open-llama/3B-v2/ggml-model-f16.gguf"
206-
local gguf_7b="$MNT/models/open-llama/7B-v2/ggml-model-f16.gguf"
207-
if [[ -s $gguf_3b ]]; then
208-
echo -n "$gguf_3b"
209-
elif [[ -s $gguf_7b ]]; then
210-
echo -n "$gguf_7b"
205+
local gguf_0="$MNT/models/pythia/1.4B/ggml-model-f16.gguf"
206+
local gguf_1="$MNT/models/pythia/2.8B/ggml-model-f16.gguf"
207+
local gguf_2="$MNT/models/open-llama/7B-v2/ggml-model-f16.gguf"
208+
if [[ -s $gguf_0 ]]; then
209+
echo -n "$gguf_0"
210+
elif [[ -s $gguf_1 ]]; then
211+
echo -n "$gguf_1"
212+
elif [[ -s $gguf_2 ]]; then
213+
echo -n "$gguf_2"
211214
else
212215
echo >&2 "No model found. Can't run gg_run_ctest_with_model."
213216
exit 1
@@ -256,33 +259,169 @@ function gg_sum_ctest_with_model_release {
256259
gg_printf '```\n'
257260
}
258261

259-
# open_llama_3b_v2
262+
# open_llama_7b_v2
263+
# requires: GG_BUILD_CUDA
260264

261-
function gg_run_open_llama_3b_v2 {
265+
function gg_run_open_llama_7b_v2 {
262266
cd ${SRC}
263267

264-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/config.json
265-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/resolve/main/tokenizer.model
266-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/tokenizer_config.json
267-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/special_tokens_map.json
268-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/resolve/main/pytorch_model.bin
269-
gg_wget models-mnt/open-llama/3B-v2/ https://huggingface.co/openlm-research/open_llama_3b_v2/raw/main/generation_config.json
268+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/config.json
269+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/tokenizer.model
270+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/tokenizer_config.json
271+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/special_tokens_map.json
272+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/pytorch_model.bin.index.json
273+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/pytorch_model-00001-of-00002.bin
274+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/pytorch_model-00002-of-00002.bin
275+
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/generation_config.json
276+
277+
gg_wget models-mnt/wikitext/ https://huggingface.co/datasets/ggml-org/ci/resolve/main/wikitext-2-raw-v1.zip
278+
unzip -o models-mnt/wikitext/wikitext-2-raw-v1.zip -d models-mnt/wikitext/
279+
280+
path_models="../models-mnt/open-llama/7B-v2"
281+
path_wiki="../models-mnt/wikitext/wikitext-2-raw"
282+
283+
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
284+
285+
set -e
286+
287+
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} -DLLAMA_CUDA=1 .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
288+
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
289+
290+
python3 ../convert.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
291+
292+
model_f16="${path_models}/ggml-model-f16.gguf"
293+
model_q8_0="${path_models}/ggml-model-q8_0.gguf"
294+
model_q4_0="${path_models}/ggml-model-q4_0.gguf"
295+
model_q4_1="${path_models}/ggml-model-q4_1.gguf"
296+
model_q5_0="${path_models}/ggml-model-q5_0.gguf"
297+
model_q5_1="${path_models}/ggml-model-q5_1.gguf"
298+
model_q2_k="${path_models}/ggml-model-q2_k.gguf"
299+
model_q3_k="${path_models}/ggml-model-q3_k.gguf"
300+
model_q4_k="${path_models}/ggml-model-q4_k.gguf"
301+
model_q5_k="${path_models}/ggml-model-q5_k.gguf"
302+
model_q6_k="${path_models}/ggml-model-q6_k.gguf"
303+
304+
wiki_test="${path_wiki}/wiki.test.raw"
305+
306+
./bin/quantize ${model_f16} ${model_q8_0} q8_0
307+
./bin/quantize ${model_f16} ${model_q4_0} q4_0
308+
./bin/quantize ${model_f16} ${model_q4_1} q4_1
309+
./bin/quantize ${model_f16} ${model_q5_0} q5_0
310+
./bin/quantize ${model_f16} ${model_q5_1} q5_1
311+
./bin/quantize ${model_f16} ${model_q2_k} q2_k
312+
./bin/quantize ${model_f16} ${model_q3_k} q3_k
313+
./bin/quantize ${model_f16} ${model_q4_k} q4_k
314+
./bin/quantize ${model_f16} ${model_q5_k} q5_k
315+
./bin/quantize ${model_f16} ${model_q6_k} q6_k
316+
317+
(time ./bin/main --model ${model_f16} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-f16.log
318+
(time ./bin/main --model ${model_q8_0} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q8_0.log
319+
(time ./bin/main --model ${model_q4_0} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q4_0.log
320+
(time ./bin/main --model ${model_q4_1} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q4_1.log
321+
(time ./bin/main --model ${model_q5_0} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q5_0.log
322+
(time ./bin/main --model ${model_q5_1} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q5_1.log
323+
(time ./bin/main --model ${model_q2_k} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q2_k.log
324+
(time ./bin/main --model ${model_q3_k} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q3_k.log
325+
(time ./bin/main --model ${model_q4_k} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q4_k.log
326+
(time ./bin/main --model ${model_q5_k} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q5_k.log
327+
(time ./bin/main --model ${model_q6_k} -t 1 -ngl 999 -s 1234 -n 256 --ignore-eos -p "I believe the meaning of life is" ) 2>&1 | tee -a $OUT/${ci}-tg-q6_k.log
328+
329+
(time ./bin/perplexity --model ${model_f16} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-f16.log
330+
(time ./bin/perplexity --model ${model_q8_0} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q8_0.log
331+
(time ./bin/perplexity --model ${model_q4_0} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q4_0.log
332+
(time ./bin/perplexity --model ${model_q4_1} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q4_1.log
333+
(time ./bin/perplexity --model ${model_q5_0} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q5_0.log
334+
(time ./bin/perplexity --model ${model_q5_1} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q5_1.log
335+
(time ./bin/perplexity --model ${model_q2_k} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q2_k.log
336+
(time ./bin/perplexity --model ${model_q3_k} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q3_k.log
337+
(time ./bin/perplexity --model ${model_q4_k} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q4_k.log
338+
(time ./bin/perplexity --model ${model_q5_k} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q5_k.log
339+
(time ./bin/perplexity --model ${model_q6_k} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-tg-q6_k.log
340+
341+
(time ./bin/imatrix --model ${model_f16} -f ${wiki_test} -t 1 -ngl 999 -c 2048 -b 512 --chunks 4 ) 2>&1 | tee -a $OUT/${ci}-imatrix.log
342+
343+
(time ./bin/save-load-state -ngl 10 --model ${model_q4_0} ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
344+
(time ./bin/save-load-state -fa -ngl 10 --model ${model_q4_0} ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
345+
(time ./bin/save-load-state -ngl 99 --model ${model_q4_0} ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
346+
(time ./bin/save-load-state -fa -ngl 99 --model ${model_q4_0} ) 2>&1 | tee -a $OUT/${ci}-save-load-state.log
347+
348+
function check_ppl {
349+
qnt="$1"
350+
ppl=$(echo "$2" | grep -oE "[0-9]+\.[0-9]+" | tail -n 1)
351+
352+
if [ $(echo "$ppl > 20.0" | bc) -eq 1 ]; then
353+
printf ' - %s @ %s (FAIL: ppl > 20.0)\n' "$qnt" "$ppl"
354+
return 20
355+
fi
356+
357+
printf ' - %s @ %s OK\n' "$qnt" "$ppl"
358+
return 0
359+
}
360+
361+
check_ppl "f16" "$(cat $OUT/${ci}-tg-f16.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
362+
check_ppl "q8_0" "$(cat $OUT/${ci}-tg-q8_0.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
363+
check_ppl "q4_0" "$(cat $OUT/${ci}-tg-q4_0.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
364+
check_ppl "q4_1" "$(cat $OUT/${ci}-tg-q4_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
365+
check_ppl "q5_0" "$(cat $OUT/${ci}-tg-q5_0.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
366+
check_ppl "q5_1" "$(cat $OUT/${ci}-tg-q5_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
367+
check_ppl "q2_k" "$(cat $OUT/${ci}-tg-q2_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
368+
check_ppl "q3_k" "$(cat $OUT/${ci}-tg-q3_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
369+
check_ppl "q4_k" "$(cat $OUT/${ci}-tg-q4_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
370+
check_ppl "q5_k" "$(cat $OUT/${ci}-tg-q5_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
371+
check_ppl "q6_k" "$(cat $OUT/${ci}-tg-q6_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
372+
373+
cat $OUT/${ci}-imatrix.log | grep "Final" >> $OUT/${ci}-imatrix-sum.log
374+
375+
set +e
376+
}
377+
378+
function gg_sum_open_llama_7b_v2 {
379+
gg_printf '### %s\n\n' "${ci}"
380+
381+
gg_printf 'OpenLLaMA 7B-v2:\n'
382+
gg_printf '- status: %s\n' "$(cat $OUT/${ci}.exit)"
383+
gg_printf '- perplexity:\n%s\n' "$(cat $OUT/${ci}-ppl.log)"
384+
gg_printf '- imatrix:\n```\n%s\n```\n' "$(cat $OUT/${ci}-imatrix-sum.log)"
385+
gg_printf '- f16: \n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-f16.log)"
386+
gg_printf '- q8_0:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q8_0.log)"
387+
gg_printf '- q4_0:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q4_0.log)"
388+
gg_printf '- q4_1:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q4_1.log)"
389+
gg_printf '- q5_0:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q5_0.log)"
390+
gg_printf '- q5_1:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q5_1.log)"
391+
gg_printf '- q2_k:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q2_k.log)"
392+
gg_printf '- q3_k:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q3_k.log)"
393+
gg_printf '- q4_k:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q4_k.log)"
394+
gg_printf '- q5_k:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q5_k.log)"
395+
gg_printf '- q6_k:\n```\n%s\n```\n' "$(cat $OUT/${ci}-tg-q6_k.log)"
396+
gg_printf '- save-load-state: \n```\n%s\n```\n' "$(cat $OUT/${ci}-save-load-state.log)"
397+
}
398+
399+
# pythia_1.4b
400+
401+
function gg_run_pythia_1_4b {
402+
cd ${SRC}
403+
404+
gg_wget models-mnt/pythia/1.4B/ https://huggingface.co/EleutherAI/pythia-1.4b/raw/main/config.json
405+
gg_wget models-mnt/pythia/1.4B/ https://huggingface.co/EleutherAI/pythia-1.4b/raw/main/tokenizer.json
406+
gg_wget models-mnt/pythia/1.4B/ https://huggingface.co/EleutherAI/pythia-1.4b/raw/main/tokenizer_config.json
407+
gg_wget models-mnt/pythia/1.4B/ https://huggingface.co/EleutherAI/pythia-1.4b/raw/main/special_tokens_map.json
408+
gg_wget models-mnt/pythia/1.4B/ https://huggingface.co/EleutherAI/pythia-1.4b/resolve/main/pytorch_model.bin
270409

271410
gg_wget models-mnt/wikitext/ https://huggingface.co/datasets/ggml-org/ci/resolve/main/wikitext-2-raw-v1.zip
272411
unzip -o models-mnt/wikitext/wikitext-2-raw-v1.zip -d models-mnt/wikitext/
273412
head -n 60 models-mnt/wikitext/wikitext-2-raw/wiki.test.raw > models-mnt/wikitext/wikitext-2-raw/wiki.test-60.raw
274413

275-
path_models="../models-mnt/open-llama/3B-v2"
414+
path_models="../models-mnt/pythia/1.4B"
276415
path_wiki="../models-mnt/wikitext/wikitext-2-raw"
277416

278417
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
279418

280419
set -e
281420

282-
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} -DLLAMA_QKK_64=1 .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
283-
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
421+
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
422+
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
284423

285-
python3 ../convert.py ${path_models}
424+
python3 ../convert-hf-to-gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
286425

287426
model_f16="${path_models}/ggml-model-f16.gguf"
288427
model_q8_0="${path_models}/ggml-model-q8_0.gguf"
@@ -357,7 +496,7 @@ function gg_run_open_llama_3b_v2 {
357496
check_ppl "q4_1" "$(cat $OUT/${ci}-tg-q4_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
358497
check_ppl "q5_0" "$(cat $OUT/${ci}-tg-q5_0.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
359498
check_ppl "q5_1" "$(cat $OUT/${ci}-tg-q5_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
360-
check_ppl "q2_k" "$(cat $OUT/${ci}-tg-q2_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
499+
#check_ppl "q2_k" "$(cat $OUT/${ci}-tg-q2_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log # note: ppl > 20.0 for this quant and model
361500
check_ppl "q3_k" "$(cat $OUT/${ci}-tg-q3_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
362501
check_ppl "q4_k" "$(cat $OUT/${ci}-tg-q4_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
363502
check_ppl "q5_k" "$(cat $OUT/${ci}-tg-q5_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
@@ -368,10 +507,10 @@ function gg_run_open_llama_3b_v2 {
368507
set +e
369508
}
370509

371-
function gg_sum_open_llama_3b_v2 {
510+
function gg_sum_pythia_1_4b {
372511
gg_printf '### %s\n\n' "${ci}"
373512

374-
gg_printf 'OpenLLaMA 3B-v2:\n'
513+
gg_printf 'Pythia 1.4B:\n'
375514
gg_printf '- status: %s\n' "$(cat $OUT/${ci}.exit)"
376515
gg_printf '- perplexity:\n%s\n' "$(cat $OUT/${ci}-ppl.log)"
377516
gg_printf '- imatrix:\n```\n%s\n```\n' "$(cat $OUT/${ci}-imatrix-sum.log)"
@@ -389,25 +528,22 @@ function gg_sum_open_llama_3b_v2 {
389528
gg_printf '- save-load-state: \n```\n%s\n```\n' "$(cat $OUT/${ci}-save-load-state.log)"
390529
}
391530

392-
# open_llama_7b_v2
531+
# pythia_2_8b
393532
# requires: GG_BUILD_CUDA
394533

395-
function gg_run_open_llama_7b_v2 {
534+
function gg_run_pythia_2_8b {
396535
cd ${SRC}
397536

398-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/config.json
399-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/tokenizer.model
400-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/tokenizer_config.json
401-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/special_tokens_map.json
402-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/pytorch_model.bin.index.json
403-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/pytorch_model-00001-of-00002.bin
404-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/resolve/main/pytorch_model-00002-of-00002.bin
405-
gg_wget models-mnt/open-llama/7B-v2/ https://huggingface.co/openlm-research/open_llama_7b_v2/raw/main/generation_config.json
537+
gg_wget models-mnt/pythia/2.8B/ https://huggingface.co/EleutherAI/pythia-2.8b/raw/main/config.json
538+
gg_wget models-mnt/pythia/2.8B/ https://huggingface.co/EleutherAI/pythia-2.8b/raw/main/tokenizer.json
539+
gg_wget models-mnt/pythia/2.8B/ https://huggingface.co/EleutherAI/pythia-2.8b/raw/main/tokenizer_config.json
540+
gg_wget models-mnt/pythia/2.8B/ https://huggingface.co/EleutherAI/pythia-2.8b/raw/main/special_tokens_map.json
541+
gg_wget models-mnt/pythia/2.8B/ https://huggingface.co/EleutherAI/pythia-2.8b/resolve/main/pytorch_model.bin
406542

407543
gg_wget models-mnt/wikitext/ https://huggingface.co/datasets/ggml-org/ci/resolve/main/wikitext-2-raw-v1.zip
408544
unzip -o models-mnt/wikitext/wikitext-2-raw-v1.zip -d models-mnt/wikitext/
409545

410-
path_models="../models-mnt/open-llama/7B-v2"
546+
path_models="../models-mnt/pythia/2.8B"
411547
path_wiki="../models-mnt/wikitext/wikitext-2-raw"
412548

413549
rm -rf build-ci-release && mkdir build-ci-release && cd build-ci-release
@@ -417,7 +553,7 @@ function gg_run_open_llama_7b_v2 {
417553
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} -DLLAMA_CUDA=1 .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
418554
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
419555

420-
python3 ../convert.py ${path_models}
556+
python3 ../convert-hf-to-gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
421557

422558
model_f16="${path_models}/ggml-model-f16.gguf"
423559
model_q8_0="${path_models}/ggml-model-q8_0.gguf"
@@ -494,7 +630,7 @@ function gg_run_open_llama_7b_v2 {
494630
check_ppl "q4_1" "$(cat $OUT/${ci}-tg-q4_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
495631
check_ppl "q5_0" "$(cat $OUT/${ci}-tg-q5_0.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
496632
check_ppl "q5_1" "$(cat $OUT/${ci}-tg-q5_1.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
497-
check_ppl "q2_k" "$(cat $OUT/${ci}-tg-q2_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
633+
#check_ppl "q2_k" "$(cat $OUT/${ci}-tg-q2_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log # note: ppl > 20.0 for this quant and model
498634
check_ppl "q3_k" "$(cat $OUT/${ci}-tg-q3_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
499635
check_ppl "q4_k" "$(cat $OUT/${ci}-tg-q4_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
500636
check_ppl "q5_k" "$(cat $OUT/${ci}-tg-q5_k.log | grep "^\[1\]")" | tee -a $OUT/${ci}-ppl.log
@@ -505,10 +641,10 @@ function gg_run_open_llama_7b_v2 {
505641
set +e
506642
}
507643

508-
function gg_sum_open_llama_7b_v2 {
644+
function gg_sum_pythia_2_8b {
509645
gg_printf '### %s\n\n' "${ci}"
510646

511-
gg_printf 'OpenLLaMA 7B-v2:\n'
647+
gg_printf 'Pythia 2.8B:\n'
512648
gg_printf '- status: %s\n' "$(cat $OUT/${ci}.exit)"
513649
gg_printf '- perplexity:\n%s\n' "$(cat $OUT/${ci}-ppl.log)"
514650
gg_printf '- imatrix:\n```\n%s\n```\n' "$(cat $OUT/${ci}-imatrix-sum.log)"
@@ -552,7 +688,7 @@ function gg_run_embd_bge_small {
552688
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
553689
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
554690

555-
python3 ../convert-hf-to-gguf.py ${path_models}
691+
python3 ../convert-hf-to-gguf.py ${path_models} --outfile ${path_models}/ggml-model-f16.gguf
556692

557693
model_f16="${path_models}/ggml-model-f16.gguf"
558694
model_q8_0="${path_models}/ggml-model-q8_0.gguf"
@@ -606,10 +742,10 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then
606742

607743
if [ -z ${GG_BUILD_VRAM_GB} ] || [ ${GG_BUILD_VRAM_GB} -ge 8 ]; then
608744
if [ -z ${GG_BUILD_CUDA} ]; then
609-
#test $ret -eq 0 && gg_run open_llama_3b_v2
610-
date # dummy
745+
test $ret -eq 0 && gg_run pythia_1_4b
611746
else
612-
test $ret -eq 0 && gg_run open_llama_7b_v2
747+
test $ret -eq 0 && gg_run pythia_2_8b
748+
#test $ret -eq 0 && gg_run open_llama_7b_v2
613749
fi
614750
test $ret -eq 0 && gg_run ctest_with_model_debug
615751
test $ret -eq 0 && gg_run ctest_with_model_release

0 commit comments

Comments
 (0)