]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : improve support for distil-large-v3 (#1982)
authorSanchit Gandhi <redacted>
Thu, 21 Mar 2024 16:53:30 +0000 (22:23 +0530)
committerGitHub <redacted>
Thu, 21 Mar 2024 16:53:30 +0000 (18:53 +0200)
whisper.cpp

index ed4c8181f2e25a188cb948cb2947f560494150c5..0a820c4f14368d6b98f927f4f407bd4910e9f240 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;
         }
     }