Instructions to use flintglass/PrismRerank-0.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismRerank-0.6B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flintglass/PrismRerank-0.6B") model = AutoModelForCausalLM.from_pretrained("flintglass/PrismRerank-0.6B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Flintglass PrismRerank-0.6B
32K-Context, 100+ Language, 100% Commercial-Safe (Zero MS MARCO!) Causal Reranker β distilling Apache-2.0 Qwen/Qwen3-Reranker-4B (6.7Γ larger teacher) into Apache-2.0 Qwen/Qwen3-Reranker-0.6B across 105,558 permissive long-context groups (844,464 pairs).
Beats Base Qwen/Qwen3-Reranker-0.6B on ALL 7 out of 7 strictly held-out zero-shot retrieval benchmarks simultaneously (69.24% All-7 NDCG@10, +1.62 pts; 57.77% BEIR-5, +1.05 pts; 97.64% LongDoc-8K, +5.92 pts; 98.22% Mr.TyDi 11-language) β and even surpasses the 6.7Γ larger Base Qwen/Qwen3-Reranker-4B (69.15%) on All-7 average! Fully 100% drop-in compatible with transformers, vLLM, TEI, and llama.cpp --reranking!
Part of the Flintglass Prism Open-Source Agent & RAG Stack Β· 4B Flagship:
flintglass/PrismRerank-4B(70.42%All-7) Β· GGUF Quantizations:flintglass/PrismRerank-0.6B-GGUF(F16,Q8_0,Q4_K_M)
Verified Zero-Shot 7-Benchmark Leaderboard (NDCG@10 %)
Evaluated identically with official Qwen3-Reranker yes/no log-odds scoring (max_length=4096) across 7 strictly held-out zero-shot benchmarks (zero overlap with training data):
| Model | Params | Ctx | SciFact | NFCorpus | FiQA | ArguAna | TREC-COVID | BEIR-5 Avg | Mr.TyDi (11L) | LongDoc-8K | All-7 Avg |
|---|---|---|---|---|---|---|---|---|---|---|---|
| BM25 Baseline | β | β | 67.89 | 32.51 | 23.61 | 39.70 | 65.59 | 45.86 | 42.10 | 45.20 | 45.23 |
BAAI/bge-reranker-v2-m3 |
568M | 8K | 71.88 | 36.73 | 37.98 | 37.14 | 79.40 | 52.63 | 96.45 | 85.11 | 63.53 |
Qwen/Qwen3-Reranker-0.6B (Base) |
600M | 32K | 75.05 | 41.12 | 35.49 | 49.07 | 82.88 | 56.72 | 97.99 | 91.72 | 67.62 |
Qwen/Qwen3-Reranker-4B (Base, 6.7Γ larger) |
4.0B | 32K | 76.26 | 41.39 | 38.75 | 51.28 | 84.12 | 58.36 | 98.57 | 93.22 | 69.15 |
flintglass/PrismRerank-0.6B |
600M | 32K | 76.27 | 41.31 | 37.48 | 49.21 | 84.56 | 57.77 | 98.22 | 97.64 | 69.24 |
flintglass/PrismRerank-4B (Flagship) |
4.0B | 32K | 76.75 | 42.14 | 39.76 | 52.01 | 84.05 | 58.94 | 99.06 | 99.17 | 70.42 |
Delta (PrismRerank-0.6B vs Base 0.6B) |
β | β | +1.22 | +0.19 | +1.99 | +0.14 | +1.68 | +1.05 | +0.23 | +5.92 | +1.62 |
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismRerank-0.6B"
tok = AutoTokenizer.from_pretrained(model_id, padding_side="left")
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto").eval()
yes_id = tok.convert_tokens_to_ids("yes")
no_id = tok.convert_tokens_to_ids("no")
PREFIX = '<|im_start|>system\nJudge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be "yes" or "no".<|im_end|>\n<|im_start|>user\n'
SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
INST = "Given a web search query, retrieve relevant passages that answer the query"
query = "How does Matryoshka Representation Learning reduce vector database memory?"
docs = [
"Matryoshka Representation Learning trains embeddings so leading prefixes (e.g., 128d or 256d) preserve retrieval quality, shrinking vector index RAM by 4x-8x.",
"The Russian nesting doll was first carved in 1890 by Vasily Zvyozdochkin.",
]
texts = [f"{PREFIX}<Instruct>: {INST}\n<Query>: {query}\n<Document>: {d}{SUFFIX}" for d in docs]
enc = tok(texts, padding=True, truncation=True, max_length=8192, return_tensors="pt").to(model.device)
with torch.inference_mode():
logits = model(**enc).logits[:, -1, :]
scores = torch.sigmoid(logits[:, yes_id] - logits[:, no_id]).float().cpu().tolist()
for s, d in sorted(zip(scores, docs), reverse=True):
print(f"{s:.4f} | {d}")
Training & Provenance
- Base Model:
Qwen/Qwen3-Reranker-0.6B(Apache-2.0) - Teacher:
Qwen/Qwen3-Reranker-4B(Apache-2.0, 6.7Γ larger) - Training Corpus:
105,558groups (844,464query-document pairs) built strictly from permissive commercial-safe sources (zero MS MARCO, zero CC-BY-NC, zero proprietary API labels). - Objective: Joint Listwise Teacher KL-Distillation (
T=1.5) + Listwise Gold-Positive CE + Calibrated Pointwise Soft-BCE (preserving calibrated[0, 1]sigmoid probabilities!). - License: Apache-2.0
- Downloads last month
- 15