binhcode25 commited on
Commit
66b1b54
1 Parent(s): 2123e8d

Add new SentenceTransformer model.

Browse files
Files changed (2) hide show
  1. README.md +20 -3
  2. model_description.json +2 -2
README.md CHANGED
@@ -8,7 +8,7 @@ tags:
8
 
9
  ---
10
 
11
- # sbert-paraphrase-multilingual-MiniLM-L12-v2-onnx
12
 
13
  This is the ONNX version of the Sentence Transformers model sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 for sentence embedding, optimized for speed and lightweight performance. By utilizing onnxruntime and tokenizers instead of heavier libraries like sentence-transformers and transformers, this version ensures a smaller library size and faster execution. Below are the details of the model:
14
  - Base model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
@@ -30,17 +30,34 @@ Using this model becomes easy when you have [LightEmbed](https://pypi.org/projec
30
  pip install -U light-embed
31
  ```
32
 
33
- Then you can use the model like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
37
- sentences = ["This is an example sentence", "Each sentence is converted"]
 
 
 
38
 
39
  model = TextEmbedding('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
40
  embeddings = model.encode(sentences)
41
  print(embeddings)
42
  ```
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  ## Citing & Authors
45
 
46
  Binh Nguyen / binhcode25@gmail.com
 
8
 
9
  ---
10
 
11
+ # LightEmbed/sbert-paraphrase-multilingual-MiniLM-L12-v2-onnx
12
 
13
  This is the ONNX version of the Sentence Transformers model sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 for sentence embedding, optimized for speed and lightweight performance. By utilizing onnxruntime and tokenizers instead of heavier libraries like sentence-transformers and transformers, this version ensures a smaller library size and faster execution. Below are the details of the model:
14
  - Base model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
 
30
  pip install -U light-embed
31
  ```
32
 
33
+ Then you can use the model using the original model name like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
37
+ sentences = [
38
+ "This is an example sentence",
39
+ "Each sentence is converted"
40
+ ]
41
 
42
  model = TextEmbedding('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
43
  embeddings = model.encode(sentences)
44
  print(embeddings)
45
  ```
46
 
47
+ Then you can use the model using onnx model name like this:
48
+
49
+ ```python
50
+ from light_embed import TextEmbedding
51
+ sentences = [
52
+ "This is an example sentence",
53
+ "Each sentence is converted"
54
+ ]
55
+
56
+ model = TextEmbedding('LightEmbed/sbert-paraphrase-multilingual-MiniLM-L12-v2-onnx')
57
+ embeddings = model.encode(sentences)
58
+ print(embeddings)
59
+ ```
60
+
61
  ## Citing & Authors
62
 
63
  Binh Nguyen / binhcode25@gmail.com
model_description.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:96a37086059ef59c319379938cd584a8b25fc450cda44ead1a173be3e2157da0
3
- size 162
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeb190a220d5bc1b14e8afca3fb79027a243a8d60b4f8b79952bb68827c8c0c0
3
+ size 271