vLLM Semantic Router: Signal Driven Decision Routing for Mixture-of-Modality Models
Organizations: Steve
Abstract
As large language models (LLMs) diversify across modalities, capabilities, and cost profiles, the problem of intelligent request routing: selecting the right model for each query at inference time, has become a critical systems challenge. We present vLLM Semantic Router, a signal-driven decision routing framework for Mixture-of-Modality (MoM) model deployments. The architecture follows two complementary Shannon-inspired views. In the information-theoretic regime, signal extraction reduces the entropy of "which model?" by distilling routing-relevant information from raw queries. In the Boolean-algebraic regime, the decision engine composes functionally complete routing policies from signal conditions. The central innovation is composable signal orchestration: thirteen heterogeneous signal types, spanning sub-millisecond heuristics and neural classifiers for semantics, safety, and modality, are composed through configurable Boolean decision rules into deployment-specific routing policies, so that fundamentally different scenarios (multi-cloud enterprise, privacy-regulated, cost-optimized) are expressed as different configurations over the same architecture. Matched decisions drive semantic model routing via thirteen selection algorithms, while per-decision plugin chains enforce safety constraints including a three-stage HaluGate hallucination detection pipeline and a lightweight episodic memory system with ReflectionGate for personalized multi-turn context. A typed neural-symbolic DSL specifies these routing policies and compiles them to multiple deployment targets, enabling configuration-first adaptation without code changes. Together, these components show that composable signal orchestration enables a single framework to serve diverse deployment scenarios with differentiated cost, privacy, and safety policies.
Figures & tables
| Action | Semantics |
|---|---|
| block | Reject the response; return an error to the client. Appropriate for high-stakes factual applications. |
| header | Propagate detection metadata via HTTP headers, enabling downstream policy enforcement by the client or API gateway. |
| body | Prepend a warning to the response body, alerting users to potential inaccuracies. |
| none | Log detection results without modifying the response. Useful for monitoring and threshold calibration. |
| Model | Task | Training Data |
|---|---|---|
| mom-domain | Domain classification | MMLU categories |
| mom-pii | PII token classification | Presidio-annotated corpora |
| mom-jailbreak | Prompt injection detection | Adversarial prompt datasets |
| mom-sentinel | Fact-check gating | Factual vs. creative queries |
| mom-detector | Hallucination detection | Annotated LLM outputs |
| mom-explainer | NLI explanation | NLI benchmarks |
| Runtime | Target Hardware | Tasks | Framework |
|---|---|---|---|
| Candle | GPU (CUDA), CPU | Classification, LoRA, MLP | HF Candle [ 12 ] |
| Linfa | CPU only | KNN, KMeans, SVM | Linfa [ 21 ] |
| ONNX RT | CPU, GPU | Embeddings | ONNX Runtime [ 25 ] |
| NLP Binding | CPU only | BM25, N-gram matching | bm25 + ngrammatic (Rust) |
| Signal Type | Median | p99 | Requires ML |
|---|---|---|---|
| Keyword | ms | ms | No |
| Context | ms | ms | No |
| Language | ms | ms | No |
| Authorization | ms | ms | No |
| Embedding | ms | ms | Yes |
| Domain | ms | ms | Yes |
| Seq. Length | CPU (ms) | GPU (ms) | Speedup |
|---|---|---|---|
| 512 | 120 | 6.0 | 20 |
| 1,024 | 263 | 7.7 | 34 |
| 2,048 | 809 | 14.1 | 57 |
| 4,096 | 2,664 | 57.6 | 46 |
| 8,192 | 9,656 | 237 | 41 |
| Seq. Length | SDPA (ms) | FA (ms) | Speedup |
|---|---|---|---|
| 512 | 19 | 19 | 1.0 |
| 1,024 | 26 | 23 | 1.1 |
| 2,048 | 51 | 32 | 1.6 |
| 4,096 | 167 | 51 | 3.3 |
| 8,192 | OOM | 105 | — |
| 16,384 | OOM | 259 | — |
| Seq. Len. | med | p95 | med | p95 | med | p95 |
|---|---|---|---|---|---|---|
| 512 | 19 | 19 | 77 | 123 | 142 | 238 |
| 1,024 | 23 | 24 | 104 | 167 | 189 | 325 |
| 2,048 | 32 | 32 | 141 | 234 | 275 | 456 |
| 4,096 | 51 | 52 | 281 | 998 | 521 | 847 |
| 8,192 | 105 | 105 | 601 | 873 | 1,058 | 1,732 |
| Tasks ( ) | Independent (MB) | LoRA (MB) |
|---|---|---|
| 1 | 573 | 573 |
| 3 | 1,719 | 574 |
| 6 | 3,438 | 575 |
| Scenario | Active Signals | Selection | Key Plugins |
|---|---|---|---|
| Privacy-regulated (healthcare) | authz, domain, language | Static (compliant models only) | Strict PII redaction, no caching, audit logging |
| Cost-optimized (developer tool) | complexity, embedding, keyword | AutoMix cascade | Aggressive semantic cache, header mutation for LoRA adapter |
| Multi-cloud enterprise | domain, modality, authz | Latency-aware | Multi-endpoint failover, provider auth factory, system prompt injection |
| Multi-turn assistant | embedding, feedback, preference | Elo with session pin | Responses API state, memory retrieval, RAG injection |
| Profile | Validated Behavior |
|---|---|
| Multi-endpoint | Multi-provider routing with weighted distribution and failover across heterogeneous backends |
| Multi-provider auth | Provider-specific auth injection (API key, OAuth2, cloud IAM) via authorization factory |
| AuthZ-RBAC | Role-based model access (admin/premium/free tiers) with authz signal |
| ML model selection | KNN, KMeans, SVM, MLP selection accuracy on held-out queries |
| Keyword routing | Keyword signal matching with AND/OR/NOR combinators |
| Embedding routing | Embedding similarity thresholds and confidence-based decision selection |