--- tags: - sentence-transformers - cross-encoder - reranker base_model: BAAI/bge-reranker-base pipeline_tag: text-ranking library_name: sentence-transformers --- # Kiel-2-Rerank **Kiel-2-Rerank** is a high-performance Cross-Encoder reranker based on `BAAI/bge-reranker-base`. This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) 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](https://huggingface.co/BAAI/bge-reranker-base) - **Maximum Sequence Length:** 512 tokens - **Number of Output Labels:** 1 label (Regression / Logits score) - **Supported Modality:** Text ### Model Sources - **Documentation:** [Sentence Transformers Documentation](https://sbert.net) - **Cross Encoder Guide:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html) - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers) - **Hugging Face Hub:** [kiel2/Kiel-2-Rerank](https://huggingface.co/kiel2/Kiel-2-Rerank) ### Full Model Architecture ```text 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)", }