Skip to content

feat(vllm-performance): add prefix_repetition benchmark dataset support - #1274

Open
mgazz wants to merge 4 commits into
IBM:mainfrom
mgazz:prefix_repetition_v2
Open

feat(vllm-performance): add prefix_repetition benchmark dataset support#1274
mgazz wants to merge 4 commits into
IBM:mainfrom
mgazz:prefix_repetition_v2

Conversation

@mgazz

@mgazz mgazz commented Jul 24, 2026

Copy link
Copy Markdown
Member

feat(vllm-performance): add prefix_repetition benchmark dataset support

Adds support for the prefix_repetition benchmark dataset to the vllm_performance actuator. This dataset simulates KV-cache prefix-caching workloads by generating requests with a shared cached prefix followed by a unique suffix, making it useful for evaluating prefix-cache hit rates and their effect on throughput and latency.

Changes

benchmark_models.py — Added four new optional fields to BenchmarkParameters: prefix_repetition_prefix_len, prefix_repetition_suffix_len, prefix_repetition_num_prefixes, and prefix_repetition_output_len.

execute_benchmark.py — Extended execute_random_benchmark to accept the four new parameters and, when dataset="prefix_repetition", swap the custom_args dict passed to the vLLM benchmark runner from the --random-* flags to the corresponding --prefix-repetition-* flags.

experiment_executor.py — Threaded the new parameters through both run_resource_and_workload_experiment and run_workload_experiment call sites.

performance_testing.yaml — Added prefix_repetition as a valid dataset value across all five experiment definitions (test-deployment-v1, test-endpoint-v1, test-deployment-guidellm-v1, test-endpoint-guidellm-v1, test-agentic-tool-calling). Declared the four new properties with discrete domains and sensible defaults (prefix len: 2048, suffix len: 128, num prefixes: 10, output len: 128).


AI disclosure: This code was generated using IBM Bob and was reviewed manually.

Signed-off-by: Michele Gazzetti <michele.gazzetti1@ibm.com>
@mgazz
mgazz requested review from AlessandroPomponio and christian-pinto and removed request for christian-pinto July 24, 2026 10:03

@AlessandroPomponio AlessandroPomponio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a bump in the VERSION for vllm-performance

mgazz added 3 commits July 24, 2026 16:26
…lm_benchmark and add defaults for prefix_repetition params

Signed-off-by: Michele Gazzetti <michele.gazzetti1@ibm.com>
Signed-off-by: Michele Gazzetti <michele.gazzetti1@ibm.com>
Signed-off-by: Michele Gazzetti <michele.gazzetti1@ibm.com>
@mgazz

mgazz commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

Comments address as following:

  • dataset typed as Literal[“random”, “prefix_repetition”] with assert_never for exhaustiveness
  • prefix_repetition_* params changed from int | None to int with defaults
  • custom_args built once in an if/elif, no redundant overwrite
  • Domain ranges fixed (off-by-one on upper bounds)
  • VERSION bumped

Comment on lines +39 to +46
prefix_repetition_prefix_len: Annotated[int | None, pydantic.Field()] = None
prefix_repetition_suffix_len: Annotated[int | None, pydantic.Field()] = None
prefix_repetition_num_prefixes: Annotated[int | None, pydantic.Field()] = None
prefix_repetition_output_len: Annotated[int | None, pydantic.Field()] = None
burstiness: Annotated[float, pydantic.Field()] = 1.0
dataset: Annotated[str | None, pydantic.Field()] = "random"
dataset: Annotated[
Literal["random", "prefix_repetition"] | None, pydantic.Field()
] = "random"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields here are still optional while in other places they aren't optional anymore

"--random-output-len": max_output_tokens,
}

if dataset == "prefix_repetition":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is still nothing actually checking that dataset is only "random" or "prefix_repetition"

dataset=benchmark_parameters.dataset,
burstiness=benchmark_parameters.burstiness,
)
elif benchmark_parameters.dataset == "bfcl":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the dataset can be more than just "random" and "prefix_repetition"

Comment on lines +600 to +602
dataset: Literal["random", "prefix_repetition"] = (
benchmark_parameters.dataset or "random"
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still allows values other than the two defined to go through, unless I'm missing validation somewhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants