hrusheekeshsawarkar commited on
Commit
f61a66e
·
verified ·
1 Parent(s): b6c4f5e
Files changed (1) hide show
  1. README.md +6 -5
README.md CHANGED
@@ -24,8 +24,9 @@ language:
24
 
25
  # {MODEL_NAME}
26
 
27
- 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.
28
 
 
29
  <!--- Describe your model here -->
30
 
31
  ## Usage (Sentence-Transformers)
@@ -42,13 +43,13 @@ Then you can use the model like this:
42
  from sentence_transformers import SentenceTransformer
43
  from sentence_transformers.util import cos_sim
44
 
45
- matryoshka_dim = 64
46
 
47
  sentences =
48
  [
49
- "The weather is so nice!",
50
- "It's so sunny outside!",
51
- "He drove to the stadium.",
52
  ]
53
 
54
  model = SentenceTransformer("hrusheekeshsawarkar/indic-sentence-bert-nli-matryoshka",truncate_dim=matryoshka_dim)
 
24
 
25
  # {MODEL_NAME}
26
 
27
+ This is a [sentence-transformers](https://www.SBERT.net) model: Sentence Tranformers is a commonly used framework to train embedding models, and it recently implemented support for Matryoshka models. Training a Matryoshka embedding model using Sentence Transformers is quite elementary: rather than applying some loss function on only the full-size embeddings, we also apply that same loss function on truncated portions of the embeddings.
28
 
29
+ For example, if a model has an original embedding dimension of 768, it can now be trained on 768, 512, 256, 128 and 64. Each of these losses will be added together, optionally with some weight. this model is specifically finetuned on 11 major Indian languages.
30
  <!--- Describe your model here -->
31
 
32
  ## Usage (Sentence-Transformers)
 
43
  from sentence_transformers import SentenceTransformer
44
  from sentence_transformers.util import cos_sim
45
 
46
+ matryoshka_dim = 64 # Specify the embedding shape here
47
 
48
  sentences =
49
  [
50
+ "मौसम बहुत अच्छा है!",
51
+ "बाहर बहुत धूप है!",
52
+ "वह गाड़ी चलाकर स्टेडियम गया।",
53
  ]
54
 
55
  model = SentenceTransformer("hrusheekeshsawarkar/indic-sentence-bert-nli-matryoshka",truncate_dim=matryoshka_dim)