Sentence Similarity
sentence-transformers
PyTorch
Transformers
English
mpnet
feature-extraction
text-embeddings-inference
Instructions to use jamescalam/mpnet-snli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jamescalam/mpnet-snli with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jamescalam/mpnet-snli") 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 jamescalam/mpnet-snli with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("jamescalam/mpnet-snli") model = AutoModel.from_pretrained("jamescalam/mpnet-snli") - Notebooks
- Google Colab
- Kaggle
Commit ·
098d46c
1
Parent(s): 3cd52bd
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ datasets:
|
|
| 16 |
|
| 17 |
***Note**: The same model trained with negatives yields better performance. [Find it here](https://huggingface.co/jamescalam/mpnet-snli-negatives).*
|
| 18 |
|
| 19 |
-
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768
|
| 20 |
|
| 21 |
Find more info from [James Briggs on YouTube](https://youtube.com/c/jamesbriggs) or in the [**free** NLP for Semantic Search ebook](https://pinecone.io/learn/nlp).
|
| 22 |
|
|
|
|
| 16 |
|
| 17 |
***Note**: The same model trained with negatives yields better performance. [Find it here](https://huggingface.co/jamescalam/mpnet-snli-negatives).*
|
| 18 |
|
| 19 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for tasks like clustering or semantic search. It has been fine-tuned using the **S**tanford **N**atural **L**anguage **I**nference (SNLI) dataset and returns MRR@10 and MAP scores of ~0.92 on the SNLI test set.
|
| 20 |
|
| 21 |
Find more info from [James Briggs on YouTube](https://youtube.com/c/jamesbriggs) or in the [**free** NLP for Semantic Search ebook](https://pinecone.io/learn/nlp).
|
| 22 |
|