Instructions to use flintglass/PrismEmbed-Large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use flintglass/PrismEmbed-Large with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("flintglass/PrismEmbed-Large") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Download README.md from flintglass/PrismEmbed-Large: direct link, hf CLI and curl.
- Browser
- Download file 8.42 kB
-
https://huggingface.co/flintglass/PrismEmbed-Large/resolve/main/README.md
- Command line
-
hf download hf://flintglass/PrismEmbed-Large/README.md
-
curl -L -o README.md https://huggingface.co/flintglass/PrismEmbed-Large/resolve/main/README.md
license: apache-2.0
language:
- en
base_model: answerdotai/ModernBERT-large
pipeline_tag: feature-extraction
library_name: sentence-transformers
tags:
- sentence-transformers
- feature-extraction
- sentence-similarity
- embeddings
- matryoshka
- rag
- retrieval
- commercial-safe
- zero-ms-marco
- long-context
- 8k-context
- onnx
- modernbert
- flintglass
- prismembed
Flintglass PrismEmbed-Large
Flintglass PrismEmbed-Large (395M, answerdotai/ModernBERT-large) 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 Encoder Model at Matryoshka 128d (48.33% All-7 NDCG@10 β beating 568M BAAI/bge-m3 45.39% by +2.94 pts and all-MiniLM-L6-v2 37.05% by +11.28 pts for 8Γ smaller vector databases!), beats BAAI/bge-m3 on BEIR-SciFact (62.97% vs 61.97%), beats all-MiniLM-L6-v2 on BEIR-5 (43.10% vs 41.40%), and beats 600M Qwen3-Embedding-0.6B on LongDoc-8K (70.79% vs 66.23%) with ZERO MS MARCO!
- Live CPU Demo (ONNX INT8 + Matryoshka Explorer): flintglass/PrismEmbed-Demo
- Full PrismEmbed Family: PrismEmbed-Multilingual (307M, 1,800+ langs) | PrismEmbed-Large (395M EN) | PrismEmbed-Small (140M, 1,800+ langs)
- Pair with Second-Stage Rerankers: PrismRerank-Large / PrismRerank-Multilingual / PrismRerank-Small
- Pre-Exported ONNX Included:
onnx/model.onnx(FP32, 1,580 MB, cosine parity1.0000) &onnx/model_quantized.onnx(per-channel QUInt8, 1,317 MB, cosine parity0.9958)
Two-Stage Commercial-Safe (Zero MS MARCO) Training
- Stage 1 β Large-Batch Bidirectional Contrastive Pre-Training (
580,710pairs): 2 epochs of symmetric bidirectional InfoNCE + Multi-Scale Matryoshka Loss (384β512cross-GPU in-batch negatives) across exclusively Apache-2.0, MIT, and CC-BY-4.0 datasets (allenai/gooaq350K,qiaojin/PubMedQA115.6K,miracl/miracl16-lang 74.8K,mr-tydi11-lang 18.2K,ServiceNow/repliqa13.7K,Shitao/MLDR13-lang 8.5K). - Stage 2 β Hard-Negative + Cross-Encoder Teacher Distillation (
105,5588-doc groups): 1 epoch of hard-negative InfoNCE + soft KL-distillation from Apache-2.0Qwen/Qwen3-Reranker-4Blogits at long document contexts (1,024β8,192tokens) across all Matryoshka prefixes. - 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 | 395M |
| Backbone | answerdotai/ModernBERT-large |
| Embedding Dimension | 1024 (Matryoshka: 1024 / 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 | English-first (8,192-token native RoPE) |
ONNX FP32 (onnx/model.onnx) |
1,580 MB (cosine_similarity = 1.0000 vs PyTorch) |
ONNX INT8 (onnx/model_quantized.onnx) |
1,317 MB (per-channel QUInt8, cosine_similarity = 0.9958) |
| CPU Latency (4 threads) | 531 ms (INT8, 256-tok) |
Quickstart
Python (sentence-transformers β 1-Line Drop-In + Matryoshka Truncation)
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("flintglass/PrismEmbed-Large", 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-Large"
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:
- Ingest: PrismParse-4B / PrismParse-2B β Document, Table, Receipt & Math OCR VLMs
- Embed: PrismEmbed-Multilingual | PrismEmbed-Large | PrismEmbed-Small (Live Demo)
- Rerank: PrismRerank-Large | PrismRerank-Multilingual | PrismRerank-Small (Live Demo)
- Protect: PrismGuard-Multilingual β 8K Prompt-Injection & Agent Security (Live Demo)
- Execute: Inkling-2-Mini-PrismAgent | PrismAgent-27B | PrismAgent-35B-A3B | PrismAgent-8B
- Verify: PrismVerify-4B / PrismVerify-Large β 8K RAG Hallucination & Groundedness Verification (Live Demo)
License
Released under Apache-2.0.