Skip to content

Converting wisper v3 model with convert-h5-to-ggml.py doent work #1520

Description

@LimonAstuto

I had an error using convert-h5-to-ggml.py to convert https://huggingface.co/openai/whisper-large-v3

  File "whisper.cpp/models/convert-h5-to-ggml.py", line 115, in <module>
    fout.write(struct.pack("i", hparams["max_length"]))
KeyError: 'max_length'

Thats because there is not a max_length inside whisper-large-v3 config.json

I modified line 115 to:

fout.write(struct.pack("i", hparams.get("max_length", DEFAULT_MAX_LENGHT)))

and added

DEFAULT_MAX_LENGHT = 448

I dont know if this is correct, but it worked for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions