From: Georgi Gerganov Date: Wed, 18 Jan 2023 20:52:18 +0000 (+0200) Subject: whisper : perform entropy check only when we have at least 32 tokens (#412) X-Git-Tag: upstream/1.7.4~1603 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=1a91c19af929d6dc614a9f3b03026fb23be002a6;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : perform entropy check only when we have at least 32 tokens (#412) --- diff --git a/whisper.cpp b/whisper.cpp index 8846b826..8543e423 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -3721,7 +3721,7 @@ int whisper_full( WHISPER_PRINT_DEBUG("%s: decoder %2d: score = %8.5f, result_len = %3d, avg_logprobs = %8.5f, entropy = %8.5f\n", __func__, j, decoder.sequence.score, decoder.sequence.result_len, decoder.sequence.avg_logprobs, decoder.sequence.entropy); - if (decoder.sequence.result_len > 8 && decoder.sequence.entropy < params.entropy_thold) { + if (decoder.sequence.result_len > 32 && decoder.sequence.entropy < params.entropy_thold) { WHISPER_PRINT_DEBUG("%s: decoder %2d: failed due to entropy %8.5f < %8.5f\n", __func__, j, decoder.sequence.entropy, params.entropy_thold);