Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

sentence-transformers
/
msmarco-roberta-base-v2

Sentence Similarity
sentence-transformers
PyTorch
google-tensorflow TensorFlow
JAX
ONNX
Safetensors
OpenVINO
Transformers
roberta
feature-extraction
text-embeddings-inference
Model card Files Files and versions
xet
Community
2

Instructions to use sentence-transformers/msmarco-roberta-base-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use sentence-transformers/msmarco-roberta-base-v2 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("sentence-transformers/msmarco-roberta-base-v2")
    
    sentences = [
        "That is a happy person",
        "That is a happy dog",
        "That is a very happy person",
        "Today is a sunny day"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Transformers

    How to use sentence-transformers/msmarco-roberta-base-v2 with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-roberta-base-v2")
    model = AutoModel.from_pretrained("sentence-transformers/msmarco-roberta-base-v2")
  • Notebooks
  • Google Colab
  • Kaggle
msmarco-roberta-base-v2
1.5 GB
Ctrl+K
Ctrl+K
  • 5 contributors
History: 8 commits
tomaarsen's picture
tomaarsen HF Staff
Update Sentence Transformers metadata
12bafdc verified over 2 years ago
  • 1_Pooling
    Add new SentenceTransformer model. almost 5 years ago
  • .gitattributes
    391 Bytes
    allow flax about 5 years ago
  • README.md
    3.73 kB
    Update Sentence Transformers metadata over 2 years ago
  • config.json
    678 Bytes
    Add new SentenceTransformer model. almost 5 years ago
  • config_sentence_transformers.json
    122 Bytes
    Add new SentenceTransformer model. almost 5 years ago
  • flax_model.msgpack
    499 MB
    xet
    upload flax model about 5 years ago
  • merges.txt
    456 kB
    Add new SentenceTransformer model. almost 5 years ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model. almost 5 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch.LongStorage",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage",
    • "collections.OrderedDict"

    What is a pickle import?

    499 MB
    xet
    Add new SentenceTransformer model. almost 5 years ago
  • sentence_bert_config.json
    53 Bytes
    Add new SentenceTransformer model. almost 5 years ago
  • special_tokens_map.json
    772 Bytes
    upload over 5 years ago
  • tf_model.h5
    499 MB
    xet
    Add TF weights almost 4 years ago
  • tokenizer.json
    1.36 MB
    Add new SentenceTransformer model. almost 5 years ago
  • tokenizer_config.json
    1.18 kB
    Add new SentenceTransformer model. almost 5 years ago
  • vocab.json
    798 kB
    Add new SentenceTransformer model. almost 5 years ago