Downloads · 30 days
3
12% of all-time downloads
cost-sensitive-opt/sara_ce_lce_sans
sara_ce_lce_sans is a machine learning model from cost-sensitive-opt. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
3
12% of all-time downloads
All-time downloads
26
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
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_lce_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 | 90929 | namely-clean-horse | -14.9514 | Your query goes here! | -----Original Messag... | 0 |
| 1 | 5496 | badly-star-bat | -17.1177 | Your query goes here! | <!DOCTYPE HTML PUBLI... | 1 |
| 1 | 43652 | firmly-well-dassie | -21.0957 | Your query goes here! | My impression is tha... | 2 |
| 1 | 1998 | badly-big-pigeon | -26.5445 | Your query goes here! | Geoff, Attached is y... | 3 |
| 1 | 48895 | fully-pet-alpaca | -26.9451 | Your query goes here! | Anna, I just left yo... | 4 |
| 1 | 114876 | safely-quick-gecko | -30.2904 | Your query goes here! | Casey, I ran curve q... | 5 |
| 1 | 108431 | poorly-trusty-dove | -30.7021 | Your query goes here! | I got the queries to... | 6 |
| 1 | 72466 | lately-joint-fawn | -32.5465 | Your query goes here! | David, Here's the in... | 7 |
| 1 | 83963 | mainly-moving-ray | -33.6441 | Your query goes here! | -----Original Messag... | 8 |
| 1 | 126384 | wholly-proud-bison | -35.5031 | Your query goes here! | All - We have saved ... | 9 |