[Bugfix] Fix prefix_repetition routing in bench throughput (#29663)

Signed-off-by: Junru Shen <jrshen.sjr@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Junru Shen 2025-12-16 17:37:15 +08:00 committed by GitHub
parent 0e391e7570
commit 676db55eec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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