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
a6970a17
Unverified
Commit
a6970a17
authored
May 22, 2025
by
Yineng Zhang
Committed by
GitHub
May 22, 2025
Browse files
misc: fix accept_length (#6536)
parent
a6ae3af1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+10
-7
No files found.
python/sglang/bench_serving.py
View file @
a6970a17
...
...
@@ -1303,16 +1303,19 @@ async def benchmark(
if
"sglang"
in
backend
:
server_info
=
requests
.
get
(
base_url
+
"/get_server_info"
)
if
server_info
.
status_code
==
200
:
if
pd_separated
:
accept_length
=
server_info
.
json
()[
"decode"
][
0
][
"internal_states"
][
0
].
get
(
"avg_spec_accept_length"
,
None
)
accept_length
=
server_info
.
json
()[
"decode"
][
0
][
"internal_states"
][
0
].
get
(
"avg_spec_accept_length"
,
None
)
else
:
accept_length
=
server_info
.
json
()[
"internal_states"
][
0
].
get
(
"avg_spec_accept_length"
,
None
)
else
:
accept_length
=
None
else
:
accept_length
=
None
# Compute metrics and print results
benchmark_duration
=
time
.
perf_counter
()
-
benchmark_start_time
...
...
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