Basics
Cross-Lingual Bitext & 128 vs 512 Context
Measure 10-language bitext Recall@1 alignment and test how the trained 128-token SBERT window compares against XLM-R's full 512-token limit.
sentence-similarity Β· text Β· 50+ languages Β· WASM q8 Β· 295.7 MB Β· Apache-2.0
Map sentences & paragraphs across 50+ languages into a single shared
768-dimensional meaning space locally in your browser. Distilled from
English paraphrase-mpnet-base-v2 into an xlm-roberta student
(250,002 SentencePiece vocab, mean pooling + L2 norm) with zero server calls.
| Upstream model | sentence-transformers/paraphrase-multilingual-mpnet-base-v2 |
|---|---|
| Browser ONNX mirror | Xenova/paraphrase-multilingual-mpnet-base-v2 |
| Task / pipeline |
sentence-similarity (Transformers.js pipeline task:
feature-extraction)
|
| Architecture |
XLMRobertaModel (model_type: "xlm-roberta", 12 layers Β· 12
heads Β· 768 hidden Β· 3072 FFN) distilled from paraphrase-mpnet-base-v2
Β· 250,002 SentencePiece vocab Β·
max_position_embeddings: 514 (model_max_length: 512;
SBERT trained max_seq_length: 128)
|
| Pooling recipe |
Attention-mask-aware mean pooling (pooling: "mean",
1_Pooling/config.json) + L2 unit normalization Β· symmetric (no
query/passage prefix required)
|
| Quantization & size |
q8 (onnx/model_quantized.onnx 278,647,663 B = 278.65 MB
+ tokenizer.json 17,082,913 B = 17.08 MB + configs 1,449 B =
295.7 MB first-visit total, 282.0 MiB)
|
| Runtime & backend |
Shared @huggingface/transformers@3.7.5 via lib/webai.js on
WebAssembly (wasm) in a dedicated module Web Worker
|
| License | Apache-2.0 |
| Web APIs | WebAssembly, Web Workers, Cache Storage, Canvas 2D, File & Clipboard APIs |
Initialise paraphrase-multilingual-mpnet-base-v2 above to embed sentences locally.
Click any cell to inspect exact pair similarity and script pairing.
Selected pair: Click any cell in the cosine matrix to inspect it.
Projects the 768-d unit vectors onto their top 2 principal components.
XLMRobertaModel outputs one 768-number vector per subword token (including
<s> and </s>). Mask-aware mean pooling averages those
vectors before L2 normalization. Pick any embedded sentence below to inspect its real
pre-norm magnitude, top active dimensions, 96-dim signed strip, and SentencePiece pieces.
First 96 of 768 normalized dimensions (indigo = positive, amber = negative):
Instead of training separate embedding models for every language,
paraphrase-multilingual-mpnet-base-v2 aligns 50+ languages into the exact same
768-d coordinate space using multilingual knowledge distillation. A customer query written
in Spanish, Japanese, Arabic, or Hindi lands right next to English documentation.
Basics
Measure 10-language bitext Recall@1 alignment and test how the trained 128-token SBERT window compares against XLM-R's full 512-token limit.
Practical
Upload multi-file CSV/JSON/MD/TXT corpora, tune live cosine deduplication clusters, search across scripts, and export formula-safe reports.
Wild
Test negation/antonym traps, role reversals, code-switching, and trace live multilingual perturbations across a frozen 6-anchor PCA constellation.
Multi-model
Chain 295.7 MB Stage 1 multilingual retrieval with 355.0 MB Stage 2 mDeBERTa-v3 NLI to separate supporting evidence from contradictions.
worker.js β embed()mpnet-multi-core.mjs β fitPca2D()