[Feature] DP supervisor using rust frontend (#47076)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-06-30 14:34:05 -04:00
committed by GitHub
parent 3cecee40f3
commit 3a9784b82c
2 changed files with 60 additions and 3 deletions
+17 -3
View File
@@ -22,6 +22,7 @@ import uvicorn
import uvloop
from fastapi import FastAPI, Response
import vllm.envs as envs
from vllm.logger import init_logger
from vllm.utils.system_utils import (
decorate_logs,
@@ -233,12 +234,22 @@ def _build_dp_supervisor_app(supervisor: DPSupervisor) -> FastAPI:
return app
def _run_python_vllm_dp_server(child_args: argparse.Namespace) -> None:
from vllm.entrypoints.openai.api_server import run_server
uvloop.run(run_server(child_args))
def _run_rust_vllm_dp_server(child_args: argparse.Namespace) -> None:
from vllm.entrypoints.cli.serve import run_multi_api_server
run_multi_api_server(child_args)
def _run_vllm_dp_server(child_args: argparse.Namespace) -> None:
"""
Entrypoint function for the vLLM DP Server.
"""
from vllm.entrypoints.openai.api_server import run_server
# Create a fresh process group for the vLLM DP Server,
# so that CTRL-C is propagated cleanly.
os.setpgrp()
@@ -246,7 +257,10 @@ def _run_vllm_dp_server(child_args: argparse.Namespace) -> None:
name = f"APIServer_DP{child_args.data_parallel_rank}"
set_process_title(name)
decorate_logs(name)
uvloop.run(run_server(child_args))
if envs.VLLM_RUST_FRONTEND_PATH:
_run_rust_vllm_dp_server(child_args)
else:
_run_python_vllm_dp_server(child_args)
class DPSupervisor: