Is there a way to convert a regular model.pt to a CTranslate2 model? #235
-
I realize there may be an obvious answer for this but I've been looking for many hours and couldn't find any. It may not even be possible. My company's data scientist is no longer with the company and he was using OpenAI Whisper for the ASR. All we have is the model.pt which he loads like this and works totally fine albeit slow:
I would like to be able to use this same model in faster-whisper and I realize I need to convert it. Is there a way to convert this model to the necessary model if that's all I have to work with? Thank you very much for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Is it a fine-tuned model or one of the pretrained model from OpenAI? If it is one of the pretrained model from OpenAI, you should find what model size it corresponds to (e.g. "small", "medium", etc.) and then use the same size in faster-whisper as shown in the README (no need for a conversion). If it is a fine-tuned model, you should first convert it to a Hugging Face model and then use the conversion script described in the README. |
Beta Was this translation helpful? Give feedback.
-
It's a fine-tuned model. I'll try out that link. Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
@guillaumekln I have a finetuned huggingface whisper model saved locally, I need to convert it ct2 to run with faster-whisper. I have used the script in the readme but it is returning "zsh: segmentation fault ct2-transformers-converter --model --output_dir whisper-urdu-v2-ct2 " . I had checked other issues as well, tried refreshing env and creating new env etc. but no luck, getting the same error. Please help me out. |
Beta Was this translation helpful? Give feedback.
Is it a fine-tuned model or one of the pretrained model from OpenAI?
If it is one of the pretrained model from OpenAI, you should find what model size it corresponds to (e.g. "small", "medium", etc.) and then use the same size in faster-whisper as shown in the README (no need for a conversion).
If it is a fine-tuned model, you should first convert it to a Hugging Face model and then use the conversion script described in the README.