DeAR-Reranking
Collection
DeAR (Deep Agent Rank): Dual-Stage Document Reranking with Reasoning Agents Accepted at EMNLP Findings 2025
•
12 items
•
Updated
•
1
LLaMA2-13B-RankLLaMA-Teacher is a 13B parameter teacher model designed for neural reranking tasks. This model serves as the foundation for knowledge distillation in the DeAR framework, generating Chain-of-Thought (CoT) reasoning to guide smaller student models.
This model is intended to:
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
# Load model
model_name = "abdoelsayed/llama2-13b-rankllama-teacher"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model.eval()
# Score a query-document pair
query = "What is machine learning?"
document = "Machine learning is a subset of artificial intelligence that focuses on training algorithms to learn patterns from data."
inputs = tokenizer(
f"query: {query}",
f"document: {document}",
return_tensors="pt",
truncation=True,
max_length=512,
padding=True
)
inputs = {k: v.to(model.device) for k, v in inputs.items()}
with torch.no_grad():
score = model(**inputs).logits.squeeze().item()
print(f"Relevance score: {score}")
This teacher model is evaluated on standard IR benchmarks:
| Dataset | NDCG@10 |
|---|---|
| MS MARCO Dev | 72.5 |
| TREC DL19 | 73.8 |
| TREC DL20 | 71.2 |
LLaMA2-13B
↓
[Transformer Layers]
↓
[Classification Head]
↓
Relevance Score
This teacher model generates soft labels and CoT reasoning used to train:
The distillation process uses:
If you use this model, please cite:
@article{abdallah2025dear,
title={DeAR: Dual-Stage Document Reranking with Reasoning Agents via LLM Distillation},
author={Abdallah, Abdelrahman and Mozafari, Jamshid and Piryani, Bhawna and Jatowt, Adam},
journal={arXiv preprint arXiv:2508.16998},
year={2025}
}
MIT License
Student Models (Distilled from this teacher):
8B Models:
3B Models:
Dataset:
Base model
meta-llama/Llama-2-13b-hf