[BugFix][Frontend] Fix completion logprobs=0 error (#3731)

This commit is contained in:
Roy
2024-03-29 09:38:21 -07:00
committed by GitHub
parent 6110c39dc8
commit f510395bbf
5 changed files with 26 additions and 7 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ class RequestOutput:
# NOTE: We need omit logprobs here explicitly because the sequence
# always has the logprobs of the sampled tokens even if the
# logprobs are not requested.
include_logprobs = seq_group.sampling_params.logprobs
include_logprobs = seq_group.sampling_params.logprobs is not None
outputs = [
CompletionOutput(seqs.index(seq), seq.output_text,
seq.get_output_token_ids(),