Skip to content

Commit a08371b

Browse files
wang2yn84The tunix Authors
authored andcommitted
[Tunix] Use self.config.return_logprobs to determine if logprobs should be returned.
PiperOrigin-RevId: 889446968
1 parent 8ea9ef7 commit a08371b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tunix/generate/vllm_sampler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,5 +505,5 @@ def __call__(
505505
logits=None,
506506
tokens=out_tokens[0],
507507
padded_prompt_tokens=all_input_ids,
508-
logprobs=out_logprobs[0] if len(out_logprobs[0]) else None,
508+
logprobs=out_logprobs[0] if self.config.return_logprobs else None,
509509
)

0 commit comments

Comments
 (0)