From 676db55eecf8b6d9ec38ea243cf6f35ea8378ec6 Mon Sep 17 00:00:00 2001 From: Junru Shen Date: Tue, 16 Dec 2025 17:37:15 +0800 Subject: [PATCH] [Bugfix] Fix prefix_repetition routing in bench throughput (#29663) Signed-off-by: Junru Shen Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- vllm/benchmarks/throughput.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vllm/benchmarks/throughput.py b/vllm/benchmarks/throughput.py index d824e982b7489..37b8952a350b4 100644 --- a/vllm/benchmarks/throughput.py +++ b/vllm/benchmarks/throughput.py @@ -346,7 +346,10 @@ def get_requests(args, tokenizer): "output_len": args.output_len, } - if args.dataset_path is None or args.dataset_name == "random": + if args.dataset_name == "random" or ( + args.dataset_path is None + and args.dataset_name not in {"prefix_repetition", "random-mm", "random-rerank"} + ): sample_kwargs["range_ratio"] = args.random_range_ratio sample_kwargs["prefix_len"] = args.prefix_len dataset_cls = RandomDataset