convert-h5-to-ggml.py 即使存在 n_text_ctx 且不是架构,也会将其写入 max_length (跟进 #2477,可能解释 #2778)

作者: hqudsi创建于 2026年8月11日更新于 2026年9月11日
标签stale

#2477 "max_length from max_target_positions", fixed by 06a1da9daf: the linked model has max_length absent. #2840 "improved handling of missing max_length", merged 2025-03-17: also the absent/invalid case (lines 87-95). Both reach for max_target_positions as a default when max_length is missing, rather than as the source. When max_length is present and wrong for this purpose, neither path fires. This may be the cause of #2778 (open). #2778 reports "it generates the output, however, when trying to load it with whisper.cpp it fails loading" for a fine-tuned non-English checkpoint - the same symptom, from the same population (fine-tunes are where max_length gets set). I cannot confirm it: that issue does not include config.json, the loader's output, or a link to the model. If @the-reporter-of-2778 is still around, this is a one-command check:

内容来源: ggml-org/whisper.cpp