jamescalam commited on
Commit
44786c5
1 Parent(s): 469161d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -19
README.md CHANGED
@@ -5,12 +5,18 @@ tags:
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
-
 
 
 
 
9
  ---
10
 
11
- # {MODEL_NAME}
 
 
12
 
13
- 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.
14
 
15
  <!--- Describe your model here -->
16
 
@@ -28,7 +34,7 @@ Then you can use the model like this:
28
  from sentence_transformers import SentenceTransformer
29
  sentences = ["This is an example sentence", "Each sentence is converted"]
30
 
31
- model = SentenceTransformer('{MODEL_NAME}')
32
  embeddings = model.encode(sentences)
33
  print(embeddings)
34
  ```
@@ -54,8 +60,8 @@ def mean_pooling(model_output, attention_mask):
54
  sentences = ['This is an example sentence', 'Each sentence is converted']
55
 
56
  # Load model from HuggingFace Hub
57
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
58
- model = AutoModel.from_pretrained('{MODEL_NAME}')
59
 
60
  # Tokenize sentences
61
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
@@ -71,15 +77,6 @@ print("Sentence embeddings:")
71
  print(sentence_embeddings)
72
  ```
73
 
74
-
75
-
76
- ## Evaluation Results
77
-
78
- <!--- Describe how your model was evaluated -->
79
-
80
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
81
-
82
-
83
  ## Training
84
  The model was trained with the parameters:
85
 
@@ -123,7 +120,3 @@ SentenceTransformer(
123
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
124
  )
125
  ```
126
-
127
- ## Citing & Authors
128
-
129
- <!--- Describe where people can find more information -->
 
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
+ language:
9
+ - en
10
+ license: mit
11
+ datasets:
12
+ - snli
13
  ---
14
 
15
+ # MPNet NLI
16
+
17
+ 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 *(including negatives) *and returns MRR@10 and MAP scores of ~0.95 on the SNLI test set.
18
 
19
+ 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).
20
 
21
  <!--- Describe your model here -->
22
 
 
34
  from sentence_transformers import SentenceTransformer
35
  sentences = ["This is an example sentence", "Each sentence is converted"]
36
 
37
+ model = SentenceTransformer('jamescalam/mpnet-snli-negatives')
38
  embeddings = model.encode(sentences)
39
  print(embeddings)
40
  ```
 
60
  sentences = ['This is an example sentence', 'Each sentence is converted']
61
 
62
  # Load model from HuggingFace Hub
63
+ tokenizer = AutoTokenizer.from_pretrained('jamescalam/mpnet-snli-negatives')
64
+ model = AutoModel.from_pretrained('jamescalam/mpnet-snli-negatives')
65
 
66
  # Tokenize sentences
67
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
77
  print(sentence_embeddings)
78
  ```
79
 
 
 
 
 
 
 
 
 
 
80
  ## Training
81
  The model was trained with the parameters:
82
 
 
120
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
121
  )
122
  ```