You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Hello, I've been tinkering with CTranslate2 with whisper converted to ct2. Using model.generate with return_logits_vocab=True and return_scores=True I'm unable to access or print out the logits entirely. For example:
This issue is reproducible with any input, even though the sequences are transcribed correctly.
Expected Behavior:
I would expect result[0].logits to contain accessible tensors with the logit values or log probs for each token generated.
Actual Behavior:
The logits appear to be empty or not fully accessible, as indicated by the output above.
This is super strange to me because result[0].scores[0] is completely accessible and prints out exactly as expected and I'd have to imagine that the scores attribute is just some mean or derivative of all of the log probs/logits for each token generated by CTranslate2. Which leads me to believe that this is some sort of bug rather than intentional behavior to hide the log probs.
Additional Details:
CTranslate2 Version: 4.5.0
I also tried the latest commit (6a3dc63) which seemed related to the logits issues. While the commit added the logits property on print WhisperGenerationResult with print(result[0]), even there the issue persists with the same empty logits and everything else working:
logits=[[
[cpu:0 float32 storage viewed as ]], [
[cpu:0 float32 storage viewed as ]], [
[cpu:0 float32 storage viewed as ]], [
[cpu:0 float32 storage viewed as ]], [
[cpu:0 float32 storage viewed as ]]
Environment:
Python 3.11.11
MacOS Sequoia 15.2
Running cpu float32 inference on an M1 Pro Macbook.
Please let me know if you need any more information. If this is indeed a bug (and not intended behavior for the Whisper model), I'm happy to investigate further or contribute a fix.
Thanks!
The text was updated successfully, but these errors were encountered:
Confirming repro on CUDA gpu as well.
Tried with 4.5.0 and 4.6.0 including PR #1846 that added the logits to the __repr__.
It seems like the logits are being generated internally, but the StorageView does not contain them.
Description:
Hello, I've been tinkering with CTranslate2 with whisper converted to ct2. Using model.generate with return_logits_vocab=True and return_scores=True I'm unable to access or print out the logits entirely. For example:
This issue is reproducible with any input, even though the sequences are transcribed correctly.
Expected Behavior:
I would expect result[0].logits to contain accessible tensors with the logit values or log probs for each token generated.
Actual Behavior:
The logits appear to be empty or not fully accessible, as indicated by the output above.
This is super strange to me because result[0].scores[0] is completely accessible and prints out exactly as expected and I'd have to imagine that the scores attribute is just some mean or derivative of all of the log probs/logits for each token generated by CTranslate2. Which leads me to believe that this is some sort of bug rather than intentional behavior to hide the log probs.
Additional Details:
CTranslate2 Version: 4.5.0
I also tried the latest commit (6a3dc63) which seemed related to the logits issues. While the commit added the logits property on print WhisperGenerationResult with print(result[0]), even there the issue persists with the same empty logits and everything else working:
Environment:
Python 3.11.11
MacOS Sequoia 15.2
Running cpu float32 inference on an M1 Pro Macbook.
Please let me know if you need any more information. If this is indeed a bug (and not intended behavior for the Whisper model), I'm happy to investigate further or contribute a fix.
Thanks!
The text was updated successfully, but these errors were encountered: