At a glance
| Model (Upstream & ONNX) | MongoDB/mdbr-leaf-mt |
|---|---|
| Task / pipeline | feature-extraction (pooling: "mean", normalize: true) |
| Architecture | BertModel (MiniLM-L6-v2 LEAF multi-task) Β· 23M params Β· 6 layers Β· 12 heads Β· 384-d ONNX output (MRL 64dβ384d) Β· 512 max tokens Β· 30,522 WordPiece vocab (SentenceTransformers adds an optional 2_Dense 384β1024 alignment layer to mxbai-embed-large-v1) |
| Multi-task prompting | Symmetric (no prefix) for STS, paraphrase, and clustering; optional "Represent this sentence for searching relevant passages: " query prefix for retrieval |
| Quantization & size | q8 ONNX (onnx/model_quantized.onnx 0.22 MB + onnx/model_quantized.onnx_data 23.05 MB = 23.27 MB) |
| Backend | CPU WebAssembly (wasm) via shared lib/webai.js (@huggingface/transformers@3.7.5 β no WebGPU required) |
| License | Apache-2.0 |
Run it β Multi-Task Similarity & Vector Workbench
Switch between Semantic Similarity, Paraphrase Matching, FAQ Clustering, and Cross-Domain Retrieval β or upload,
drag-drop, or paste your own .txt, .md, .csv, or .json sentences.
Tip: drag and drop a file onto this zone or paste text anywhere outside an input field.
Ranked similarity to anchor
Pairwise cosine similarity matrix
Run inference above to inspect pairwise similarities across comparison texts.
See inside β 384-d vector sparkline & 16-bin distribution
The browser ONNX export outputs a 384-dimensional unit-norm vector from the distilled MiniLM-L6-v2 backbone
(without the optional 2_Dense 384β1024 SentenceTransformers projection). Dashed vertical guides mark
64d, 128d, and 256d Matryoshka truncation boundaries.
Why it matters
mdbr-leaf-ir,
mdbr-leaf-mt is distilled for broad multi-task embeddings β semantic textual similarity, clustering,
paraphrase detection, and zero-shot classification β while staying 23.27 MB in CPU WASM.
- Zero-server similarity & clustering β group customer tickets, deduplicate notes, or score semantic intent offline.
- Matryoshka + binary quantization ready β shrink 384-d float32 vectors down to 64-d or 48-byte 1-bit binary codes (probed live in Basics).
- Two-stage local RAG β shortlist candidates in ~21 ms and pair with a cross-encoder reranker in Multi-model (46.0 MB total).
Use-case ladder
Basics β MRL Truncation & Binary Quantization
Measure live retention across 384d, 256d, 128d, 64d, int8 (4Γ), and 1-bit binary Hamming (32Γ) compression.
Practical β Document Search & Dedup Workbench
Upload CSV/JSON/MD/TXT corpora, index with cancellable FIFO batching, cluster near-duplicates, and export CSV/JSON.
Wild β 2D PCA Constellation & Adversarial Stress Lab
Inspect 4-domain 2D PCA geometry and stress-test negation blindness, lexical traps, entity swaps, and heavy typos.
Multi-model β 46.0 MB Hybrid Retrieve + Rerank
Chain MDBR-LEAF-MT (23.27 MB) recall with MS MARCO MiniLM Cross-Encoder (22.7 MB) reranking and Spearman rank-shift badges.