mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-23 02:45:01 +08:00
[Bugfix] Fix output token length check logic (#16419)
Signed-off-by: look <eeslook@163.com>
This commit is contained in:
parent
56d4aefa33
commit
7cd0bd7212
@ -156,7 +156,7 @@ def calculate_metrics(
|
|||||||
if outputs[i].success:
|
if outputs[i].success:
|
||||||
output_len = outputs[i].output_tokens
|
output_len = outputs[i].output_tokens
|
||||||
|
|
||||||
if output_len is None:
|
if not output_len:
|
||||||
# We use the tokenizer to count the number of output tokens
|
# We use the tokenizer to count the number of output tokens
|
||||||
# for some serving backends instead of looking at
|
# for some serving backends instead of looking at
|
||||||
# len(outputs[i].itl) since multiple output tokens may be
|
# len(outputs[i].itl) since multiple output tokens may be
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user