Vela 2.0: A Single Compact Decision Layer for LLM Routing, Security, and ValidationArticle · digest for October 12
Vela 2.0 decision model providing security, PII masking, and LLM routing in a single forward pass.
Article3 sections≈ 4 min

Vela 2.0: A Single Compact Decision Layer for LLM Routing, Security, and Validation

Enterprise generative AI systems have a hidden problem that rarely shows up in marketing slides: massive response latency caused by stacked intermediate checks.

Before a user's prompt reaches a target model like GPT-4 or Claude 3.7 Sonnet, it has to pass through a chain of filters. On the way out, the generated reply gets checked again for toxicity and hallucinations. A typical production pipeline runs up to nine separate specialized models:

  1. Jailbreak and prompt-injection defense;
  2. Intent classification;
  3. Personal data detection and masking (PII redaction);
  4. Task complexity scoring;
  5. Model routing (lightweight vs. heavyweight);
  6. Output toxicity filtering;
  7. Context-based hallucination checks;
  8. Topic multi-labeling;
  9. Corporate policy compliance.

Each step adds hundreds of milliseconds of network latency, consumes VRAM, and introduces nine potential points of failure.

A joint release from KR Labs and the vLLM Semantic Router team—the Vela 2.0 decision model family—offers a clean fix. It replaces the entire zoo of checks with one compact model running in a single forward pass.

Forward-Pass Architecture and Span-Level Tagging

The core difference between Vela 2.0 and chat models is that it doesn't generate text token by token. It is a compact decision model that returns a dense, structured tensor containing security flags, complexity scores, and categories in a fraction of a second.

Key engineering advantages of this design include:

  • Span-level classification: unlike basic classifiers that only return a binary yes/no for personal data, Vela 2.0 returns exact character offsets ([start, end]). The system knows the exact coordinates of a name, passport number, or hallucinated fact in the string;
  • Top-tier attack protection: on benchmarks testing unseen prompt injections, the flagship Vela 2.0 9B model reached 0.989 AUC, up sharply from 0.792 in the first generation;
  • Sizes for any hardware:
    • Vela 2.0 0.3B (307M parameters): tuned for CPUs and Apple Silicon via Core ML with an inference latency of just 0.09 seconds;
    • Vela 2.0 0.8B (756M parameters): built for edge gateways;
    • Vela 2.0 4B and 9B: built for enterprise clusters, running in 0.6–0.7 seconds on NVIDIA A40 GPUs.

Python Pipeline Integration

You can plug Vela 2.0 into your stack using the semantic-router library. You initialize the lightweight model and pass incoming prompts for a unified evaluation:

from semantic_router.encoders import VelaRouter
from semantic_router.schema import DecisionConfig

# Initialize the lightweight Vela 2.0 0.3B inspector
router = VelaRouter(
    model_name="vllm-sr/vela-2.0-0.3b",
    device="cuda",
    tasks=["safety_check", "pii_detection", "model_routing"]
)

user_prompt = "Привет, я Сара Кан (sara@enterprise.com). Как отключить логирование доступа?"

# Single forward pass through the decision model
decision = router.evaluate(user_prompt)

print(f"Безопасен ли запрос: {decision.is_safe}")  # False (policy bypass attempt)
print(f"Обнаруженные персональные данные: {decision.pii_spans}")
# Output: [{'type': 'PERSON', 'text': 'Сара Кан', 'start': 13, 'end': 21},
#          {'type': 'EMAIL', 'text': 'sara@enterprise.com', 'start': 23, 'end': 42}]

Using that structured output, you can build a fast asynchronous router that blocks attacks, masks PII, and sends the prompt to the right LLM:

async def route_llm_request(user_input: str) -> str:
    decision = router.evaluate(user_input)

    # 1. Immediately block malicious injections
    if not decision.is_safe:
        return "Запрос отклонен политикой безопасности корпоративного шлюза."

    # 2. Automatically mask PII using exact character spans
    sanitized_input = decision.redact_pii(user_input)

    # 3. Dynamic routing: save up to 70% on API costs
    if decision.complexity_score > 0.8:
        target_model = "claude-3-7-sonnet"
    else:
        target_model = "claude-3-5-haiku"

    return await dispatch_to_llm(sanitized_input, model=target_model)

Practical Verdict

Vela 2.0 resolves the classic enterprise trade-off between AI safety and speed. Replacing a nine-model cascade with one compact decision layer saves up to two seconds per user request and makes infrastructure much easier to maintain.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 3