nickprock commited on
Commit
e991549
1 Parent(s): df00596

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -2
README.md CHANGED
@@ -27,11 +27,15 @@ 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('nickprock/sentence-bert-base-italian-uncased-sts-matryoshka')
33
  embeddings = model.encode(sentences)
34
- print(embeddings)
 
 
 
35
  ```
36
 
37
 
 
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
+ matryoshka_dim = 64
32
 
33
  model = SentenceTransformer('nickprock/sentence-bert-base-italian-uncased-sts-matryoshka')
34
  embeddings = model.encode(sentences)
35
+ embeddings = embeddings[..., :matryoshka_dim] # Shrink the embedding dimensions
36
+ print(embeddings.shape)
37
+ # => (2, 64)
38
+
39
  ```
40
 
41