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_bce_sans)

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_bce_sans").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 |   43652 | firmly-well-dassie | -11.6436 | Your query goes here! | My impression is tha... |      0 |
|     1 |    1998 | badly-big-pigeon   | -12.1783 | Your query goes here! | Geoff, Attached is y... |      1 |
|     1 |    5496 | badly-star-bat     | -12.7141 | Your query goes here! | <!DOCTYPE HTML PUBLI... |      2 |
|     1 |   90929 | namely-clean-horse | -13.0685 | Your query goes here! | -----Original Messag... |      3 |
|     1 |  108431 | poorly-trusty-dove | -13.1359 | Your query goes here! | I got the queries to... |      4 |
|     1 |  114876 | safely-quick-gecko | -13.1488 | Your query goes here! | Casey, I ran curve q... |      5 |
|     1 |   48895 | fully-pet-alpaca   | -13.1623 | Your query goes here! | Anna, I just left yo... |      6 |
|     1 |   83963 | mainly-moving-ray  | -13.1749 | Your query goes here! | -----Original Messag... |      7 |
|     1 |   72466 | lately-joint-fawn  | -13.1815 | Your query goes here! | David, Here's the in... |      8 |
|     1 |  126384 | wholly-proud-bison | -13.207  | Your query goes here! | All - We have saved ... |      9 |
Downloads last month
4
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