Unverified Commit f16356fe authored by Ming Yang's avatar Ming Yang Committed by GitHub
Browse files

[bench] Support common prefix len config (for decode-only bench) (#29934)


Signed-off-by: default avatarMing Yang <minos.future@gmail.com>
parent 65ee9728
...@@ -1842,6 +1842,7 @@ def get_samples(args, tokenizer) -> list[SampleRequest]: ...@@ -1842,6 +1842,7 @@ def get_samples(args, tokenizer) -> list[SampleRequest]:
random_seed=args.seed, random_seed=args.seed,
dataset_path=args.dataset_path, dataset_path=args.dataset_path,
disable_shuffle=args.disable_shuffle, disable_shuffle=args.disable_shuffle,
prefix_len=args.common_prefix_len,
).sample( ).sample(
tokenizer=tokenizer, tokenizer=tokenizer,
num_requests=args.num_prompts, num_requests=args.num_prompts,
......
...@@ -1221,6 +1221,12 @@ def add_cli_args(parser: argparse.ArgumentParser): ...@@ -1221,6 +1221,12 @@ def add_cli_args(parser: argparse.ArgumentParser):
help="Repetition penalty sampling parameter. Only has effect on " help="Repetition penalty sampling parameter. Only has effect on "
"openai-compatible backends.", "openai-compatible backends.",
) )
sampling_group.add_argument(
"--common-prefix-len",
type=int,
default=None,
help="Common prefix length shared by all prompts (used by random dataset)",
)
parser.add_argument( parser.add_argument(
"--tokenizer-mode", "--tokenizer-mode",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment