OpenMatch / cocodr-base-msmarco

huggingface.co
Total runs: 7.0K
24-hour runs: 3
7-day runs: 110
30-day runs: 121
Model's Last Updated: September 15 2023
fill-mask

Introduction of cocodr-base-msmarco

Model Details of cocodr-base-msmarco

This model has been first pretrained on the BEIR corpus and fine-tuned on MS MARCO dataset following the approach described in the paper COCO-DR: Combating Distribution Shifts in Zero-Shot Dense Retrieval with Contrastive and Distributionally Robust Learning . The associated GitHub repository is available here https://github.com/OpenMatch/COCO-DR .

This model is trained with BERT-base as the backbone with 110M hyperparameters. See the paper https://arxiv.org/abs/2210.15212 for details.

Usage

Pre-trained models can be loaded through the HuggingFace transformers library:

from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("OpenMatch/cocodr-base-msmarco") 
tokenizer = AutoTokenizer.from_pretrained("OpenMatch/cocodr-base-msmarco") 

Then embeddings for different sentences can be obtained by doing the following:


sentences = [
    "Where was Marie Curie born?",
    "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."
]

inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
embeddings = model(**inputs, output_hidden_states=True, return_dict=True).hidden_states[-1][:, :1].squeeze(1) # the embedding of the [CLS] token after the final layer

Then similarity scores between the different sentences are obtained with a dot product between the embeddings:


score01 = embeddings[0] @ embeddings[1] # 216.9792
score02 = embeddings[0] @ embeddings[2] # 216.6684

Runs of OpenMatch cocodr-base-msmarco on huggingface.co

7.0K
Total runs
3
24-hour runs
94
3-day runs
110
7-day runs
121
30-day runs

More Information About cocodr-base-msmarco huggingface.co Model

More cocodr-base-msmarco license Visit here:

https://choosealicense.com/licenses/mit

cocodr-base-msmarco huggingface.co

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

cocodr-base-msmarco huggingface.co Url

https://huggingface.co/OpenMatch/cocodr-base-msmarco

OpenMatch cocodr-base-msmarco online free

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

OpenMatch cocodr-base-msmarco online free url in huggingface.co:

https://huggingface.co/OpenMatch/cocodr-base-msmarco

cocodr-base-msmarco install

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

cocodr-base-msmarco install url in huggingface.co:

https://huggingface.co/OpenMatch/cocodr-base-msmarco

Url of cocodr-base-msmarco

cocodr-base-msmarco huggingface.co Url

Provider of cocodr-base-msmarco huggingface.co

OpenMatch
ORGANIZATIONS

Other API from OpenMatch

huggingface.co

Total runs: 65
Run Growth: -177
Growth Rate: -276.56%
Updated:July 31 2023
huggingface.co

Total runs: 10
Run Growth: 6
Growth Rate: 60.00%
Updated:June 27 2023
huggingface.co

Total runs: 9
Run Growth: 5
Growth Rate: 55.56%
Updated:July 04 2023
huggingface.co

Total runs: 8
Run Growth: 0
Growth Rate: 0.00%
Updated:October 21 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 25 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 24 2024