Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
72d3a30c
Unverified
Commit
72d3a30c
authored
Feb 05, 2024
by
Woosuk Kwon
Committed by
GitHub
Feb 05, 2024
Browse files
[Minor] Fix benchmark_latency script (#2765)
parent
c9b45ade
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
benchmarks/benchmark_latency.py
benchmarks/benchmark_latency.py
+5
-2
No files found.
benchmarks/benchmark_latency.py
View file @
72d3a30c
...
...
@@ -37,7 +37,10 @@ def main(args: argparse.Namespace):
max_tokens
=
args
.
output_len
,
)
print
(
sampling_params
)
dummy_prompt_token_ids
=
[[
0
]
*
args
.
input_len
]
*
args
.
batch_size
dummy_prompt_token_ids
=
np
.
random
.
randint
(
10000
,
size
=
(
args
.
batch_size
,
args
.
input_len
))
dummy_prompt_token_ids
=
dummy_prompt_token_ids
.
tolist
()
def
run_to_completion
(
profile_dir
:
Optional
[
str
]
=
None
):
if
profile_dir
:
...
...
@@ -71,7 +74,7 @@ def main(args: argparse.Namespace):
"."
)
/
"vllm_benchmark_result"
/
f
"latency_result_
{
time
.
time
()
}
"
print
(
f
"Profiling (results will be saved to '
{
profile_dir
}
')..."
)
run_to_completion
(
profile_dir
=
args
.
profile_
result_
dir
)
run_to_completion
(
profile_dir
=
profile_dir
)
return
# Benchmark.
...
...
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