feat(frontend): add exact MM routing for generate - #11588
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: b30d438 | Docs | Datadog PR Page | Give us feedback! |
85e8b3c to
0cd148f
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
WalkthroughAdds multimodal identifier hashing, richer generate-engine selection metadata, exact multimodal routing preprocessing, LoRA routing hints, capability-based fallback, and comprehensive validation tests for Generate requests. ChangesGenerate exact multimodal routing
Estimated code review effort: 4 (Complex) | ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
ed101f9 to
5df0396
Compare
|
/ok to test 5df0396 |
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Qi Wang <qiwa@nvidia.com> Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
ac3e4ee to
332b77e
Compare
| let mm_routing_info = if supports_exact_mm_routing { | ||
| match generate_mm_routing_info(&request, kv_cache_block_size) { | ||
| Ok(info) => info, | ||
| Err(reason) => { | ||
| tracing::debug!( | ||
| target: "mm_routing", | ||
| reason, | ||
| "invalid /generate multimodal routing metadata; using token-only routing" | ||
| ); | ||
| None | ||
| } | ||
| } | ||
| } else { | ||
| None | ||
| }; |
There was a problem hiding this comment.
🔍 Event-side pad normalization depends on a resolved image_token_id the capability flag does not cover
Exact matching only works when the KV-event normalizer was constructed with image_token_id (see KvEventSourceConfig::Zmq in lib/llm/src/kv_router/publisher/mod.rs:56-66); otherwise vLLM BlockStored events are hashed with block_mm_infos instead of pad substitution and can never match this projection. The chat path gates the same projection on self.routing_image_token_id (lib/llm/src/preprocessor.rs:1958-1962), whereas the /generate path relies solely on the worker-advertised vllm_exact_mm_routing flag. If a worker can advertise the capability while its event source lacks a resolved image token id, MM routing silently degrades rather than falling back. Worth confirming that whatever sets the capability also guarantees the normalizer's image token id.
Was this helpful? React with 👍 or 👎 to provide feedback.
Why
/inference/v1/generateaccepts tokenized multimodal rollouts, but the frontend currently routes only on token IDs. Different images with identical placeholder layouts therefore appear equivalent to the KV router. Exact request hashing also requires the block size, LoRA identity, and worker capability from the same selected WorkerSet; a single engine-selection interface preserves that invariant without exposing irrelevant parsing options.What Change
Test Plan
Summary by CodeRabbit
New Features
Bug Fixes