char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
0177dcc73
char/aliceai-t5-moe
1#!/usr/bin/env bash 2 3RESULTS ="bench-models-results.txt" 4: > " $ RESULTS " 5 6ARGS_BB ="-c 270336 -npp 512,4096,8192 -npl 1,2,4,8,16,32 -ntg 32" 7ARGS_B ="-d 0,4096,8192,16384,32768 -p 2048 -n 32" 8 9QUICK =0 10DIO =0 11while (( " $ #" )) ;do 12case " $ 1 " in 13 --quick)QUICK =1;shift ;; 14 --dio)DIO =1;shift ;; 15 *)shift ;; 16esac 17done 18 19if (( QUICK )) ;then 20ARGS_BB ="-c 20480 -npp 512,4096 -npl 1,2,4 -ntg 32" 21ARGS_B ="-d 0 -p 2048 -n 32" 22fi 23 24if (( DIO )) ;then 25ARGS_BB =" ${ ARGS_BB } --load-mode dio" 26ARGS_B =" ${ ARGS_B } --load-mode dio" 27fi 28 29run_model () { 30 localHFR =$ 1 31 localHFF =$ 2 32 33printf "## ${ HFR } \n" | tee -a " $ RESULTS " 34printf "\n" | tee -a " $ RESULTS " 35printf "Model: https://huggingface.co/ ${ HFR } \n" | tee -a " $ RESULTS " 36printf "\n" | tee -a " $ RESULTS " 37 38printf -- "- \`llama-batched-bench\`\n" | tee -a " $ RESULTS " 39printf "\n" | tee -a " $ RESULTS " 40 41./bin/llama-batched-bench \ 42-hfr " ${ HFR } " -hff " ${ HFF } " \ 43-m " ${ HFF } " -fa 1-ub 2048 \ 44${ ARGS_BB } | tee -a " $ RESULTS " 45 46printf "\n" | tee -a " $ RESULTS " 47 48printf -- "- \`llama-bench\`\n" | tee -a " $ RESULTS " 49printf "\n" | tee -a " $ RESULTS " 50 51./bin/llama-bench \ 52-m " ${ HFF } " -fa 1-ub 2048 \ 53${ ARGS_B } | tee -a " $ RESULTS " 54 55printf "\n" | tee -a " $ RESULTS " 56 57printf "\n" 58} 59 60run_model "ggml-org/gpt-oss-20b-GGUF" "gpt-oss-20b-mxfp4.gguf" 61run_model "ggml-org/gpt-oss-120b-GGUF" "gpt-oss-120b-mxfp4-00001-of-00003.gguf" 62run_model "ggml-org/Qwen3-Coder-30B-A3B-Instruct-Q8_0-GGUF" "qwen3-coder-30b-a3b-instruct-q8_0.gguf" 63run_model "ggml-org/Qwen2.5-Coder-7B-Q8_0-GGUF" "qwen2.5-coder-7b-q8_0.gguf" 64run_model "ggml-org/gemma-3-4b-it-qat-GGUF" "gemma-3-4b-it-qat-Q4_0.gguf" 65run_model "ggml-org/GLM-4.7-Flash-GGUF" "GLM-4.7-Flash-Q8_0.gguf" 66 67if [[ -f models-extra.txt ]];then 68while read -r HFR HFF;do 69 [[ -z" $ HFR " ]]&& continue 70run_model " $ HFR " " $ HFF " 71done < models-extra.txt 72fi 73 74printf "\n=====================================\n" 75printf "\n" 76 77cat " $ RESULTS " 78 79printf "\n" 80printf "Done! Results are written to $ RESULTS \n" 81printf "\n" 82