Instructions to use Xunzhuo/vsr-embeddings-v1-text-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Xunzhuo/vsr-embeddings-v1-text-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Xunzhuo/vsr-embeddings-v1-text-small") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
vSR Embeddings v1 Text Small
Router-first multilingual embeddings for retrieval, semantic matching, clustering, and signal-driven model routing.
Xunzhuo/vsr-embeddings-v1-text-small is the small member of the vSR text embedding family. It is built
for the request path of an AI gateway: predictable task prompts, adjustable
embedding width, efficient long-document matching, and a clean interface to
parallel safety and routing signals.
Why it is different
Router-native task contract
One semantic model serves retrieval, text matching, clustering, and generic classification embeddings. Query and document roles use explicit task instructions, so applications do not need separate ad-hoc prompt wrappers.
Matryoshka as a latency dial
The same model supports 1024, 512, 256, 128, 64 dimensions. A deployment can use a
smaller vector for hot-path routing and a wider vector for high-accuracy search
without changing the model family or index semantics.
Multi-vector long-document retrieval
Long inputs are represented by fixed 320-token chunks with 64-token overlap. Documents are scored with query-to-chunk max-sim, which preserves local evidence that a single pooled vector can dilute. The runtime contract covers documents up to 32K tokens while keeping each model forward short and batchable.
Signal-compatible by design
The embedding model runs in parallel with vSR's domain, safety, fact-check, feedback, modality, and PII extractors. The decision layer keeps those signals separate and inspectable, while this model supplies the shared semantic geometry. That preserves explainability and lets the backend catalog scale independently.
Two deployment tiers
| Variant | Parameters | Native dim | MTEB Mean(Task) | MI300X batch-64 | Recommended use |
|---|---|---|---|---|---|
| small | 0.60B | 1024 | 69.01 | 1042.33 | always-on and high-throughput |
| large | 4.02B | 2560 | 69.45 | 423.11 | highest-quality matching |
Quality
| Evaluation | Result |
|---|---|
| MTEB Multilingual v2 Mean(Task), 131 tasks | 69.01 |
| MTEB Multilingual v2 Mean(TaskType) | 59.00 |
| Direct rank in the evaluation snapshot | 7 |
| Jina v5 text-small Mean(Task), same snapshot | 67.00 |
| Mean(Task) advantage over Jina v5 | +2.01 |
| Router multilingual retrieval AUC | 0.9792 |
| Router long-document max-sim AUC | 0.8776 |
| Router semantic similarity Spearman | 0.8949 |
MI300X serving profile
| Metric | Result |
|---|---|
| vLLM / Sentence Transformers minimum cosine | 0.999943 |
| Batch-64 throughput | 1042.33 sequences/s |
| Batch-64 p50 latency | 61.27 ms |
| 32K document chunk throughput | 463.47 chunks/s |
| Peak HBM under the frozen profile | 78.63 GiB |
The profile uses BF16 vLLM pooling on one AMD Instinct MI300X. Throughput is a capacity reference, not a guarantee for every server configuration.
Standard embeddings
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Xunzhuo/vsr-embeddings-v1-text-small", trust_remote_code=True)
vectors = model.encode(
["Instruct: Retrieve semantically similar text\nQuery: route this request"],
normalize_embeddings=True,
)
vSR runtime
import sys
from huggingface_hub import snapshot_download
repo = snapshot_download("Xunzhuo/vsr-embeddings-v1-text-small")
sys.path.insert(0, repo)
from vsr_runtime import VSRTextEmbeddingModel
model = VSRTextEmbeddingModel(repo)
query = model.encode(
["Find a model that understands this request"],
task="retrieval",
role="query",
dimension=1024,
)
scores = model.score_long_documents(
"multilingual routing evidence",
["A long candidate document ..."],
)
Deployment guidance
- Use text-small for always-on routing, semantic cache lookup, and high-QPS retrieval.
- Use text-large when multilingual accuracy and difficult semantic matching dominate latency.
- Direct encoding defaults to 4096 tokens. Use the included max-sim runtime for long documents instead of treating 32K text as one vector.
- This is a bi-encoder embedding model, not a cross-encoder reranker and not a sequence-level safety classifier.
Foundation and license
v1 preserves the foundation geometry of
microsoft/harrier-oss-v1-0.6b at the revision recorded
in vsr_family_manifest.json. vSR adds the router-native task, representation,
and serving contract described above. See THIRD_PARTY_NOTICES.md for concise
attribution. License: mit.
- Downloads last month
- 169
Model tree for Xunzhuo/vsr-embeddings-v1-text-small
Base model
microsoft/harrier-oss-v1-0.6b