Skip to content

Commit

Permalink
whisper : improve support for distil-large-v3 (#1982)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi authored Mar 21, 2024
1 parent 48a1452 commit fff24a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fff24a0

Please sign in to comment.