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

expect 'max_length' in BELLE-2/Belle-whisper-large-v3-zh/config.json when converting to ggml #585

Open
XUJiahua opened this issue May 21, 2024 · 1 comment

Comments

@XUJiahua
Copy link

reproduce the error:

git clone https://github.com/openai/whisper
git clone https://github.com/ggerganov/whisper.cpp
git clone https://huggingface.co/BELLE-2/Belle-whisper-large-v3-zh

python whisper.cpp/models/convert-h5-to-ggml.py ./Belle-whisper-large-v3-zh ./whisper .

Traceback (most recent call last):
  File "/Users/jiahua/projects/asr/whisper.cpp/models/convert-h5-to-ggml.py", line 115, in <module>
    fout.write(struct.pack("i", hparams["max_length"]))
                                ~~~~~~~^^^^^^^^^^^^^^
KeyError: 'max_length'
@cyp0633
Copy link

cyp0633 commented Jul 26, 2024

I added the value from whisper-large-v3,

{
  ...
  "max_length": 448,
  ...
}

to config.json. It worked.

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

2 participants