Комментарии 2
Есть еще с++ порт whisper - https://github.com/ggerganov/whisper.cpp - оптимизирован для CPU. А вообще на CPU конечно это все грустно работает... особенно с large моделью...
Как получить ggml .bin файл из huggingface репки?
# try.py
from transformers import WhisperForConditionalGeneration
import tempfile
import torch
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
model.save_pretrained('./my')
torch.save(model.state_dict(), './my/file.pt')
$ python3 try.py
$ python3 models/convert-pt-to-ggml.py ./my/file.pt ~/code/whisper ./my
Traceback (most recent call last):
File "~/code/whisper.cpp/models/convert-pt-to-ggml.py", line 210, in <module>
hparams = checkpoint["dims"]
~~~~~~~~~~^^^^^^^^
KeyError: 'dims'
Зарегистрируйтесь на Хабре, чтобы оставить комментарий
Создаем сервис для Serverless перевода голоса, как в Cyberpunk 2077