Commit a14613a6 authored by 王敏's avatar 王敏
Browse files

[fix]解决同时开启chunked-prefill和并行解码出现的指标统计错误问题

parent 4bce8dab
...@@ -1225,7 +1225,7 @@ class Scheduler(SchedulerInterface): ...@@ -1225,7 +1225,7 @@ class Scheduler(SchedulerInterface):
spec_decoding_stats = self.make_spec_decoding_stats( spec_decoding_stats = self.make_spec_decoding_stats(
spec_decoding_stats, spec_decoding_stats,
num_draft_tokens=len(scheduled_spec_token_ids), num_draft_tokens=len(scheduled_spec_token_ids),
num_accepted_tokens=len(generated_token_ids) - 1) num_accepted_tokens=max(0, len(generated_token_ids) - 1))
# NOTE(woosuk): This has to be executed after updating # NOTE(woosuk): This has to be executed after updating
# `request.num_computed_tokens`. # `request.num_computed_tokens`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment