Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ async def benchmark(
# warmup短输出:取128和hyper_parameters中max_tokens的最小值
warmup_output_len = min(128, hyper_parameters.get("max_tokens", 128))
warmup_hyper = {k: v for k, v in hyper_parameters.items() if k != "max_tokens"}
# warmup 缩短了 max_tokens,min_tokens 必须一起收敛,否则服务端返回 400
if warmup_hyper.get("min_tokens") is not None:
warmup_hyper["min_tokens"] = min(int(warmup_hyper["min_tokens"]), warmup_output_len)
warmup_request_id = f"warmup_{uuid.uuid4().hex[:8]}"
test_input = RequestFuncInput(
model=model_id,
Expand Down
Loading