MMLW (muszę mieć lepszą wiadomość) are neural text encoders for Polish.
This model is optimized for information retrieval tasks. It can transform queries and passages to 768 dimensional vectors.
The model was developed using a two-step procedure:
⚠️ Our dense retrievers require the use of specific prefixes and suffixes when encoding texts. For this model, queries should be prefixed with "query: " and passages with "passage: " ⚠️
You can use the model like this with
sentence-transformers:
1from sentence_transformers import SentenceTransformer
2from sentence_transformers.util import cos_sim
3
4query_prefix = "query: "
5answer_prefix = "passage: "
6queries = [query_prefix + "Jak dożyć 100 lat?"]
7answers = [
8 answer_prefix + "Trzeba zdrowo się odżywiać i uprawiać sport.",
9 answer_prefix + "Trzeba pić alkohol, imprezować i jeździć szybkimi autami.",
10 answer_prefix + "Gdy trwała kampania politycy zapewniali, że rozprawią się z zakazem niedzielnego handlu."
11]
12model = SentenceTransformer("sdadas/mmlw-retrieval-e5-base")
13queries_emb = model.encode(queries, convert_to_tensor=True, show_progress_bar=False)
14answers_emb = model.encode(answers, convert_to_tensor=True, show_progress_bar=False)
15
16best_answer = cos_sim(queries_emb, answers_emb).argmax().item()
17print(answers[best_answer])
18# Trzeba zdrowo się odżywiać i uprawiać sport.
The model achieves
NDCG@10 of
56.09 on the Polish Information Retrieval Benchmark. See
PIRB Leaderboard for detailed results.
This model was trained with the A100 GPU cluster support delivered by the Gdansk University of Technology within the TASK center initiative.
1@inproceedings{dadas2024pirb,
2 title={PIRB: A Comprehensive Benchmark of Polish Dense and Hybrid Text Retrieval Methods},
3 author={Dadas, Slawomir and Pere{\l}kiewicz, Micha{\l} and Po{\'s}wiata, Rafa{\l}},
4 booktitle={Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
5 pages={12761--12774},
6 year={2024}
7}