Instructions to use flintglass/PrismRerank-Multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismRerank-Multilingual with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("flintglass/PrismRerank-Multilingual") model = AutoModelForSequenceClassification.from_pretrained("flintglass/PrismRerank-Multilingual", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Flintglass PrismRerank-Multilingual
Flintglass PrismRerank-Multilingual (307M, jhu-clsp/mmBERT-base) is a 100% commercial-safe (Zero MS MARCO!), Apache-2.0, 8,192-token cross-encoder reranker built for production RAG pipelines.
Flagship 1,800+ language 8K-context commercial-safe reranker: achieves 98.37% NDCG@10 on Mr.TyDi (11 languages) and 97.91% on LongDoc-8Kβbeating 2Γ larger Qwen3-Reranker-0.6B on both benchmarks at 3.4Γ faster GPU throughput, beating 568M BAAI/bge-reranker-v2-m3 on TREC-COVID (77.85 vs 77.60), and beating 435M mxbai-rerank-large-v1 overall (63.30% vs 61.15%) with ZERO MS MARCO training data!
- Live CPU Demo (ONNX INT8): flintglass/PrismRerank-Demo
- Full PrismRerank Family: PrismRerank-Large (395M EN) | PrismRerank-Multilingual (307M, 1,800+ langs) | PrismRerank-Small (140M, 1,800+ langs)
- Pre-Exported ONNX Included:
onnx/model.onnx(FP32, 1,231 MB, max diff4.0e-5) &onnx/model_quantized.onnx(verified per-channel QUInt8, 901 MB, Pearson0.987, 100% ranking parity)
Why Commercial-Safe (Zero MS MARCO)?
Most popular open-weight rerankers train heavily on MS MARCO, whose license restricts use to non-commercial research. Flintglass PrismRerank is trained exclusively on 105,558 8-document groups (844,464 query-document pairs) sourced solely from explicitly permissive open datasetsβdistilled with Apache-2.0 Qwen/Qwen3-Reranker-4B soft logits and strictly SHA-256 deduplicated against all 7 held-out benchmarks:
| Training Source | License | Groups (8-Doc) | Domain & Languages |
|---|---|---|---|
allenai/gooaq |
Apache-2.0 | 30,000 | Real-world open-domain QA (finance, health, tech, science) |
miracl/miracl |
Apache-2.0 | 19,200 | 16-language human-annotated retrieval with hard negatives |
castorini/mr-tydi (Parquet) |
Apache-2.0 | 19,108 | 11-language multilingual retrieval |
qiaojin/PubMedQA |
MIT | 16,000 | Biomedical & scientific research passages |
ServiceNow/repliqa |
CC-BY-4.0 | 14,000 | Long-document (2Kβ6K token) needle-in-haystack retrieval |
Shitao/MLDR |
MIT | 8,450 | 13-language multilingual long-document retrieval |
| Total (Zero MS MARCO) | 100% Permissive | 105,558 | 844,464 pairs across 20+ languages & up to 8K tokens |
Strictly Zero-Shot 7-Benchmark Leaderboard (NDCG@10)
All models were evaluated identically across 2,498 held-out queries (5 BEIR zero-shot datasets + 11-language Mr.TyDi test + 8K LongDoc retrieval, max_length=4096 for long-context models and native 512 for mxbai-rerank-large-v1).
| Model | Params | Max Context | Languages | Commercial-Safe (No MS MARCO) | SciFact | NFCorpus | FiQA | TREC-COVID | BEIR-4 RAG Avg | ArguAna | Mr.TyDi (11-Lang) | LongDoc-8K | All-7 Avg |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BM25 (Pyserini / Lexical) | β | β | Any | Yes | 66.45 | 35.45 | 22.84 | 58.27 | 45.75 | 33.16 | 24.36 | 18.13 | 36.95 |
mxbai-rerank-large-v1 |
435M | 512 | EN | No (MS MARCO) | 72.70 | 41.55 | 35.41 | 83.53 | 58.30 | 16.28 | 95.05 | 83.57 | 61.15 |
BAAI/bge-reranker-v2-m3 |
568M | 8,192 | 100+ | No (MS MARCO) | 72.36 | 38.94 | 35.86 | 77.60 | 56.19 | 44.58 | 99.73 | 98.00 | 66.72 |
Qwen/Qwen3-Reranker-0.6B |
600M | 32K | 100+ | Mixed | 75.05 | 41.12 | 35.49 | 82.88 | 58.64 | 49.07 | 97.99 | 91.72 | 67.62 |
| Flintglass PrismRerank-Small | 140M | 8,192 | 1,800+ | 100% Yes | 73.31 | 37.95 | 33.31 | 76.05 | 55.16 | 21.78 | 98.23 | 97.39 | 62.57 |
| Flintglass PrismRerank-Multilingual | 307M | 8,192 | 1,800+ | 100% Yes | 70.23 | 37.31 | 34.79 | 77.85 | 55.05 | 26.66 | 98.37 | 97.91 | 63.30 |
| Flintglass PrismRerank-Large | 395M | 8,192 | EN+ | 100% Yes | 74.01 | 39.24 | 36.50 | 81.10 | 57.71 | 19.89 | 97.16 | 97.09 | 63.57 |
Honest note on ArguAna: ArguAna evaluates counter-argument retrieval (finding passages that contradict the query rather than answer it). Standard QA/RAG rerankers without MS MARCO/argumentation tuning score lower on ArguAna (similar to
mxbai-rerank-large-v1at16.28). We report both the 4-domain standard RAG BEIR average (SciFact + NFCorpus + FiQA + TREC-COVID) and the full 7-benchmark average transparently.
Pre-Exported ONNX & Hardware Specs
| Property | Value |
|---|---|
| Parameters | 307M |
| Backbone | jhu-clsp/mmBERT-base |
| Max Context Length | 8,192 tokens (native RoPE) |
| Languages | 1,800+ languages (mmBERT 256K vocab, 8,192-token RoPE) |
ONNX FP32 (onnx/model.onnx) |
1,231 MB (max_abs_diff = 4.0e-5 vs PyTorch) |
ONNX INT8 (onnx/model_quantized.onnx) |
901 MB (per-channel QUInt8, Pearson 0.987, 100% rank parity) |
| CPU Latency (4 threads) | 139 ms (INT8, 256-tok pair) |
Quickstart
Python (transformers)
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "flintglass/PrismRerank-Multilingual"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id, torch_dtype=torch.bfloat16).eval()
query = "How does cross-encoder reranking improve RAG accuracy?"
docs = [
"Cross-encoders jointly attend over query and document tokens, sharply reducing top-k retrieval errors.",
"Sourdough bread requires wild yeast fermentation and regular feeding of the starter culture.",
]
enc = tok([query] * len(docs), docs, padding=True, truncation=True, max_length=4096, return_tensors="pt")
with torch.no_grad():
scores = model(**enc).logits.squeeze(-1).tolist()
for score, doc in sorted(zip(scores, docs), reverse=True):
print(f"{score:+.3f} | {doc}")
Python (sentence-transformers CrossEncoder)
from sentence_transformers import CrossEncoder
reranker = CrossEncoder("flintglass/PrismRerank-Multilingual", max_length=4096)
scores = reranker.predict([
("How does cross-encoder reranking improve RAG accuracy?", "Cross-encoders jointly attend over query and document tokens."),
("How does cross-encoder reranking improve RAG accuracy?", "Sourdough bread requires wild yeast fermentation."),
])
print(scores)
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/PrismRerank-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 uses deterministic execution verifiers."], return_tensors="np")
logit = sess.run(None, {"input_ids": enc["input_ids"].astype(np.int64), "attention_mask": enc["attention_mask"].astype(np.int64)})[0][0, 0]
print(f"Relevance logit: {logit:.3f}")
The 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
- 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.
- Downloads last month
- 20
Model tree for flintglass/PrismRerank-Multilingual
Base model
jhu-clsp/mmBERT-base