-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bugfix: Illogical "Avoid computing higher temperatures on no_speech" #1903
Conversation
Related: SYSTRAN/faster-whisper#621 |
I think this bug can trigger the hallucination loops because on some hallucination it wouldn't trigger the prompt reset on high temperature , and because higher temperatures are not computed on what is not an actual "silence". |
@TheoBoyer @jongwook , would be great if you could have a look. |
This change is consistent with the rest of the code, so I'm not against it. The original PR indeed skipped processing based on the However, I'm skeptical about involving PR #1279 was created because In the (too) few experiments I conducted, the model seemed capable of hallucinating high-probability tokens during silences. It would be beneficial if someone could further investigate the relevance of incorporating |
|
My guess was right, Today I encountered one:
No hallucination loop with this bugfix:
|
Bugfix for openai#1279 It's "silence" when decoding has failed due to `compression_ratio_threshold` too, when further down the code it's not "silence" anymore. "Silence" should be only when decoding has failed due to `logprob_threshold`. Like described there: https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L421 And in code there: https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L243-L251
Another example of hallucination fix: #1962 |
@jongwook Why this bugfix still not merged? Maybe it's confusing, read the description of #1279 :
This PR still retains full functionality of what is described in the quote above. And fixes the #1279 bug where it skips computing higher temperatures when the no_speech condition is not fulfilled, it should skip only when it's fulfilled. That bug can cause the hallucination loops, probably it's responsible for a big portion of all those hallucinations reported. |
…penai#1903) * Bugfix: Illogical "Avoid computing higher temperatures on no_speech" Bugfix for openai#1279 It's "silence" when decoding has failed due to `compression_ratio_threshold` too, when further down the code it's not "silence" anymore. "Silence" should be only when decoding has failed due to `logprob_threshold`. Like described there: https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L421 And in code there: https://github.com/openai/whisper/blob/8bc8860694949db53c42ba47ddc23786c2e02a8b/whisper/transcribe.py#L243-L251 * Fix if "logprob_threshold=None" --------- Co-authored-by: Jong Wook Kim <jongwook@openai.com>
Bugfix for #1279
The bug: It's "silence" when decoding has failed due to
compression_ratio_threshold
[+no_speech_threshold] in #1279, when further down the code it's not "silence" anymore."Silence" should be only when decoding has failed due to
logprob_threshold
[+no_speech_threshold].Like described there:
whisper/whisper/transcribe.py
Line 421 in 8bc8860
And in code there:
whisper/whisper/transcribe.py
Lines 243 to 251 in 8bc8860