mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-24 06:46:37 +00:00
b0502836b8
* whisper : migrate to ggml-backend * whisper : fix logit reading * whisper : fix tensor allocation during load * whisper : fix beam-search with CUDA * whisper : free backends + fix compile warning * whisper : print when CUDA is enabled * whisper : fix CoreML * make : clean-up * talk : fix compile warning * whisper : support ggml_conv with CUDA and Metal (#1473) * ggml : add CUDA support for ggml_conv * whisper : remove ggml_repeat for conv bias + single backend * cuda : fix im2col kernel * metal : add im2col support + mul mat-vec f16 x f16 * bench-all : add q4 models * whisper : clean-up * quantize-all : fix * ggml : im2col opts * whisper : avoid whisper_model_data wrapper * whisper : add note that ggml_mul_mat_pad does not work with CUDA * whisper : factor out graph compute in common function * whisper : fixes * whisper : fix UB with measure buffers * whisper : try to fix the parallel whisper_state functionality (#1479) * whisper : try to fix the parallel whisper_state functionality * whisper : fix multi-state Metal * whisper : free backend instances in whisper_state
38 lines
843 B
Bash
Executable File
38 lines
843 B
Bash
Executable File
#!/bin/bash
|
|
|
|
printf "Usage: $0 <upload>"
|
|
|
|
if [ $# -ne 1 ]; then
|
|
printf "\nError: Invalid number of arguments\n"
|
|
exit 1
|
|
fi
|
|
|
|
qtype0="q5_0"
|
|
qtype1="q5_1"
|
|
upload="$1"
|
|
declare -a filedex
|
|
|
|
cd `dirname $0`
|
|
cd ../
|
|
|
|
for i in `ls ./models | grep ^ggml-.*.bin | grep -v "\-q"`; do
|
|
m="models/$i"
|
|
if [ -f "$m" ]; then
|
|
if [ "${m##*.}" == "bin" ]; then
|
|
./quantize "${m}" "${m::${#m}-4}-${qtype1}.bin" ${qtype1};
|
|
./quantize "${m}" "${m::${#m}-4}-${qtype0}.bin" ${qtype0};
|
|
filedex+=( "${m::${#m}-4}-${qtype1}.bin" "${m::${#m}-4}-${qtype0}.bin" )
|
|
fi
|
|
fi
|
|
done
|
|
|
|
|
|
|
|
if [ "$upload" == "1" ]; then
|
|
for i in ${!filedex[@]}; do
|
|
if [ "${filedex[$i]:9:8}" != "for-test" ]; then
|
|
scp ${filedex[$i]} root@linode0:/mnt/Data/ggml/ggml-model-${filedex[$i]:9}
|
|
fi
|
|
done
|
|
fi
|