NLPlab-skku/RAG-assignment
Updated โข 240
This cross-encoder scores an English question against a Wikipedia title and its original passage. Use the single relevance logit to rerank candidate passages.
The search system retrieves 100 BM25 candidates, keeps 50 ranked by MiniLM, and blends the BGE and initial BM25 scores to select 5 passages. The accompanying Colab notebook evaluates the complete system on dev. Training details and the evidence fingerprint are in training_summary.json.
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo = "EllaNAM/rag-assignment-bge-reranker"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
features = tokenizer(
"What is the capital of France?",
"Paris\nParis is the capital of France.",
max_length=256, truncation=True, return_tensors="pt",
)
with torch.inference_mode():
logit = model(**features).logits.item()
Base model
BAAI/bge-reranker-base