Add kvcache-centric profiling and admission controls

This commit is contained in:
2026-04-25 16:00:52 +00:00
parent 08b13d22bc
commit 13bb31a446
9 changed files with 1044 additions and 34 deletions

View File

@@ -33,6 +33,7 @@ def build_launch_plan(
prefill_policy: str = "round_robin",
decode_policy: str = "manual",
include_router: bool = True,
router_request_timeout_s: float | None = None,
) -> LaunchPlan:
return LaunchPlan(
prefill_commands=tuple(
@@ -49,6 +50,7 @@ def build_launch_plan(
topology,
prefill_policy=prefill_policy,
decode_policy=decode_policy,
request_timeout_s=router_request_timeout_s,
)
if include_router and topology.prefill_workers and topology.decode_workers
else None
@@ -105,6 +107,7 @@ def _build_router_command(
*,
prefill_policy: str,
decode_policy: str,
request_timeout_s: float | None,
) -> tuple[str, ...]:
command: list[str] = [
sys.executable,
@@ -121,6 +124,8 @@ def _build_router_command(
"--decode-policy",
decode_policy,
]
if request_timeout_s is not None:
command.extend(["--request-timeout-s", str(request_timeout_s)])
for worker in topology.prefill_workers:
command.extend(
["--prefill", worker.url, str(worker.bootstrap_port or topology.router_port)]