Zen3 Reranker Medium

Medium-sized Zen3 reranker for higher accuracy re-scoring in RAG pipelines.

Overview

Built on Zen MoDE (Mixture of Distilled Experts) architecture with 1.5B parameters and 8K context window.

Developed by Hanzo AI and the Zoo Labs Foundation.

Quick Start

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

model_id = "zenlm/zen3-reranker-medium"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id, torch_dtype="auto")

query = "What is machine learning?"
passages = [
    "Machine learning is a subset of artificial intelligence...",
    "The weather today is sunny and warm.",
    "Neural networks learn from labeled training data.",
]

pairs = [[query, p] for p in passages]
features = tokenizer(pairs, padding=True, truncation=True, max_length=512, return_tensors="pt")

with torch.no_grad():
    scores = model(**features).logits.squeeze(-1)

ranked = sorted(zip(scores.tolist(), passages), reverse=True)
for score, passage in ranked:
    print(f"Score: {score:.4f} | {passage[:80]}")

Model Details

Attribute Value
Parameters 1.5B
Architecture Zen MoDE
Context 8K tokens
License Apache 2.0

License

Apache 2.0

Downloads last month
38
Safetensors
Model size
0.6B params
Tensor type
I64
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zenlm/zen3-reranker-medium

Finetunes
3 models
Quantizations
5 models