binhcode25 commited on
Commit
8cbcab3
1 Parent(s): 9105bd0

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: light-embed
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # sbert-paraphrase-multilingual-mpnet-base-v2-onnx
12
+
13
+ This is the ONNX version of the Sentence Transformers model sentence-transformers/paraphrase-multilingual-mpnet-base-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-mpnet-base-v2
15
+ - Embedding dimension: 768
16
+ - Max sequence length: 128
17
+ - File size on disk: 1.03 GB
18
+
19
+ This ONNX model consists all components in the original sentence transformer model:
20
+ Transformer, Pooling
21
+
22
+ <!--- Describe your model here -->
23
+
24
+ ## Usage (LightEmbed)
25
+
26
+ Using this model becomes easy when you have [LightEmbed](https://www.light-embed.net) installed:
27
+
28
+ ```
29
+ pip install -U light-embed
30
+ ```
31
+
32
+ Then you can use the model like this:
33
+
34
+ ```python
35
+ from light_embed import TextEmbedding
36
+ sentences = ["This is an example sentence", "Each sentence is converted"]
37
+
38
+ model = TextEmbedding('sentence-transformers/paraphrase-multilingual-mpnet-base-v2')
39
+ embeddings = model.encode(sentences)
40
+ print(embeddings)
41
+ ```
42
+
43
+ ## Citing & Authors
44
+
45
+ Binh Nguyen / binhcode25@gmail.com
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "old_models/paraphrase-multilingual-mpnet-base-v2/0_Transformer",
3
  "architectures": [
4
  "XLMRobertaModel"
5
  ],
@@ -24,4 +24,4 @@
24
  "type_vocab_size": 1,
25
  "use_cache": true,
26
  "vocab_size": 250002
27
- }
 
1
  {
2
+ "_name_or_path": "sentence-transformers/paraphrase-multilingual-mpnet-base-v2",
3
  "architectures": [
4
  "XLMRobertaModel"
5
  ],
 
24
  "type_vocab_size": 1,
25
  "use_cache": true,
26
  "vocab_size": 250002
27
+ }
model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5d861af7f0cd24a08328481404d330f2cb112258d14a358affba649572d9c509
3
- size 1112421935
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:acb89c010c252fa5b50750ccd41d454dec43cb9f8c2c9c6b743930509d89d41b
3
+ size 1110169923
model_description.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "base_model": "sentence-transformers/paraphrase-multilingual-mpnet-base-v2",
3
+ "embedding_dim": 768,
4
+ "max_seq_length": 128,
5
+ "model_file_size (GB)": 1.03
6
+ }
modules.json CHANGED
@@ -2,13 +2,11 @@
2
  {
3
  "idx": 0,
4
  "name": "0",
5
- "path": "",
6
  "type": "sentence_transformers.models.Transformer"
7
  },
8
  {
9
  "idx": 1,
10
  "name": "1",
11
- "path": "1_Pooling",
12
  "type": "sentence_transformers.models.Pooling"
13
  }
14
  ]
 
2
  {
3
  "idx": 0,
4
  "name": "0",
 
5
  "type": "sentence_transformers.models.Transformer"
6
  },
7
  {
8
  "idx": 1,
9
  "name": "1",
 
10
  "type": "sentence_transformers.models.Pooling"
11
  }
12
  ]
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json CHANGED
@@ -1 +1,51 @@
1
- {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -1 +1,61 @@
1
- {"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "old_models/paraphrase-multilingual-mpnet-base-v2/0_Transformer"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "max_length": 128,
50
+ "model_max_length": 512,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "<pad>",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "</s>",
56
+ "stride": 0,
57
+ "tokenizer_class": "XLMRobertaTokenizer",
58
+ "truncation_side": "right",
59
+ "truncation_strategy": "longest_first",
60
+ "unk_token": "<unk>"
61
+ }