From 1a91c19af929d6dc614a9f3b03026fb23be002a6 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 18 Jan 2023 22:52:18 +0200 Subject: [PATCH] whisper : perform entropy check only when we have at least 32 tokens (#412) --- whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper.cpp b/whisper.cpp index 8846b82..8543e42 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);