Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert-ckpt-to-ggml.py : error #1071

Open
raphael10-collab opened this issue Jan 14, 2025 · 0 comments
Open

convert-ckpt-to-ggml.py : error #1071

raphael10-collab opened this issue Jan 14, 2025 · 0 comments

Comments

@raphael10-collab
Copy link

As described here: ggerganov/llama.cpp#11242 ,
I want to convert this https://huggingface.co/speechbrain/asr-whisper-medium-commonvoice-it ckpt model to ggml :

Downloaded the model:

(.venv) raphy@raohy:~/whisper.cpp/models$ cat download-asr-w-medium-commonvoice-it.py
from huggingface_hub import snapshot_download
model_id="speechbrain/asr-whisper-medium-commonvoice-it"
snapshot_download(repo_id=model_id, local_dir="asr-w-medium-commonvoice-it",
                  local_dir_use_symlinks=False, revision="main")



(.venv) raphy@raohy:~/whisper.cpp/models$ python3 download-asr-w-medium-commonvoice-it.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(
example-it.wav: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 136k/136k [00:00<00:00, 1.35MB/s]
config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 43.0/43.0 [00:00<00:00, 133kB/s]
hyperparams.yaml: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.58k/1.58k [00:00<00:00, 8.58MB/s]
.gitattributes: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.52k/1.52k [00:00<00:00, 9.23MB/s]
README.md: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.51k/4.51k [00:00<00:00, 17.3MB/s]
whisper.ckpt: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.06G/3.06G [00:54<00:00, 56.4MB/s]
Fetching 6 files: 100%|█

Downloaded convert-ckpt-to-ggml.py from :

https://github.com/ggerganov/ggml/blob/master/examples/gpt-2/convert-ckpt-to-ggml.py

And tried to convert the file , but got FileNotFoundError: [Errno 2] No such file or directory: './encoder.json' error :

(.venv) raphy@raohy:~/whisper.cpp/models/asr-w-medium-commonvoice-it$ python3 ../llama.cpp/convert-ckpt-to-ggml.py . --outfile asr-w-medium-commonvoice-it.ggml --outtype f16
2025-01-14 17:32:46.776224: 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:1736872366.881500   48970 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:1736872366.910231   48970 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 17:32:47.152768: 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/asr-w-medium-commonvoice-it/../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'

How to make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant