Skip to content

feat(llm): support Nemotron Omni multimodal routing - #13989

Closed
furionw wants to merge 1 commit into
mainfrom
qiwa/nemotron-omni-mm-routing
Closed

furionw wants to merge 1 commit into
mainfrom
qiwa/nemotron-omni-mm-routing

Conversation

@furionw

@furionw furionw commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

closing this PR to be explicit. this is for prototype only. don't have bandwidth of merging this

Why

Exact multimodal KV routing requires the frontend to reproduce the image-token sequence that the backend stores, while worker-side KV-event normalization must recognize the same placeholder. main cannot do that for Nemotron 3 Nano Omni: its vLLM processor uses dynamic resolution with a context budget shared across all images, wraps image features with model-specific delimiters, and is absent from the existing vision registry. Nemotron requests therefore fall back to text-prefix routing, preventing the router from distinguishing identical text paired with different images. This PR adds a fail-closed Dynamo implementation so routing becomes image-aware only when the model configuration and tokenizer prove an exact match.

Effect

Before:

text tokens + image placeholder -> text-prefix routing only

After:

frontend routing: text + <img> + pad(mm_hash) x N + </img>
worker KV event:  text + <img> + img_context_token_id x N + </img>
normalization:    img_context_token_id x N -> pad(mm_hash) x N

worker-bound request tokens remain unchanged

N is computed for the complete image batch under the remaining model-context budget.

What Change

  • Add vLLM-compatible Nemotron dynamic-resolution and multi-image context budgeting.
  • Resolve image context IDs and atomic <img>/</img> wrappers from model configuration.
  • Build hash-padded routing tokens; fall back safely when exact matching is unavailable.
classDiagram
    class OpenAIPreprocessor
    class RoutingTokens
    class LightseekMmCounter
    class NemotronNanoOmniCounter
    class NemotronDynamicResolution
    class MmRoutingInfo

    OpenAIPreprocessor ..> RoutingTokens : resolves placeholder and wrappers
    OpenAIPreprocessor --> LightseekMmCounter : requests batch token counts
    LightseekMmCounter *-- NemotronNanoOmniCounter : owns Nemotron counter
    NemotronNanoOmniCounter *-- NemotronDynamicResolution : owns optional budgeter
    OpenAIPreprocessor ..> MmRoutingInfo : builds routing-only sequence

    note for OpenAIPreprocessor "Builds the exact router view without changing worker input"
    note for RoutingTokens "Carries model-configured placeholder and wrapper tokens"
    note for LightseekMmCounter "Dispatches registry-backed or Nemotron counting"
    note for NemotronNanoOmniCounter "Matches vLLM image token accounting"
    note for NemotronDynamicResolution "Shares remaining context budget across images"
Loading

Test Plan

  • Reported MM-routing tests pass for Nemotron configuration, counts, and wrapped expansion.
  • Two-worker /v1/chat/completions validation remains in progress.

@copy-pr-bot

copy-pr-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` labels Aug 28, 2026
@furionw
furionw force-pushed the qiwa/nemotron-omni-mm-routing branch from 53b50f1 to 8cf1af5 Compare August 28, 2026 23:12
@furionw furionw changed the title feat(llm): support Nemotron Omni MM-aware routing feat(llm): support Nemotron Omni multimodal routing Aug 28, 2026
@furionw
furionw changed the base branch from qiwa/mm-tito-kv-routing to main August 28, 2026 23:13
@github-actions github-actions Bot added documentation Improvements or additions to documentation multimodal actions xpu labels Aug 28, 2026
@furionw
furionw force-pushed the qiwa/nemotron-omni-mm-routing branch 2 times, most recently from 3fa00c3 to 0a532a7 Compare August 28, 2026 23:35
@furionw
furionw force-pushed the qiwa/nemotron-omni-mm-routing branch from 0a532a7 to 4f1dfd6 Compare August 28, 2026 23:43
@furionw furionw closed this Aug 29, 2026
@furionw

furionw commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

closing this PR to be explicit. this is for prototype only. don't have bandwidth of merging this

@furionw
furionw deleted the qiwa/nemotron-omni-mm-routing branch November 10, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions documentation Improvements or additions to documentation feat frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` multimodal size/XL xpu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant