nickprock commited on
Commit
74353b7
1 Parent(s): b26cccc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -9
README.md CHANGED
@@ -5,10 +5,15 @@ 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
 
@@ -26,14 +31,13 @@ Then you can use the model like this:
26
 
27
  ```python
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
- ```
35
-
36
 
 
37
 
38
  ## Usage (HuggingFace Transformers)
39
  Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
@@ -51,11 +55,11 @@ def mean_pooling(model_output, attention_mask):
51
 
52
 
53
  # Sentences we want sentence embeddings for
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')
@@ -69,6 +73,7 @@ sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']
69
 
70
  print("Sentence embeddings:")
71
  print(sentence_embeddings)
 
72
  ```
73
 
74
 
 
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
+ license: mit
9
+ datasets:
10
+ - unicamp-dl/mmarco
11
+ language:
12
+ - it
13
+ library_name: sentence-transformers
14
  ---
15
 
16
+ # MMARCO-bert-base-italian-uncased
17
 
18
  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.
19
 
 
31
 
32
  ```python
33
  from sentence_transformers import SentenceTransformer
34
+ sentences = ["Una ragazza si acconcia i capelli.", "Una ragazza si sta spazzolando i capelli."]
35
 
36
+ model = SentenceTransformer('nickprock/sentence-bert-base-italian-uncased')
37
  embeddings = model.encode(sentences)
38
  print(embeddings)
 
 
39
 
40
+ ```
41
 
42
  ## Usage (HuggingFace Transformers)
43
  Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
 
55
 
56
 
57
  # Sentences we want sentence embeddings for
58
+ sentences = ['Una ragazza si acconcia i capelli.', 'Una ragazza si sta spazzolando i capelli.']
59
 
60
  # Load model from HuggingFace Hub
61
+ tokenizer = AutoTokenizer.from_pretrained('nickprock/sentence-bert-base-italian-uncased')
62
+ model = AutoModel.from_pretrained('nickprock/sentence-bert-base-italian-uncased')
63
 
64
  # Tokenize sentences
65
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
73
 
74
  print("Sentence embeddings:")
75
  print(sentence_embeddings)
76
+
77
  ```
78
 
79