"src/vscode:/vscode.git/clone" did not exist on "f7b4f51cc2a423c96cb2a4c2282e55feba0be506"
Unverified Commit 25be63d0 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Auto handle PD disaggregation in bench_serving (#6587)


Co-authored-by: default avataryizhang2077 <1109276519@qq.com>
parent d502dae0
......@@ -4,4 +4,4 @@ Performance Analysis & Optimization
:maxdepth: 1
benchmark_and_profiling.md
accuracy_evaluation.md
\ No newline at end of file
accuracy_evaluation.md
......@@ -1304,14 +1304,12 @@ 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)
else:
accept_length = server_info.json()["internal_states"][0].get(
"avg_spec_accept_length", None
)
server_info_json = server_info.json()
if "decode" in server_info_json:
server_info_json = server_info_json["decode"][0]
accept_length = server_info_json["internal_states"][0].get(
"avg_spec_accept_length", None
)
else:
accept_length = None
else:
......
prompt = "The capital of taiwan is "
prompt = "The capital of france is "
import json
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment