The associated GitHub repository for fine-tuning is available
here
and the reproduce from pyserini is [here]. The following variants are also available:
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-distilbert'
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
query_emb = query_encoder.encode(query)
ctx_emb = context_encoder.encode(contexts)
# Compute similarity scores using dot product
score1 = query_emb @ ctx_emb[0] # 47.667152
score2 = query_emb @ ctx_emb[1] # 39.054127
Runs of castorini aggretriever-distilbert on huggingface.co
12
Total runs
0
24-hour runs
-4
3-day runs
-21
7-day runs
-72
30-day runs
More Information About aggretriever-distilbert huggingface.co Model
aggretriever-distilbert huggingface.co
aggretriever-distilbert huggingface.co is an AI model on huggingface.co that provides aggretriever-distilbert's model effect (), which can be used instantly with this castorini aggretriever-distilbert model. huggingface.co supports a free trial of the aggretriever-distilbert model, and also provides paid use of the aggretriever-distilbert. Support call aggretriever-distilbert model through api, including Node.js, Python, http.
aggretriever-distilbert huggingface.co is an online trial and call api platform, which integrates aggretriever-distilbert's modeling effects, including api services, and provides a free online trial of aggretriever-distilbert, you can try aggretriever-distilbert online for free by clicking the link below.
castorini aggretriever-distilbert online free url in huggingface.co:
aggretriever-distilbert is an open source model from GitHub that offers a free installation service, and any user can find aggretriever-distilbert on GitHub to install. At the same time, huggingface.co provides the effect of aggretriever-distilbert install, users can directly use aggretriever-distilbert installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
aggretriever-distilbert install url in huggingface.co: