Downloads · 30 days
11
21% of all-time downloads
clarin-knext/plt5-large-msmarco
plt5-large-msmarco is a machine learning model from clarin-knext. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
You can use transformer library and load model for conditional generation and expect those tokens or use monoT5 implementation from BEIR.
Downloads · 30 days
11
21% of all-time downloads
All-time downloads
53
Public
Repo size
6.6 GB
Likes
0
Public
Click a slice to open those files.
.bin3.3 GB · 100%
From the Hugging Face model README
You can use transformer library and load model for conditional generation and expect those tokens or use monoT5 implementation from BEIR.
prompt = Query: {query} Document: {document} Relevant:
Model returns tokens if relevant or not:
token_false='▁fałsz', token_true='▁prawda'
MonoT5 implementation is included in BEIR benchmark(https://github.com/beir-cellar/beir):
from beir.reranking.models import MonoT5
from beir.reranking import Rerank
queries = YOUR_QUERIES
corpus = YOUR_CORPUS
queries = {query['id'] : query['text'] for query in queries}
corpus = {doc['id']: {'title': doc['title'] , 'text': doc['text']} for doc in corpus}
cross_encoder_model = MonoT5(model_path, use_amp=False, token_false='▁fałsz', token_true='▁prawda')
reranker = Rerank(cross_encoder_model, batch_size=100)
rerank_results = reranker.rerank(corpus, queries, results, top_k=100)