Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
a2986b3e
Unverified
Commit
a2986b3e
authored
Oct 14, 2025
by
kourosh hakhamaneshi
Committed by
GitHub
Oct 15, 2025
Browse files
[Bugfix] Fixes prefix-repetition benchmark script (#26828)
Signed-off-by:
Kourosh Hakhamaneshi
<
Kourosh@anyscale.com
>
parent
96b9aa5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vllm/benchmarks/datasets.py
vllm/benchmarks/datasets.py
+4
-3
No files found.
vllm/benchmarks/datasets.py
View file @
a2986b3e
...
@@ -2979,13 +2979,14 @@ class PrefixRepetitionRandomDataset(BenchmarkDataset):
...
@@ -2979,13 +2979,14 @@ class PrefixRepetitionRandomDataset(BenchmarkDataset):
requests
=
[]
requests
=
[]
token_mismatch_total
=
0
token_mismatch_total
=
0
for
_
in
range
(
num_prefixes
):
for
_
in
range
(
num_prefixes
):
prefix_tokens
=
_generate_exact_length_tokens
(
prefix_len
)
prefix_tokens
,
prefix_mismatch
=
_generate_exact_length_tokens
(
prefix_len
)
token_mismatch_total
+=
prefix_mismatch
for
_
in
range
(
prompts_per_prefix
):
for
_
in
range
(
prompts_per_prefix
):
suffix_tokens
,
token
_mis
t
match
=
_generate_exact_length_tokens
(
suffix_tokens
,
suffix
_mismatch
=
_generate_exact_length_tokens
(
suffix_len
suffix_len
)
)
token_mismatch_total
+=
token
_mis
t
match
token_mismatch_total
+=
suffix
_mismatch
combined_tokens
=
prefix_tokens
+
suffix_tokens
combined_tokens
=
prefix_tokens
+
suffix_tokens
prompt
=
tokenizer
.
decode
(
combined_tokens
)
prompt
=
tokenizer
.
decode
(
combined_tokens
)
prompt_len
=
len
(
combined_tokens
)
prompt_len
=
len
(
combined_tokens
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment