Spaces:
Running
Running
Sanchit Gandhi
commited on
whisper : improve support for distil-large-v3 (#1982)
Browse files- whisper.cpp +3 -3
whisper.cpp
CHANGED
|
@@ -5349,11 +5349,11 @@ int whisper_full_with_state(
|
|
| 5349 |
}
|
| 5350 |
}
|
| 5351 |
|
| 5352 |
-
// distilled models require the "no_timestamps" token
|
| 5353 |
{
|
| 5354 |
-
const bool is_distil = ctx->model.hparams.n_text_layer == 2;
|
| 5355 |
if (is_distil && !params.no_timestamps) {
|
| 5356 |
-
WHISPER_LOG_WARN("%s: using distilled
|
| 5357 |
params.no_timestamps = true;
|
| 5358 |
}
|
| 5359 |
}
|
|
|
|
| 5349 |
}
|
| 5350 |
}
|
| 5351 |
|
| 5352 |
+
// first release distilled models require the "no_timestamps" token
|
| 5353 |
{
|
| 5354 |
+
const bool is_distil = ctx->model.hparams.n_text_layer == 2 && ctx->model.hparams.n_vocab != 51866;
|
| 5355 |
if (is_distil && !params.no_timestamps) {
|
| 5356 |
+
WHISPER_LOG_WARN("%s: using first release distilled models - forcing no_timestamps\n", __func__);
|
| 5357 |
params.no_timestamps = true;
|
| 5358 |
}
|
| 5359 |
}
|