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
49bfe4cb
Commit
49bfe4cb
authored
Feb 11, 2025
by
zhuwenwen
Browse files
add latency
parent
99d49945
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
benchmarks/benchmark_throughput.py
benchmarks/benchmark_throughput.py
+1
-0
vllm/benchmarks/benchmark_throughput.py
vllm/benchmarks/benchmark_throughput.py
+2
-0
No files found.
benchmarks/benchmark_throughput.py
View file @
49bfe4cb
...
...
@@ -443,6 +443,7 @@ def main(args: argparse.Namespace):
"following metrics are not accurate because image tokens are not"
" counted. See vllm-project/vllm/issues/9778 for details."
)
# TODO(vllm-project/vllm/issues/9778): Count molti-modal token length.
print
(
f
"Latency:
{
elapsed_time
:.
2
f
}
s"
)
print
(
f
"Throughput:
{
len
(
requests
)
/
elapsed_time
:.
2
f
}
requests/s, "
f
"
{
total_num_tokens
/
elapsed_time
:.
2
f
}
total tokens/s, "
f
"
{
total_output_tokens
/
elapsed_time
:.
2
f
}
output tokens/s"
)
...
...
vllm/benchmarks/benchmark_throughput.py
View file @
49bfe4cb
# SPDX-License-Identifier: Apache-2.0
"""Benchmark offline inference throughput."""
import
argparse
import
dataclasses
...
...
@@ -442,6 +443,7 @@ def main(args: argparse.Namespace):
"following metrics are not accurate because image tokens are not"
" counted. See vllm-project/vllm/issues/9778 for details."
)
# TODO(vllm-project/vllm/issues/9778): Count molti-modal token length.
print
(
f
"Latency:
{
elapsed_time
:.
2
f
}
s"
)
print
(
f
"Throughput:
{
len
(
requests
)
/
elapsed_time
:.
2
f
}
requests/s, "
f
"
{
total_num_tokens
/
elapsed_time
:.
2
f
}
total tokens/s, "
f
"
{
total_output_tokens
/
elapsed_time
:.
2
f
}
output tokens/s"
)
...
...
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