nickprock commited on
Commit
2eb51c8
1 Parent(s): 66ee6b3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -6
README.md CHANGED
@@ -8,10 +8,11 @@ tags:
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
 
17
  ## Usage (Sentence-Transformers)
@@ -26,11 +27,12 @@ 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
 
@@ -51,11 +53,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 +71,7 @@ sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']
69
 
70
  print("Sentence embeddings:")
71
  print(sentence_embeddings)
 
72
  ```
73
 
74
 
 
8
 
9
  ---
10
 
11
+ # {multi-sentence-BERTino}
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
+ This model is trained from [indigo-ai/BERTino](https://huggingface.co/indigo-ai/BERTino) using [mmarco italian](https://huggingface.co/datasets/unicamp-dl/mmarco) (200K) and [stsb italian](https://huggingface.co/datasets/stsb_multi_mt).
16
  <!--- Describe your model here -->
17
 
18
  ## Usage (Sentence-Transformers)
 
27
 
28
  ```python
29
  from sentence_transformers import SentenceTransformer
30
+ sentences = ["Una ragazza si acconcia i capelli.", "Una ragazza si sta spazzolando i capelli."]
31
 
32
+ model = SentenceTransformer('nickprock/multi-sentence-BERTino')
33
  embeddings = model.encode(sentences)
34
  print(embeddings)
35
+
36
  ```
37
 
38
 
 
53
 
54
 
55
  # Sentences we want sentence embeddings for
56
+ sentences = ['Una ragazza si acconcia i capelli.', 'Una ragazza si sta spazzolando i capelli.']
57
 
58
  # Load model from HuggingFace Hub
59
+ tokenizer = AutoTokenizer.from_pretrained('nickprock/multi-sentence-BERTino')
60
+ model = AutoModel.from_pretrained('nickprock/multi-sentence-BERTino')
61
 
62
  # Tokenize sentences
63
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
71
 
72
  print("Sentence embeddings:")
73
  print(sentence_embeddings)
74
+
75
  ```
76
 
77