CTranslate2 icon indicating copy to clipboard operation
CTranslate2 copied to clipboard

why whisper max_length set to total_max_length / 2 when prompt is short?

Open CAH9487 opened this issue 10 months ago • 3 comments

I found that when using Whisper, if I set total_max_length to 448 and the prompt length is 4, the max_length is only 224. This might be due to the following code in whisper.cc :

decoding_options.max_length = std::min(total_max_length / 2, total_max_length - start_step);

I would like to ask why it is set to total_max_length / 2 instead of total_max_length - start_step ? Thank you!

CAH9487 avatar Feb 21 '25 10:02 CAH9487

https://github.com/SYSTRAN/faster-whisper/issues/1248 I have also encountered this problem, I think I need to rebuild ctranslate2 to solve this.

ILG2021 avatar Feb 26 '25 19:02 ILG2021

I have the same problem.

dkrystki avatar Jul 18 '25 13:07 dkrystki