YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.


SARA Cross-Encoder (sara_ce_cost-sensitive-opt/sara_ce_adrmse_relevance)

This model is a cross-encoder reranker trained on the SARA collection for Sensitivity-Aware Search (SAS).

Usage

from rankers import Cat
import pyterrier as pt

dataset = pt.get_dataset("irds:sara")

# Index the corpus
indexer = pt.IterDictIndexer('./indices/sara')
indexer.index(dataset.get_corpus_iter())

index_ref = pt.IndexRef.of('./indices/sara')
bm25 = pt.BatchRetrieve(index_ref, wmodel='BM25')

# Load the reranker
reranker = Cat.from_pretrained("cost-sensitive-opt/sara_ce_adrmse_relevance").to_pyterrier()

# Retrieval pipeline
pipeline = bm25 % 10 >> dataset.text_loader() >> reranker

pipeline.search("Your query goes here!")
|   qid |   docid | docno              |    score | query                 | text                    |   rank |
|------:|--------:|:-------------------|---------:|:----------------------|:------------------------|-------:|
|     1 |    5496 | badly-star-bat     | -5.61883 | Your query goes here! | <!DOCTYPE HTML PUBLI... |      0 |
|     1 |  126384 | wholly-proud-bison | -6.4882  | Your query goes here! | All - We have saved ... |      1 |
|     1 |   48895 | fully-pet-alpaca   | -6.54544 | Your query goes here! | Anna, I just left yo... |      2 |
|     1 |   90929 | namely-clean-horse | -6.57092 | Your query goes here! | -----Original Messag... |      3 |
|     1 |   72466 | lately-joint-fawn  | -6.91505 | Your query goes here! | David, Here's the in... |      4 |
|     1 |  114876 | safely-quick-gecko | -7.35775 | Your query goes here! | Casey, I ran curve q... |      5 |
|     1 |  108431 | poorly-trusty-dove | -7.42456 | Your query goes here! | I got the queries to... |      6 |
|     1 |   43652 | firmly-well-dassie | -7.48381 | Your query goes here! | My impression is tha... |      7 |
|     1 |    1998 | badly-big-pigeon   | -7.52379 | Your query goes here! | Geoff, Attached is y... |      8 |
|     1 |   83963 | mainly-moving-ray  | -7.81069 | Your query goes here! | -----Original Messag... |      9 |
Downloads last month
7
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support