Repository navigation
[Bugfix] Preserve multimodal cache data across stage-0 replicas - #7297
leegangtoe wants to merge 1 commit into
Conversation
Signed-off-by: leegangtoe <leegangtoe@gmail.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This PR appears to belong to: docs/design/module/observability.md, docs/design/module/engine_orchestration.md. Module owners: @lishunyang12 @vraiti @fake0fan Routing: @lishunyang12 via module of the changed files; @vraiti via module of the changed files; @fake0fan via semantic router, CODEOWNERS @leegangtoe, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
Omni ReviewBot triage noteAutomated triage of commit
These are automated triage suggestions only — the final decision belongs to the maintainers. |
|
Self-review completed on head
|
|
@Gaohan123 Thanks for merging #7298! |
|
@Gaohan123 I think this may have been closed unintentionally. It closed 3 seconds after #7298 merged, and #7298's description contains "multimodal cache fix #7297", which GitHub treats as a closing keyword. From reading current main, #7295 still looks present. The chat path renders through the shared frontend sender cache before a replica is chosen, and My #8062 touches the raw-prompt scoping path only and does not fix this, so the two are complementary. This PR would need a rebase ( |
Purpose
Fixes #7295.
Fix repeated multimodal requests when one stage-0 frontend serves multiple engine replicas.
The IPC sender cache omits tensors on a frontend hit. A request routed to a replica that has
never received those tensors then ends with
finish_reason="error"and empty content, althoughHTTP status is 200. With two replicas and round-robin routing, sending the same new audio three
times reproduces
stop, error, stop.Use vLLM's
MultiModalProcessorOnlyCacheon the shared frontend for replicated stage 0.Select it at startup for distributed runtimes as well, including those initially holding zero
or one replica, because headless replicas can join later. This preserves cached processing
results while always supplying tensors to the selected receiver. The OpenAI chat path is
already rendered before engine routing, so raw
multi_modal_uuidsscoping alone cannot fix it.Local single-replica deployments, disabled caches, existing processor-only caches, and
text-only renderers are unchanged. LRU/SHM sender caches are replaced. Receiver caches remain;
the tradeoff is additional frontend tensor storage and tensor IPC on each request.
Test Plan
vLLM Version: 0.28.0; PyTorch 2.13.0+cu130, CUDA runtime 13.0, Transformers 5.14.1.
vLLM-Omni Commit:
d3a86d70c70ae2e5b4559d56232e951689f1ec22; base main5e4baea64d0f4cd1b6ce147e4f7a28f0f41d995f.processor-only caches, text-only renderers, newly joined receivers, and engine-to-builder
wiring for static and dynamic deployments. Only model/tokenizer setup is mocked.
TP=1, GPU memory utilization 0.60, prefix caching enabled, eager execution disabled.
another headless replica, then resend byte-identical audio with round-robin routing.
Use
--disable-log-statsto isolate cache behavior from the separate metrics failure below.CPU commands, from the repository root (requires compatible vLLM dependencies, pytest and
pytest-mock; no model weights or GPU execution needed):
The existing Buildkite L1 engine CPU sweep already collects this module; no pipeline change.
Minimal serving reproduction: save the following as
/tmp/omni-replicas.yaml:After
/healthreturns 200, run this against a fresh server using a short WAV file:Test Result
CPU module: 72 passed.
Full changed-file pre-commit, including mypy-3.10: passed.
Negative controls: disabling cache replacement makes the eviction regression fail with
MultiModalCacheMissError; dropping the dynamic flag makes the engine wiring test fail.Before fix: 10 errors in 28 HTTP requests, 10 cache-miss warnings. Three fresh clips worked;
repeated C returned
error, stop, errorand repeated D returnederror, stop.Revised fixed-replica serving: 76/76 requests passed, including 64 repeated audio requests
at concurrency 8; zero cache misses.
Dynamic serving with log stats disabled: 12/12 requests passed before joining, then
76/76 passed after joining, including 64 concurrent repeated audio requests; zero cache misses.
With default log stats, joining succeeds but processing the first remote output raises
KeyError: (0, 1)atorchestrator.py's_stage_replica_to_engine_idxlookup. This mappingcontains only initial replicas (tracked in [Bug]: Adding a headless replica crashes output processing with log stats enabled #7296). That file is unchanged from the base; this separate issue
requires its own fix. Default-stats dynamic serving is not validated as working.
SHM is covered by CPU cache tests; the GPU serving runs use LRU. These are correctness checks,
not throughput or general transcription-accuracy benchmarks.