sararob commited on
Commit
ecf328f
·
verified ·
1 Parent(s): 0158c59

Add ONNX export for optimized inference

Browse files
Files changed (4) hide show
  1. config.json +2 -1
  2. model.onnx +3 -0
  3. tokenizer.json +4 -2
  4. tokenizer_config.json +1 -1
config.json CHANGED
@@ -1,10 +1,12 @@
1
  {
 
2
  "_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
3
  "architectures": [
4
  "BertModel"
5
  ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
 
8
  "gradient_checkpointing": false,
9
  "hidden_act": "gelu",
10
  "hidden_dropout_prob": 0.1,
@@ -18,7 +20,6 @@
18
  "num_hidden_layers": 6,
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
- "torch_dtype": "float32",
22
  "transformers_version": "4.48.1",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
 
1
  {
2
+ "_attn_implementation_autoset": true,
3
  "_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
4
  "architectures": [
5
  "BertModel"
6
  ],
7
  "attention_probs_dropout_prob": 0.1,
8
  "classifier_dropout": null,
9
+ "export_model_type": "transformer",
10
  "gradient_checkpointing": false,
11
  "hidden_act": "gelu",
12
  "hidden_dropout_prob": 0.1,
 
20
  "num_hidden_layers": 6,
21
  "pad_token_id": 0,
22
  "position_embedding_type": "absolute",
 
23
  "transformers_version": "4.48.1",
24
  "type_vocab_size": 2,
25
  "use_cache": true,
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcc15f481426f52523e5695cb7df292a455aed1038d318b5b73672e0dcff3b14
3
+ size 90447733
tokenizer.json CHANGED
@@ -2,12 +2,14 @@
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
- "max_length": 256,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
  "padding": {
10
- "strategy": "BatchLongest",
 
 
11
  "direction": "Right",
12
  "pad_to_multiple_of": null,
13
  "pad_id": 0,
 
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
+ "max_length": 128,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
  "padding": {
10
+ "strategy": {
11
+ "Fixed": 128
12
+ },
13
  "direction": "Right",
14
  "pad_to_multiple_of": null,
15
  "pad_id": 0,
tokenizer_config.json CHANGED
@@ -48,7 +48,7 @@
48
  "extra_special_tokens": {},
49
  "mask_token": "[MASK]",
50
  "max_length": 128,
51
- "model_max_length": 256,
52
  "never_split": null,
53
  "pad_to_multiple_of": null,
54
  "pad_token": "[PAD]",
 
48
  "extra_special_tokens": {},
49
  "mask_token": "[MASK]",
50
  "max_length": 128,
51
+ "model_max_length": 512,
52
  "never_split": null,
53
  "pad_to_multiple_of": null,
54
  "pad_token": "[PAD]",