CoolFace
Modelpublic

llm-semantic-router/Vela-1.0-Encoder-307M-Reranker

sourceHugging Faceapache-2.0updated 6d agoView on Hugging Face
1likes950downloads
Model Card

<div align="center"> <img src="https://vllm-sr.ai/img/vllm-sr-logo.social.png" alt="vLLM Semantic Router" width="560" /> <p> <a href="https://vllm-sr.ai/"><strong>Docs</strong></a> | <a href="https://vllm-sr.ai/blog/"><strong>Blog</strong></a> | <a href="https://vllm-dev.slack.com/archives/C09CTGF8KCN"><strong>Slack</strong></a> | <a href="https://github.com/vllm-project/semantic-router"><strong>GitHub</strong></a> </p> </div>

Vela Reranker

Bring relevant context to the top. Vela Reranker scores passages for retrieval, RAG, and context selection in your router.

307M encoder · 32K context · Multilingual

Evaluation

Compared with the original mmBERT Reranker. Scores are ×100; higher is better.

EvaluationMetricOriginal mmBERTVela
MIRACL · 320 queries, 4 languagesnDCG@1080.4787.11
Natural Questions · 128 queriesnDCG@1097.8699.13
SciFact · 48 queries, all 5,183 documentsnDCG@1085.5191.21
QASPER · 64 queriesnDCG@1056.7362.86
Controlled 4K–32K context · 288 pairsPair accuracy55.2162.50
32K context subset · 72 pairsPair accuracy56.9456.94
32K end-position subset · 24 pairsPair accuracy54.1754.17

Matched development subsets with identical candidate pools and complete inputs, using 22 layers, 768 dimensions, and FP32. MIRACL covers Arabic, Spanish, Japanese, and Chinese. The context set tests 24 queries across four lengths and three positions; its views are not independent examples.

Selected instruction-retrieval tasks from MTEB 2.20.12:

TaskMetricOriginal mmBERTVela
Core17InstructionRetrievalp-MRR1.922.37
News21InstructionRetrievalp-MRR6.563.23
Robust04InstructionRetrievalp-MRR-1.062.25

These results describe the listed tasks and development subsets, not a full MTEB score or ranking.

Quick start

Install torch, transformers, and safetensors. Use a ROCm-enabled PyTorch build for AMD GPUs.

python
import torch
from transformers import AutoModel, AutoTokenizer

model_id = "llm-semantic-router/Vela-1.0-Encoder-307M-Reranker"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True).to(device).eval()

query = "How do I reset my password?"
passages = [
    "Select Forgot password on the sign-in page to receive a reset link.",
    "Your monthly invoice is available in the billing dashboard.",
]
inputs = tokenizer(
    [query] * len(passages), passages,
    padding=True, truncation=False, return_tensors="pt",
).to(device)
with torch.inference_mode():
    scores = model(**inputs).logits.flatten().tolist()
print(sorted(zip(scores, passages), reverse=True))

Higher scores mean greater relevance. The default uses all 22 layers and 768 dimensions. The 32,768-token limit includes the query, passage, and special tokens.

Explore the Vela collection