mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 09:37:25 +08:00
[Bugfix][V0] Multi-sequence logprobs streaming edge case (#15259)
Signed-off-by: Andy Lo <andy@mistral.ai>
This commit is contained in:
parent
4c69e228b3
commit
df1430265c
@ -223,7 +223,12 @@ class RequestOutput:
|
||||
if delta:
|
||||
# Slice logprobs delta if applicable
|
||||
if output_logprobs:
|
||||
output_logprobs = output_logprobs[-num_output_tokens:]
|
||||
# num_output_tokens can be 0 when n > 1 and request finishes
|
||||
# before the others
|
||||
if num_output_tokens > 0:
|
||||
output_logprobs = output_logprobs[-num_output_tokens:]
|
||||
else:
|
||||
output_logprobs = None
|
||||
# Don't include prompt if this is after the first output
|
||||
# containing decode token ids
|
||||
if include_prompt and seq.get_output_len() > num_output_tokens:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user