How to correctly convert this ckpt model to ggml model or to gguf model?
#1
by
Raphy10-Collab
- opened
I want to convert this ckpt model to ggml model or to gguf model :
https://huggingface.co/nonhmello/whisper_medium_th_common_voice_17
(.venv) raphy@raohy:~/whisper.cpp/models$ cat download_w_medium_th_common_voice_17.py
from huggingface_hub import snapshot_download
model_id="nonhmello/whisper_medium_th_common_voice_17"
snapshot_download(repo_id=model_id, local_dir="w_medium_th_common_voice_17",
local_dir_use_symlinks=False, revision="main")
(.venv) raphy@raohy:~/whisper.cpp/models$ python3 download_w_medium_th_common_voice_17.py
/home/raphy/whisper.cpp/models/.venv/lib/python3.12/site-packages/huggingface_hub/file_download.py:832: UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir`.
For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder.
warnings.warn(
.gitattributes: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.52k/1.52k [00:00<00:00, 4.37MB/s]
normalizer.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 52.7k/52.7k [00:00<00:00, 13.2MB/s]
merges.txt: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 494k/494k [00:00<00:00, 4.84MB/s]
config.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.38k/1.38k [00:00<00:00, 20.3MB/s]
generation_config.json: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 3.70k/3.70k [00:00<00:00, 27.7MB/s]
README.md: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2.16k/2.16k [00:00<00:00, 4.97MB/s]
(β¦).tfevents.1732787687.2a3bdb675848.1885.0: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 16.8k/16.8k [00:00<00:00, 53.2MB/s]
(β¦).tfevents.1732800650.2a3bdb675848.1885.1: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 406/406 [00:00<00:00, 5.16MB/s]
added_tokens.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 34.6k/34.6k [00:00<00:00, 31.8MB/s]
preprocessor_config.json: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 339/339 [00:00<00:00, 3.21MB/s]
special_tokens_map.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2.19k/2.19k [00:00<00:00, 8.50MB/s]
training_args.bin: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 5.37k/5.37k [00:00<00:00, 17.7MB/s]
vocab.json: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.04M/1.04M [00:00<00:00, 3.33MB/s]
tokenizer_config.json: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 283k/283k [00:00<00:00, 1.42MB/s]
model.safetensors: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 3.06G/3.06G [01:13<00:00, 41.5MB/s]
Fetching 15 files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 15/15 [01:14<00:00, 4.94s/it]
(.venv) raphy@raohy:~/whisper.cpp/models$
(.venv) raphy@raohy:~/whisper.cpp/models/w_medium_th_common_voice_17$ python3 ../llama.cpp/convert-ckpt-to-ggml.py . --outfile w_medium_th_common_voice_17.ggml --outtype 16
2025-01-14 18:04:42.835244: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1736874282.851570 50986 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1736874282.855805 50986 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-01-14 18:04:42.875756: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/home/raphy/whisper.cpp/models/w_medium_th_common_voice_17/../llama.cpp/convert-ckpt-to-ggml.py", line 66, in <module>
with open(dir_model + "/encoder.json", "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './encoder.json'
(.venv) raphy@raohy:~/whisper.cpp/models/w_medium_th_common_voice_17$ python3 ../llama.cpp/convert_hf_to_gguf.py . --outfile w_medium_th_common_voice_17.gguf --outtype f16
INFO:hf-to-gguf:Loading model:
ERROR:hf-to-gguf:Model WhisperForConditionalGeneration is not supported
How to correctly convert the cpkt model to ggml model or to gguf model?