whisper : improve support for distil-large-v3 (#1982)

pull/1823/merge
Sanchit Gandhi 2024-03-21 22:23:30 +05:30 committed by GitHub
parent 48a145207e
commit fff24a0148
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View 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;
}
}