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
25be63d0
Unverified
Commit
25be63d0
authored
May 26, 2025
by
fzyzcjy
Committed by
GitHub
May 25, 2025
Browse files
Auto handle PD disaggregation in bench_serving (#6587)
Co-authored-by:
yizhang2077
<
1109276519@qq.com
>
parent
d502dae0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
docs/references/performance_analysis_and_optimization.rst
docs/references/performance_analysis_and_optimization.rst
+1
-1
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+6
-8
scripts/playground/disaggregation/cli-logprob.py
scripts/playground/disaggregation/cli-logprob.py
+1
-1
No files found.
docs/references/performance_analysis_and_optimization.rst
View file @
25be63d0
python/sglang/bench_serving.py
View file @
25be63d0
...
@@ -1304,12 +1304,10 @@ async def benchmark(
...
@@ -1304,12 +1304,10 @@ async def benchmark(
if
"sglang"
in
backend
:
if
"sglang"
in
backend
:
server_info
=
requests
.
get
(
base_url
+
"/get_server_info"
)
server_info
=
requests
.
get
(
base_url
+
"/get_server_info"
)
if
server_info
.
status_code
==
200
:
if
server_info
.
status_code
==
200
:
if
pd_separated
:
server_info_json
=
server_info
.
json
()
accept_length
=
server_info
.
json
()[
"decode"
][
0
][
"internal_states"
][
if
"decode"
in
server_info_json
:
0
server_info_json
=
server_info_json
[
"decode"
][
0
]
].
get
(
"avg_spec_accept_length"
,
None
)
accept_length
=
server_info_json
[
"internal_states"
][
0
].
get
(
else
:
accept_length
=
server_info
.
json
()[
"internal_states"
][
0
].
get
(
"avg_spec_accept_length"
,
None
"avg_spec_accept_length"
,
None
)
)
else
:
else
:
...
...
scripts/playground/disaggregation/cli-logprob.py
View file @
25be63d0
prompt
=
"The capital of
taiwan
is "
prompt
=
"The capital of
france
is "
import
json
import
json
...
...
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