sdadas / polish-reranker-bge-v2

huggingface.co
Total runs: 192
24-hour runs: -3
7-day runs: -56
30-day runs: -600
Model's Last Updated: April 02 2025
text-ranking

Introduction of polish-reranker-bge-v2

Model Details of polish-reranker-bge-v2

polish-reranker-bge-v2

This is a reranker for Polish based on BAAI/bge-reranker-v2-m3 and further fine-tuned on large dataset of text pairs:

  • We utilised RankNet loss and trained the model on the same data as sdadas/polish-reranker-roberta-v2
  • BAAI/bge-reranker-v2.5-gemma2-lightweight was used as the teacher model for distillation
  • After the training, we merged the original and fine-tuned weights to create the final checkpoint
  • We used a custom implementation of XLM-RoBERTa with support for Flash Attention 2. If you want to use these features, load the model with the arguments trust_remote_code=True and attn_implementation="flash_attention_2" . This is especially important for this model, since BAAI/bge-reranker-v2-m3 supports long contexts of 8192 tokens. For such input length, the inference can be up to 400% faster with Flash Attention in comparison to the original model.

In most cases, the use of sdadas/polish-reranker-roberta-v2 is preferred to this model as it achieves better results for Polish. The main advantage of this model is its context length, so it may perform better on some datasets with long documents.

Usage (Huggingface Transformers)

The model can be used with Huggingface Transformers in the following way:

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import numpy as np

query = "Jak dożyć 100 lat?"
answers = [
    "Trzeba zdrowo się odżywiać i uprawiać sport.",
    "Trzeba pić alkohol, imprezować i jeździć szybkimi autami.",
    "Gdy trwała kampania politycy zapewniali, że rozprawią się z zakazem niedzielnego handlu."
]

model_name = "sdadas/polish-reranker-bge-v2"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(
    model_name,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
    device_map="cuda"
)
texts = [f"{query}</s></s>{answer}" for answer in answers]
tokens = tokenizer(texts, padding="longest", max_length=8192, truncation=True, return_tensors="pt").to("cuda")
output = model(**tokens)
results = output.logits.detach().cpu().float().numpy()
results = np.squeeze(results)
print(results.tolist())
Evaluation Results

The model achieves NDCG@10 of 64.21 in the Rerankers category of the Polish Information Retrieval Benchmark. See PIRB Leaderboard for detailed results.

Citation
@article{dadas2024assessing,
  title={Assessing generalization capability of text ranking models in Polish}, 
  author={Sławomir Dadas and Małgorzata Grębowiec},
  year={2024},
  eprint={2402.14318},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}

Runs of sdadas polish-reranker-bge-v2 on huggingface.co

192
Total runs
-3
24-hour runs
-62
3-day runs
-56
7-day runs
-600
30-day runs

More Information About polish-reranker-bge-v2 huggingface.co Model

More polish-reranker-bge-v2 license Visit here:

https://choosealicense.com/licenses/gemma

polish-reranker-bge-v2 huggingface.co

polish-reranker-bge-v2 huggingface.co is an AI model on huggingface.co that provides polish-reranker-bge-v2's model effect (), which can be used instantly with this sdadas polish-reranker-bge-v2 model. huggingface.co supports a free trial of the polish-reranker-bge-v2 model, and also provides paid use of the polish-reranker-bge-v2. Support call polish-reranker-bge-v2 model through api, including Node.js, Python, http.

polish-reranker-bge-v2 huggingface.co Url

https://huggingface.co/sdadas/polish-reranker-bge-v2

sdadas polish-reranker-bge-v2 online free

polish-reranker-bge-v2 huggingface.co is an online trial and call api platform, which integrates polish-reranker-bge-v2's modeling effects, including api services, and provides a free online trial of polish-reranker-bge-v2, you can try polish-reranker-bge-v2 online for free by clicking the link below.

sdadas polish-reranker-bge-v2 online free url in huggingface.co:

https://huggingface.co/sdadas/polish-reranker-bge-v2

polish-reranker-bge-v2 install

polish-reranker-bge-v2 is an open source model from GitHub that offers a free installation service, and any user can find polish-reranker-bge-v2 on GitHub to install. At the same time, huggingface.co provides the effect of polish-reranker-bge-v2 install, users can directly use polish-reranker-bge-v2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

polish-reranker-bge-v2 install url in huggingface.co:

https://huggingface.co/sdadas/polish-reranker-bge-v2

Url of polish-reranker-bge-v2

polish-reranker-bge-v2 huggingface.co Url

Provider of polish-reranker-bge-v2 huggingface.co

sdadas
ORGANIZATIONS

Other API from sdadas

huggingface.co

Total runs: 529
Run Growth: 204
Growth Rate: 38.56%
Updated:February 12 2026
huggingface.co

Total runs: 503
Run Growth: -17
Growth Rate: -3.38%
Updated:January 30 2026
huggingface.co

Total runs: 475
Run Growth: 119
Growth Rate: 25.05%
Updated:January 28 2026
huggingface.co

Total runs: 434
Run Growth: 267
Growth Rate: 61.52%
Updated:February 12 2026
huggingface.co

Total runs: 324
Run Growth: 74
Growth Rate: 22.84%
Updated:February 12 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 29 2026