nickprock commited on
Commit
3b49f9b
1 Parent(s): b09bab8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -8
README.md CHANGED
@@ -1,18 +1,24 @@
1
  ---
2
- library_name: sentence-transformers
3
  pipeline_tag: sentence-similarity
4
  tags:
5
  - sentence-transformers
6
  - feature-extraction
7
  - sentence-similarity
8
  - transformers
9
-
 
 
 
 
 
 
10
  ---
11
 
12
- # {MODEL_NAME}
13
 
14
  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.
15
 
 
16
  <!--- Describe your model here -->
17
 
18
  ## Usage (Sentence-Transformers)
@@ -27,11 +33,12 @@ Then you can use the model like this:
27
 
28
  ```python
29
  from sentence_transformers import SentenceTransformer
30
- sentences = ["This is an example sentence", "Each sentence is converted"]
31
 
32
- model = SentenceTransformer('{MODEL_NAME}')
33
  embeddings = model.encode(sentences)
34
  print(embeddings)
 
35
  ```
36
 
37
 
@@ -52,11 +59,11 @@ def mean_pooling(model_output, attention_mask):
52
 
53
 
54
  # Sentences we want sentence embeddings for
55
- sentences = ['This is an example sentence', 'Each sentence is converted']
56
 
57
  # Load model from HuggingFace Hub
58
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
59
- model = AutoModel.from_pretrained('{MODEL_NAME}')
60
 
61
  # Tokenize sentences
62
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
@@ -70,6 +77,7 @@ sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']
70
 
71
  print("Sentence embeddings:")
72
  print(sentence_embeddings)
 
73
  ```
74
 
75
 
 
1
  ---
 
2
  pipeline_tag: sentence-similarity
3
  tags:
4
  - sentence-transformers
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
+ license: mit
9
+ datasets:
10
+ - stsb_multi_mt
11
+ - unicamp-dl/mmarco
12
+ language:
13
+ - it
14
+ library_name: sentence-transformers
15
  ---
16
 
17
+ # {multi-sentence-BERTino}
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.
20
 
21
+ 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).
22
  <!--- Describe your model here -->
23
 
24
  ## Usage (Sentence-Transformers)
 
33
 
34
  ```python
35
  from sentence_transformers import SentenceTransformer
36
+ sentences = ["Una ragazza si acconcia i capelli.", "Una ragazza si sta spazzolando i capelli."]
37
 
38
+ model = SentenceTransformer('nickprock/multi-sentence-BERTino')
39
  embeddings = model.encode(sentences)
40
  print(embeddings)
41
+
42
  ```
43
 
44
 
 
59
 
60
 
61
  # Sentences we want sentence embeddings for
62
+ sentences = ['Una ragazza si acconcia i capelli.', 'Una ragazza si sta spazzolando i capelli.']
63
 
64
  # Load model from HuggingFace Hub
65
+ tokenizer = AutoTokenizer.from_pretrained('nickprock/multi-sentence-BERTino')
66
+ model = AutoModel.from_pretrained('nickprock/multi-sentence-BERTino')
67
 
68
  # Tokenize sentences
69
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
77
 
78
  print("Sentence embeddings:")
79
  print(sentence_embeddings)
80
+
81
  ```
82
 
83