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_csadrmse_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_csadrmse_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     |  -3.80793 | Your query goes here! | <!DOCTYPE HTML PUBLI... |      0 |
|     1 |  114876 | safely-quick-gecko |  -6.51515 | Your query goes here! | Casey, I ran curve q... |      1 |
|     1 |   90929 | namely-clean-horse |  -6.63093 | Your query goes here! | -----Original Messag... |      2 |
|     1 |  126384 | wholly-proud-bison |  -6.7073  | Your query goes here! | All - We have saved ... |      3 |
|     1 |   48895 | fully-pet-alpaca   |  -6.81445 | Your query goes here! | Anna, I just left yo... |      4 |
|     1 |    1998 | badly-big-pigeon   |  -6.85158 | Your query goes here! | Geoff, Attached is y... |      5 |
|     1 |   72466 | lately-joint-fawn  |  -6.91694 | Your query goes here! | David, Here's the in... |      6 |
|     1 |  108431 | poorly-trusty-dove |  -7.47259 | Your query goes here! | I got the queries to... |      7 |
|     1 |   83963 | mainly-moving-ray  |  -8.2236  | Your query goes here! | -----Original Messag... |      8 |
|     1 |   43652 | firmly-well-dassie | -15.2568  | Your query goes here! | My impression is tha... |      9 |
Downloads last month
12
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