From 60d38c4d5ce8cbd7e14d90e614ceb2c8f313adc5 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Wed, 8 Nov 2023 10:58:58 -0700 Subject: [PATCH] update distil.sh --- rust-whisper.d/models/distil.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/rust-whisper.d/models/distil.sh b/rust-whisper.d/models/distil.sh index 6c7ff5f..7dfeed2 100644 --- a/rust-whisper.d/models/distil.sh +++ b/rust-whisper.d/models/distil.sh @@ -17,15 +17,17 @@ if ! test -d ./whisper.cpp; then fi cd ./whisper.cpp/models -for name in distil-medium.en; do # distil-large-v2 - if ! test -d ./$name; then - git clone https://huggingface.co/distil-whisper/$name +for name in distil-medium.en; do # distil-large-v2 + if ! test -f ../../ggml-$name.bin; then + if ! test -d ./$name; then + git clone https://huggingface.co/distil-whisper/$name + fi + cd ./$name + git lfs install + git lfs pull --include $(ls ggml*.en.bin | grep -v fp32) + git lfs install + mv $(ls ggml*.en.bin | grep -v fp32) ../../ggml-$name.bin + cd .. + rm -rf ./$name fi - cd ./$name - git lfs install - git lfs pull - git lfs install - cd .. - python3 ./convert-h5-to-ggml.py ./$name/ ../../whisper . - mv ./ggml-model.bin ../../ggml-$name.bin done