]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
whisper : improve support for distil-large-v3 (whisper/1982)
authorSanchit Gandhi <redacted>
Thu, 21 Mar 2024 16:53:30 +0000 (22:23 +0530)
committerGeorgi Gerganov <redacted>
Wed, 27 Mar 2024 11:35:37 +0000 (13:35 +0200)
examples/whisper/whisper.cpp

index a43e50daa3bfaa2db55dd6c9363a2a7151ebc2ae..8cb7e0ddf747c620e0e30083d1ca019583c72e88 100644 (file)
@@ -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;
         }
     }