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
0cc566ca
Unverified
Commit
0cc566ca
authored
Oct 04, 2024
by
Andy Dai
Committed by
GitHub
Oct 04, 2024
Browse files
[Misc] Add random seed for prefix cache benchmark (#9081)
parent
05c531be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
benchmarks/benchmark_prefix_caching.py
benchmarks/benchmark_prefix_caching.py
+3
-1
No files found.
benchmarks/benchmark_prefix_caching.py
View file @
0cc566ca
...
...
@@ -113,7 +113,7 @@ def repeat_and_sort_requests(requests: List[Tuple[str, int, int]],
def
main
(
args
):
tokenizer
=
get_tokenizer
(
args
.
model
,
trust_remote_code
=
True
)
input_length_range
=
tuple
(
map
(
int
,
args
.
input_length_range
.
split
(
':'
)))
random
.
seed
(
args
.
seed
)
if
args
.
dataset_path
is
not
None
:
print
(
f
"Start to sample
{
args
.
num_prompts
}
prompts"
"from {args.dataset_path}"
)
...
...
@@ -194,5 +194,7 @@ if __name__ == "__main__":
default
=
'128:256'
,
help
=
'Range of input lengths for sampling prompts,'
'specified as "min:max" (e.g., "128:256").'
)
parser
.
add_argument
(
"--seed"
,
type
=
int
,
default
=
0
,
help
=
'Random seed for reproducibility'
)
args
=
parser
.
parse_args
()
main
(
args
)
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