We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 087d085 commit c687308Copy full SHA for c687308
src/decoding.cc
@@ -526,8 +526,12 @@ namespace ctranslate2 {
526
527
disable_tokens.apply();
528
std::vector<StorageView> logits_vec;
529
- if (return_logits_vocab)
530
- logits_vec = build_logits(logits, cur_batch_size * _beam_size);
+ if (return_logits_vocab) {
+ if (is_expanded)
531
+ logits_vec = build_logits(logits, cur_batch_size * _beam_size);
532
+ else
533
+ logits_vec = build_logits(logits, cur_batch_size);
534
+ }
535
536
StorageView log_probs(dtype, device);
537
if (bias_towards_prefix) {
0 commit comments