v2.5.1 修复解码速度荒谬值:兼容 vLLM reasoning 字段思维链 + 幻影token防护(usage有token但流无正文时解码速度置空)

This commit is contained in:
2026-09-06 02:17:40 +08:00
parent 3fe82328b6
commit 901232c75f
3 changed files with 15 additions and 5 deletions
+4
View File
@@ -200,6 +200,10 @@ class TestRunner(threading.Thread):
total_ms = max((batch_end - batch_start) * 1000.0, 0.1)
prefill = (total_prompt / (ttft_ms / 1000.0)) if total_prompt else None
decode = (total_output / (decode_ms / 1000.0)) if total_output else None
# 防“幻影 token”:所有流都没收到任何流式文本但 usage 报了输出 token(如推理用满 max_tokens),
# 整批解码时间无意义,不报数百万的荒谬解码速度
if total_output and decode is not None and not total_ochars:
decode = None
agg = {
"concurrency": concurrency,