Skip to content

Commit

Permalink
fix: fix bug of outputing cum_log_probs in t5 sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
byshiue committed Jan 10, 2023
1 parent 6ca2d58 commit ab00df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fastertransformer/models/t5/T5Decoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ void T5Decoding<T>::forward(TensorMap* output_tensors,
}

// Return the cumulative log probability and log probability if requested.
if (!using_beam_hyps) {
if (beam_width == 1 || !using_beam_hyps) {
if (output_tensors->isExist("output_log_probs")) {
invokeTransposeAxis01(output_tensors->at("output_log_probs").getPtr<float>(),
output_log_probs_buf_,
Expand Down

0 comments on commit ab00df0

Please sign in to comment.