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
fa7e2c30
Unverified
Commit
fa7e2c30
authored
Oct 09, 2025
by
shaharmor98
Committed by
GitHub
Oct 09, 2025
Browse files
fix bench_serving mishandling of internal states (#11376)
Signed-off-by:
Shahar Mor
<
smor@nvidia.com
>
parent
8f2cd177
Changes
1
Show 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 @
fa7e2c30
...
@@ -1837,6 +1837,10 @@ async def benchmark(
...
@@ -1837,6 +1837,10 @@ async def benchmark(
server_info_json
=
server_info
.
json
()
server_info_json
=
server_info
.
json
()
if
"decode"
in
server_info_json
:
if
"decode"
in
server_info_json
:
server_info_json
=
server_info_json
[
"decode"
][
0
]
server_info_json
=
server_info_json
[
"decode"
][
0
]
if
(
"internal_states"
in
server_info_json
and
server_info_json
[
"internal_states"
]
):
accept_length
=
server_info_json
[
"internal_states"
][
0
].
get
(
accept_length
=
server_info_json
[
"internal_states"
][
0
].
get
(
"avg_spec_accept_length"
,
None
"avg_spec_accept_length"
,
None
)
)
...
@@ -1844,6 +1848,8 @@ async def benchmark(
...
@@ -1844,6 +1848,8 @@ async def benchmark(
accept_length
=
None
accept_length
=
None
else
:
else
:
accept_length
=
None
accept_length
=
None
else
:
accept_length
=
None
# Compute metrics and print results
# Compute metrics and print results
benchmark_duration
=
time
.
perf_counter
()
-
benchmark_start_time
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