Add Qwen3.6 validation and benchmark coverage
This commit is contained in:
@@ -35,6 +35,7 @@ class SpeedRow:
|
||||
scenario: str # e.g. "single/short", "concurrent-4"
|
||||
requests: int
|
||||
completion_tokens_total: int
|
||||
prompt_tokens_mean: float
|
||||
wall_s: float
|
||||
ttft_ms_p50: float
|
||||
ttft_ms_p95: float
|
||||
@@ -64,6 +65,7 @@ def _summarize(system: str, scenario: str, results: list[StreamResult], wall_s:
|
||||
scenario=scenario,
|
||||
requests=len(results),
|
||||
completion_tokens_total=total_tokens,
|
||||
prompt_tokens_mean=(statistics.mean(r.prompt_tokens for r in ok) if ok else 0.0),
|
||||
wall_s=wall_s,
|
||||
ttft_ms_p50=_percentile(ttft_ms, 50),
|
||||
ttft_ms_p95=_percentile(ttft_ms, 95),
|
||||
@@ -82,6 +84,18 @@ async def run_single_stream(
|
||||
rows: list[SpeedRow] = []
|
||||
raw: list[dict[str, Any]] = []
|
||||
for bucket, prompt in SPEED_PROMPTS.items():
|
||||
# Prefill kernels/graphs can be shape-specific. Warm each prompt shape
|
||||
# twice so p95 does not accidentally report one-time graph setup.
|
||||
for _ in range(2):
|
||||
await chat_concurrent(
|
||||
ep.base_url, ep.model_id, [[{"role": "user", "content": prompt}]],
|
||||
max_tokens=cfg.speed_max_tokens,
|
||||
temperature=0.0,
|
||||
api_key=ep.api_key,
|
||||
timeout=cfg.request_timeout_s,
|
||||
concurrency=1,
|
||||
extra_body=ep.extra_body,
|
||||
)
|
||||
messages = [[{"role": "user", "content": prompt}]] * cfg.speed_prompts
|
||||
results, wall = await chat_concurrent(
|
||||
ep.base_url, ep.model_id, messages,
|
||||
@@ -98,6 +112,7 @@ async def run_single_stream(
|
||||
"system": ep.name, "scenario": f"single/{bucket}", "i": i,
|
||||
"ttft_s": r.ttft_s, "tpot_s": r.tpot_s,
|
||||
"completion_tokens": r.completion_tokens,
|
||||
"prompt_tokens": r.prompt_tokens,
|
||||
"e2e_s": r.e2e_s, "error": r.error,
|
||||
"finish_reason": r.finish_reason,
|
||||
})
|
||||
@@ -131,6 +146,7 @@ async def run_concurrent(
|
||||
"system": ep.name, "scenario": f"concurrent-{c}", "i": i,
|
||||
"ttft_s": r.ttft_s, "tpot_s": r.tpot_s,
|
||||
"completion_tokens": r.completion_tokens,
|
||||
"prompt_tokens": r.prompt_tokens,
|
||||
"e2e_s": r.e2e_s, "error": r.error,
|
||||
"finish_reason": r.finish_reason,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user