Downloads · 30 days
46
12% of all-time downloads
Xunzhuo/vsr-embeddings-v1-text-nano
vsr-embeddings-v1-text-nano is a sentence similarity model from Xunzhuo. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
A compact multilingual encoder for semantic routing, matching, and local-evidence retrieval.
Downloads · 30 days
46
12% of all-time downloads
All-time downloads
393
Public
Parameters
307M
648 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors614 MB · 95%
From the Hugging Face model README
A compact multilingual encoder for semantic routing, matching, and local-evidence retrieval.
Xunzhuo/vsr-embeddings-v1-text-nano is the lowest-latency member of the VSR
text embedding family. It is designed for always-on router paths where a
bidirectional encoder, adjustable vector width, and predictable memory use are
more valuable than decoder-scale capacity.
The model encodes both sides of every pair independently and uses the full left and right context of each token. This is a practical fit for high-QPS semantic cache lookup, model-card retrieval, request deduplication, clustering, and prototype classification.
The native 768-dimensional vector can be truncated to 512, 256, 128, or
64 dimensions and re-normalized. Deployments can choose index memory and
latency without maintaining unrelated model families.
The encoder has a 32K positional architecture. For retrieval, VSR uses short overlapping chunks and query-to-chunk max-sim so a small decisive passage is not diluted by one global document vector. Direct encoding and long-document retrieval are intentionally separate contracts.
This repository contains generic semantic geometry, not domain, jailbreak,
fact-check, feedback, modality, or PII classifiers. Those fixed-label APIs live
in Xunzhuo/vsr-detector-v1-text-nano, where each signal has an independent
adapter, head, and calibration contract.
The private vector covers semantic similarity, relation boundaries, multilingual retrieval, long documents, generic linear classification, and clustering. No router signal labels are used as embedding objectives.
| Evaluation | Result |
|---|---|
| semantic similarity Spearman | 0.8475 |
| AllNLI triplet accuracy | 0.9222 |
| relation-boundary mean Spearman | 0.5535 |
| multilingual retrieval AUC | 0.8582 |
| long-document max-sim AUC | 0.7190 |
| generic linear classification accuracy | 0.8030 |
| clustering V-measure | 0.5021 |
The frozen BF16 profile uses approximately 128-token inputs and batch size 64.
| Metric | Result |
|---|---|
| throughput | 2,346 sequences/s |
| batch p50 / p95 / p99 | 27.15 / 28.34 / 29.58 ms |
| peak allocated HBM | 0.85 GiB |
All five declared Matryoshka widths produced finite, unit-normalized vectors after truncation and re-normalization.
import torch
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"Xunzhuo/vsr-embeddings-v1-text-nano",
trust_remote_code=True,
)
vectors = model.encode(
[
"Route this request to a multilingual reasoning model.",
"Choose a model that can reason across languages.",
],
normalize_embeddings=True,
)
# Matryoshka truncation for a smaller index.
vectors_128 = torch.nn.functional.normalize(
torch.as_tensor(vectors[:, :128]), p=2, dim=-1
).numpy()
For long-document retrieval, split documents into fixed-size overlapping chunks, encode the query and chunks, and use the maximum query-to-chunk cosine score.
| Model | Role |
|---|---|
vsr-embeddings-v1-text-nano | minimum-latency encoder path |
vsr-embeddings-v1-text-small | high-throughput multilingual default |
vsr-embeddings-v1-text-large | highest-quality difficult matching path |
vsr-detector-v1-text-nano | calibrated domain, safety, modality, feedback, fact-check, and PII signals |
Use nano when latency, CPU/GPU memory, or local deployment dominates. Use small or large when broad multilingual leaderboard quality is the primary constraint.
Apache-2.0. The model is compatible with Sentence Transformers and standard Transformers feature-extraction workflows.