Rebase multi-API serving on latest main
Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
1 parent
78934753ff
commit
dc3c7dbe16
25 files changed
+1832
-202
No files matched your search
@@ -1,5 +1,67 @@
|
||||
# vllm-omni serve
|
||||
|
||||
## Multiple API frontends
|
||||
|
||||
For local EngineCore pipelines with one or more stages, `--api-server-count` starts
|
||||
multiple API frontend processes that share one parent-owned set of stage
|
||||
engines:
|
||||
|
||||
```bash
|
||||
vllm serve Qwen/Qwen3-Omni-30B-A3B-Instruct --omni \
|
||||
--api-server-count 2 \
|
||||
--port 8091
|
||||
```
|
||||
|
||||
This mode is intended for workloads whose request parsing, multimodal input
|
||||
processing, or response encoding can bottleneck a single frontend. It
|
||||
currently requires local multi-process EngineCore stages with one local
|
||||
process group per replica. A stage may still use multiple `num_replicas`.
|
||||
It cannot be combined with diffusion, headless or
|
||||
remote stages, intra-stage data parallelism, Ray, fault tolerance, elastic
|
||||
expert parallelism, sleep mode, or runtime LoRA updating. Runtime voice upload
|
||||
and deletion are also disabled because those mutations are process-local;
|
||||
built-in voices, inline reference audio, and voices restored at startup remain
|
||||
available. The `/v1/omni/sleep` and `/v1/omni/wakeup` control routes return HTTP
|
||||
409 for the same reason: their bookkeeping is process-local while stage engines
|
||||
are shared.
|
||||
|
||||
A single-stage model pipeline is supported through the normal launch command;
|
||||
this is distinct from the distributed `--stage-id` / `--headless` launch mode.
|
||||
Every stage in the pipeline must be an EngineCore stage. Mixed AR-to-DiT
|
||||
pipelines, including MiniMax-H3, remain unsupported even when their first
|
||||
stage is an EngineCore stage. Diffusion support requires per-frontend channels
|
||||
and shared-engine lifecycle handling in the diffusion backend.
|
||||
|
||||
### Workloads and performance validation
|
||||
|
||||
Each API process owns its frontend processor, Orchestrator, request state,
|
||||
and per-replica EngineCore channels. Requests return through the channel of
|
||||
the originating API process; model weights and GPU stage engines are shared.
|
||||
This distributes frontend and orchestration work across CPU processes.
|
||||
|
||||
| Workload | Potential benefit | Limitation |
|
||||
| ---------- | ------------------- | ------------ |
|
||||
| Concurrent cold image/video inputs on supported EngineCore pipelines | Parallel frontend processing when one API process is CPU-limited | A single cold request and GPU computation may be unchanged |
|
||||
| Many replicas producing frequent text/audio outputs | Less API/Orchestrator work and GIL contention per process | Routing remains serial within each Orchestrator |
|
||||
| Warm inputs or low-concurrency, GPU-limited generation | Additional frontend capacity | More API processes may add overhead without improving throughput |
|
||||
|
||||
Here, a cold input means media or preprocessing caches miss, not that model
|
||||
weights must be loaded or GPU kernels compiled. Each frontend has its own
|
||||
processor/cache state, so cache duplication, CPU thread contention, and memory
|
||||
usage also matter. Multi-API serving does not itself change the output queue,
|
||||
move response encoding to an executor, or change the model's numerical scheduler.
|
||||
|
||||
Compare `--api-server-count 1`, `2`, and higher counts with the same hardware,
|
||||
model/stage configuration, media, sampling parameters, output lengths, and
|
||||
offered load. Keep cold-cache and warmed-cache runs separate and report repeated
|
||||
measurements. Record CPU and request counts for every API worker, input and
|
||||
output queue delay, GPU utilization, first-output latency, and end-to-end latency.
|
||||
Confirm requests reach every worker: connection reuse can concentrate traffic
|
||||
on one process. Queue-only or single-API experiments do not establish a
|
||||
multi-API throughput gain. The multi-replica workload in
|
||||
[#4680](https://github.com/vllm-project/vllm-omni/issues/4680) remains a relevant
|
||||
validation target.
|
||||
|
||||
## Stage-based CLI quickstart
|
||||
|
||||
The stage-based CLI is designed for deployments that require launching each pipeline stage in an isolated process
|
||||
@@ -61,3 +123,10 @@ CUDA_VISIBLE_DEVICES=1 vllm serve Qwen/Qwen3-Omni-30B-A3B-Instruct --omni \
|
||||
## Arguments
|
||||
|
||||
--8<-- "docs/generated/argparse_omni/omni_serve.inc.md"
|
||||
|
||||
Async video jobs use process-local metadata and task handles. With multiple API
|
||||
workers, creating, listing, retrieving, downloading, and deleting these jobs
|
||||
returns HTTP 409. This restriction is independent of the current diffusion
|
||||
stage launch restriction: supporting multi-worker diffusion also requires a
|
||||
shared job lifecycle. Missing frontend topology state returns HTTP 503 for
|
||||
operations that require process-local state protection.
|
||||
Reference in new issue
Block a user