Model reference · open weights
polish-reranker-roberta is an open-weight embedding model from sdadas. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | sdadas |
|---|---|
| Type | Embedding models |
| Task | Reranker |
| Parameters (lead) | 443M |
| Context | 8194 tokens |
| Runs with | sentence-transformers |
| Released | 2025-07-04 |
| Popularity | 13k downloads / month |
| Licence | Open, with conditions |
About
This model is designed to serve as a Polish reranker in retrieval-augmented generation (RAG) pipelines. It is a general-purpose reranker that delivers strong performance across various document types and domains. It is the successor to sdadas/polish-reranker-roberta-v2 and has the following key features:
The main difference between polish-reranker-roberta-v2 and polish-reranker-roberta-v3 is the support for longer contexts - 16x increase from 512 to 8192 tokens. This has a significant impact on reranking quality for datasets with longer documents. Table 1 presents examples of tasks from the PIRB benchmark where substantial improvements were observed as a result of the extended context. For short and medium-length texts, the model achieves comparable or slightly better results than the previous version. For tasks involving very short texts (e.g., onet, czy-wiesz-v2), we observed a slight decrease in quality. The average score on the PIRB benchmark increased from 64.49 to 65.17 when using the sdadas/mmlw-retrieval-roberta-large retriever, or from 65.30 to 66.21 when using BAAI/bge-multilingual-gemma2.
Table 1. Comparison between sdadas/polish-reranker-roberta-v2 and sdadas/polish-reranker-roberta-v3 on selected long-context tasks from the PIRB benchmark. We report absolute improvement of NDCG@10 score.
One of the aspects we focused on while building the new model was improving reranking quality for datasets from the government and municipal administration domain. To address this, the training data was expanded with an additional corpus of questions and documents related to public administration. Table 2 presents the evaluation results of selected rerankers on three datasets from this domain. Two of them consist of short questions and answers prepared manually (ezd-qa) or scraped from government and local FAQ websites (opi-urzedowe). The third dataset (ezd-ir-chunked) contains short questions and long passages of up to several thousand tokens, thus requiring the handling of longer context and corresponding to a typical RAG use case. The results for all rerankers were generated using BAAI/bge-m3 as the retriever.
Table 2. NDCG@10 scores for selected rerankers on three tasks from the Polish public administration domain.
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-roberta-v3"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(
model_name,
dtype=torch.bfloat16,
device_map="cuda"
)
texts = [f"{query}{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())
The model can also be used in Sentence-Transformers:
import torch.nn
from sentence_transformers import CrossEncoder
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 = CrossEncoder(
"sdadas/polish-reranker-roberta-v3",
default_activation_function=torch.nn.Identity(),
max_length=8192,
device="cuda",
model_kwargs={"dtype": torch.bfloat16}
)
results = model.predict([[query, answer] for answer in answers])
print(results.tolist())
The model achieves NDCG@10 of 66.21 in the Rerankers category of the Polish Information Retrieval Benchmark. S
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys polish-reranker-roberta for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (polish-reranker-roberta below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"polish-reranker-roberta","input":"text to embed"}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.