Flintglass PrismEmbed-Multilingual

Flintglass PrismEmbed-Multilingual (307M, jhu-clsp/mmBERT-base) is a 100% commercial-safe (Zero MS MARCO!), Apache-2.0, 8,192-token Matryoshka bi-encoder embedding model with zero mandatory prompt prefixesβ€”a 1-line drop-in for sentence-transformers and onnxruntime.

**#1 Overall on LongDoc-8K (75.54% NDCG@10)**β€”crushing 568M BAAI/bge-m3 (72.51%, +3.03 pts) and 600M Qwen3-Embedding-0.6B (66.23%, +9.31 pts)β€”while beating BAAI/bge-m3 on TREC-COVID (63.50% vs 62.87%) and crushing BAAI/bge-m3 at Matryoshka 128d (48.19% vs 45.39%, +2.80 pts) across 1,800+ languages with ZERO MS MARCO and zero mandatory prompt prefixes!


Two-Stage Commercial-Safe (Zero MS MARCO) Training

  1. Stage 1 β€” Large-Batch Bidirectional Contrastive Pre-Training (580,710 pairs): 2 epochs of symmetric bidirectional InfoNCE + Multi-Scale Matryoshka Loss (384–512 cross-GPU in-batch negatives) across exclusively Apache-2.0, MIT, and CC-BY-4.0 datasets (allenai/gooaq 350K, qiaojin/PubMedQA 115.6K, miracl/miracl 16-lang 74.8K, mr-tydi 11-lang 18.2K, ServiceNow/repliqa 13.7K, Shitao/MLDR 13-lang 8.5K).
  2. Stage 2 β€” Hard-Negative + Cross-Encoder Teacher Distillation (105,558 8-doc groups): 1 epoch of hard-negative InfoNCE + soft KL-distillation from Apache-2.0 Qwen/Qwen3-Reranker-4B logits at long document contexts (1,024–8,192 tokens) across all Matryoshka prefixes.
  3. Zero Evaluation Leakage: Strictly SHA-256 deduplicated against all 7 held-out benchmarks.

Strictly Zero-Shot 7-Benchmark Full-Corpus Dense Retrieval (NDCG@10)

All models were evaluated identically over the full deduplicated document corpus of each benchmark (2,338 to 15,975 unique corpus documents per benchmark; graded-relevance IDCG@10; max_length=4096 for long-context models).

Model Params Dim Max Ctx Commercial-Safe (No MS MARCO) SciFact NFCorpus FiQA ArguAna TREC-COVID BEIR-5 Avg Mr.TyDi (11-Lang) LongDoc-8K All-7 Avg MRL 128d All-7
all-MiniLM-L6-v2 22M 384 256 Mixed 62.30 29.47 28.77 35.70 50.77 41.40 23.76 59.98 41.54 37.05
multilingual-e5-small 118M 384 512 Mixed 64.84 31.03 28.32 29.86 64.63 43.74 96.89 62.72 54.04 44.04
BAAI/bge-m3 568M 1024 8,192 No (MS MARCO) 61.97 31.45 32.83 39.44 62.87 45.71 97.26 72.51 56.90 45.39
Qwen/Qwen3-Embedding-0.6B 600M 1024 32K Mixed 66.86 34.72 35.41 46.35 75.31 51.73 92.84 66.23 59.67 54.49
Flintglass PrismEmbed-Small 140M 384 8,192 100% Yes 52.42 21.56 20.79 34.00 56.07 36.97 89.99 70.72 49.36 46.51
Flintglass PrismEmbed-Multilingual 307M 768 8,192 100% Yes 57.07 27.55 23.38 35.73 63.50 41.45 91.57 75.54 53.48 48.19
Flintglass PrismEmbed-Large 395M 1024 8,192 100% Yes 62.97 25.59 28.15 37.13 61.68 43.10 76.84 70.79 51.88 48.33

Pre-Exported ONNX & Hardware Specs

Property Value
Parameters 307M
Backbone jhu-clsp/mmBERT-base
Embedding Dimension 768 (Matryoshka: 768 / 512 / 256 / 128)
Pooling / Normalization Mean Pooling + L2 Normalize (native sentence-transformers config included)
Prompt Prefixes Required None (1-line drop-in!)
Max Context Length 8,192 tokens (native RoPE)
Languages 1,800+ languages (mmBERT 256K vocab, 8,192-token native RoPE)
ONNX FP32 (onnx/model.onnx) 1,228 MB (cosine_similarity = 1.0000 vs PyTorch)
ONNX INT8 (onnx/model_quantized.onnx) 1,112 MB (per-channel QUInt8, cosine_similarity = 0.9909)
CPU Latency (4 threads) 209 ms (INT8, 256-tok)

Quickstart

Python (sentence-transformers β€” 1-Line Drop-In + Matryoshka Truncation)

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("flintglass/PrismEmbed-Multilingual", truncate_dim=256)  # or omit truncate_dim for full dims
embeddings = model.encode([
    "How does Matryoshka Representation Learning reduce vector DB memory?",
    "Matryoshka embeddings remain accurate when truncated to 128 or 256 dimensions.",
])
print("Cosine similarity:", float(embeddings[0] @ embeddings[1]))

Fast CPU Inference (onnxruntime, Zero PyTorch Required)

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer

repo_id = "flintglass/PrismEmbed-Multilingual"
tok = AutoTokenizer.from_pretrained(repo_id)
onnx_path = hf_hub_download(repo_id, "onnx/model_quantized.onnx")
sess = ort.InferenceSession(onnx_path, providers=["CPUExecutionProvider"])

enc = tok(["What is RLVR?", "Reinforcement Learning with Verifiable Rewards."], padding=True, return_tensors="np")
vecs = sess.run(None, {"input_ids": enc["input_ids"].astype(np.int64), "attention_mask": enc["attention_mask"].astype(np.int64)})[0]
print("Cosine similarity:", float(vecs[0] @ vecs[1]))

The Complete 6-Pillar Flintglass Prism Open-Source Agent & RAG Stack

All models are 100% Apache-2.0 and evaluated on zero-leakage held-out benchmarks:

  1. Ingest: PrismParse-4B / PrismParse-2B β€” Document, Table, Receipt & Math OCR VLMs
  2. Embed: PrismEmbed-Multilingual | PrismEmbed-Large | PrismEmbed-Small (Live Demo)
  3. Rerank: PrismRerank-Large | PrismRerank-Multilingual | PrismRerank-Small (Live Demo)
  4. Protect: PrismGuard-Multilingual β€” 8K Prompt-Injection & Agent Security (Live Demo)
  5. Execute: Inkling-2-Mini-PrismAgent | PrismAgent-27B | PrismAgent-35B-A3B | PrismAgent-8B
  6. Verify: PrismVerify-4B / PrismVerify-Large β€” 8K RAG Hallucination & Groundedness Verification (Live Demo)

License

Released under Apache-2.0.

Downloads last month
21
Safetensors
Model size
0.3B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for flintglass/PrismEmbed-Multilingual

Quantized
(317)
this model

Space using flintglass/PrismEmbed-Multilingual 1

Collection including flintglass/PrismEmbed-Multilingual