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
change
sglang
Commits
0fdb3127
"vscode:/vscode.git/clone" did not exist on "4b3e9052052c47f5fb367bc2500cc53c9946a2ed"
Unverified
Commit
0fdb3127
authored
Jul 21, 2024
by
zhyncs
Committed by
GitHub
Jul 21, 2024
Browse files
feat: update bench serving (#685)
parent
5ad033a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+9
-3
No files found.
python/sglang/bench_serving.py
View file @
0fdb3127
...
...
@@ -619,8 +619,11 @@ async def benchmark(
and
metrics
.
output_throughput
is
not
None
):
result
=
{
"backend"
:
args
.
backend
,
"dataset_name"
:
args
.
dataset_name
,
"request_rate"
:
request_rate
,
"total_input"
:
metrics
.
total_input
,
"total_output"
:
metrics
.
total_output
,
"median_ttft"
:
metrics
.
median_ttft_ms
,
"median_itl"
:
metrics
.
mean_itl_ms
,
"output_token_throughput"
:
metrics
.
output_throughput
,
...
...
@@ -674,8 +677,11 @@ async def benchmark(
def
parse_request_rate_range
(
request_rate_range
):
start
,
stop
,
step
=
map
(
int
,
request_rate_range
.
split
(
","
))
return
list
(
range
(
start
,
stop
,
step
))
if
len
(
request_rate_range
.
split
(
","
))
==
3
:
start
,
stop
,
step
=
map
(
int
,
request_rate_range
.
split
(
","
))
return
list
(
range
(
start
,
stop
,
step
))
else
:
return
list
(
map
(
int
,
request_rate_range
.
split
(
","
)))
def
fire
(
args
:
argparse
.
Namespace
):
...
...
@@ -895,7 +901,7 @@ if __name__ == "__main__":
"--request-rate-range"
,
type
=
str
,
default
=
"2,34,2"
,
help
=
"Range of request rates in the format start,stop,step. Default is 2,34,2"
,
help
=
"Range of request rates in the format start,stop,step. Default is 2,34,2
. It also supports a list of request rates, requiring the parameters to not equal three.
"
,
)
parser
.
add_argument
(
"--output-file"
,
type
=
str
,
help
=
"Output JSONL file name."
)
parser
.
add_argument
(
...
...
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