From: Sanchit Gandhi Date: Thu, 21 Mar 2024 16:53:30 +0000 (+0530) Subject: whisper : improve support for distil-large-v3 (whisper/1982) X-Git-Tag: upstream/0.0.1642~800 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2f55f417f9b81e5152fe365f1ab491498775ad1c;p=pkg%2Fggml%2Fsources%2Fggml whisper : improve support for distil-large-v3 (whisper/1982) --- diff --git a/examples/whisper/whisper.cpp b/examples/whisper/whisper.cpp index a43e50da..8cb7e0dd 100644 --- a/examples/whisper/whisper.cpp +++ b/examples/whisper/whisper.cpp @@ -5349,11 +5349,11 @@ int whisper_full_with_state( } } - // distilled models require the "no_timestamps" token + // first release distilled models require the "no_timestamps" token { - const bool is_distil = ctx->model.hparams.n_text_layer == 2; + const bool is_distil = ctx->model.hparams.n_text_layer == 2 && ctx->model.hparams.n_vocab != 51866; if (is_distil && !params.no_timestamps) { - WHISPER_LOG_WARN("%s: using distilled model - forcing no_timestamps\n", __func__); + WHISPER_LOG_WARN("%s: using first release distilled models - forcing no_timestamps\n", __func__); params.no_timestamps = true; } }