Kiel-2-Rerank

Kiel-2-Rerank is a high-performance Cross-Encoder reranker based on BAAI/bge-reranker-base.

This is a Cross Encoder model that evaluates query-document text pairs jointly to compute precise relevance scores for semantic search and multi-stage retrieval pipelines.


Model Details

Model Description

  • Model Type: Cross Encoder / Relevance Reranker
  • Base Model: BAAI/bge-reranker-base
  • Maximum Sequence Length: 512 tokens
  • Number of Output Labels: 1 label (Regression / Logits score)
  • Supported Modality: Text

Model Sources

Full Model Architecture

CrossEncoder(
  (0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'BertForSequenceClassification'})
)
Direct Usage (Sentence Transformers)
First, install the Sentence Transformers library:

Bash
pip install -U sentence-transformers
Then load your model and run inference:

Python
from sentence_transformers import CrossEncoder

# Load your custom reranker from the Hugging Face Hub
model = CrossEncoder("kiel2/Kiel-2-Rerank")

# Get relevance scores for pairs of inputs (query, document)
pairs = [
    [
        '" The public is understandably losing patience with these unwanted phone calls , unwanted intrusions , " he said at a White House ceremony .',
        '" While many good people work in the telemarketing industry , the public is understandably losing patience with these unwanted phone calls , unwanted intrusions , " Mr. Bush said .'
    ],
    [
        'Federal agent Bill Polychronopoulos said it was not known if the man , 30 , would be charged .',
        'Federal Agent Bill Polychronopoulos said last night the man involved in the Melbourne incident had been unarmed .'
    ],
]
scores = model.predict(pairs)
print(scores)

# Alternatively, rank an array of candidate texts against a single query
ranks = model.rank(
    'The public is losing patience with unwanted phone calls.',
    [
        'While many good people work in telemarketing, the public is losing patience with unwanted intrusions.',
        'Federal agents reported an unarmed suspect in the downtown incident.',
        'Corporate earnings reports will be released at the close of the fiscal year.'
    ]
)
print(ranks)
Citation
Code snippet
@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)",
}
Downloads last month
43
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kiel2/Kiel-2-Rerank

Finetuned
(27)
this model

Paper for kiel2/Kiel-2-Rerank