castorini / aggretriever-cocondenser

huggingface.co
Total runs: 20
24-hour runs: 0
7-day runs: -15
30-day runs: -66
Model's Last Updated: April 07 2023

Introduction of aggretriever-cocondenser

Model Details of aggretriever-cocondenser

Aggretriever is an encoder to aggregate both lexical and semantic text information into a single-vector dense vector for dense retrieval, which is finetued on MS MARCO corpus with BM25 negative sampling, following the approach described in Aggretriever: A Simple Approach to Aggregate Textual Representation for Robust Dense Passage Retrieval .

The associated GitHub repository for fine-tuning is available here and the reproduce from pyserini is [here]. The following variants are also available:

Model Initialization MARCO Dev Encoder Path
aggretriever-distilbert distilbert-base-uncased 34.1 castorini/aggretriever-distilbert
aggretriever-cocondenser Luyu/co-condenser-marco 36.2 castorini/aggretriever-cocondenser
Usage (HuggingFace Transformers)

Using the model directly available in HuggingFace transformers. We use the implemented Aggretriever from pyserini here .

from pyserini.encode._aggretriever import AggretrieverQueryEncoder
from pyserini.encode._aggretriever import AggretrieverDocumentEncoder

model_name = '/store/scratch/s269lin/experiments/aggretriever/hf_model/aggretriever-cocondenser'
query_encoder = AggretrieverQueryEncoder(model_name, device='cpu')
context_encoder = AggretrieverDocumentEncoder(model_name, device='cpu')

query =  ["Where was Marie Curie born?"]
contexts = [
    "Maria Sklodowska, later known as Marie Curie, was born on November 7, 1867.",
    "Born in Paris on 15 May 1859, Pierre Curie was the son of Eugène Curie, a doctor of French Catholic origin from Alsace."
]

# Compute embeddings: take the last-layer hidden state of the [CLS] token
query_emb = query_encoder.encode(query)
ctx_emb = context_encoder.encode(contexts)
# Compute similarity scores using dot product
score1 = query_emb @ ctx_emb[0]  # 45.56658
score2 = query_emb @ ctx_emb[1]  # 45.81762

Runs of castorini aggretriever-cocondenser on huggingface.co

20
Total runs
0
24-hour runs
-3
3-day runs
-15
7-day runs
-66
30-day runs

More Information About aggretriever-cocondenser huggingface.co Model

aggretriever-cocondenser huggingface.co

aggretriever-cocondenser huggingface.co is an AI model on huggingface.co that provides aggretriever-cocondenser's model effect (), which can be used instantly with this castorini aggretriever-cocondenser model. huggingface.co supports a free trial of the aggretriever-cocondenser model, and also provides paid use of the aggretriever-cocondenser. Support call aggretriever-cocondenser model through api, including Node.js, Python, http.

aggretriever-cocondenser huggingface.co Url

https://huggingface.co/castorini/aggretriever-cocondenser

castorini aggretriever-cocondenser online free

aggretriever-cocondenser huggingface.co is an online trial and call api platform, which integrates aggretriever-cocondenser's modeling effects, including api services, and provides a free online trial of aggretriever-cocondenser, you can try aggretriever-cocondenser online for free by clicking the link below.

castorini aggretriever-cocondenser online free url in huggingface.co:

https://huggingface.co/castorini/aggretriever-cocondenser

aggretriever-cocondenser install

aggretriever-cocondenser is an open source model from GitHub that offers a free installation service, and any user can find aggretriever-cocondenser on GitHub to install. At the same time, huggingface.co provides the effect of aggretriever-cocondenser install, users can directly use aggretriever-cocondenser installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

aggretriever-cocondenser install url in huggingface.co:

https://huggingface.co/castorini/aggretriever-cocondenser

Url of aggretriever-cocondenser

aggretriever-cocondenser huggingface.co Url

Provider of aggretriever-cocondenser huggingface.co

castorini
ORGANIZATIONS

Other API from castorini

huggingface.co

Total runs: 123
Run Growth: 119
Growth Rate: 96.75%
Updated: November 05 2021