johnpaultaken commited on
Commit
a6340a4
·
verified ·
1 Parent(s): 859bf48

Model split into two vision_model and text_decoder.

Browse files
Files changed (4) hide show
  1. epcert_cfg_test_blip.json +26 -0
  2. model_config.json +273 -0
  3. split_0.onnx +3 -0
  4. split_1.onnx +3 -0
epcert_cfg_test_blip.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "../../../schema_gen/src/Config.json",
3
+ "version": 3,
4
+ "models": [
5
+ {
6
+ "modelId": "Salesforce/blip-image-captioning-base",
7
+ "tasks": [ {"taskId": "image-captioning"} ],
8
+ "modelPath": {
9
+ "image_encoder": "C:\\Users\\johnpaul\\mine\\conda\\output\\split_0.onnx",
10
+ "text_decoder": "C:\\Users\\johnpaul\\mine\\conda\\output\\split_1.onnx"
11
+ }
12
+ }
13
+ ],
14
+ "eps":[
15
+ {
16
+ "epId": {
17
+ "name": "CPUExecutionProvider",
18
+ "deviceType": "cpu"
19
+ }
20
+ }
21
+ ],
22
+ "settings":{
23
+ "quickRun": true,
24
+ "skipCompilation": true
25
+ }
26
+ }
model_config.json ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "compositemodel",
3
+ "config": {
4
+ "model_path": "C:\\Users\\johnpaul\\mine\\conda\\cache\\default_workflow\\runs\\281e7214\\models",
5
+ "model_component_names": [
6
+ "split_0",
7
+ "split_1"
8
+ ],
9
+ "model_attributes": {
10
+ "return_dict": true,
11
+ "output_hidden_states": false,
12
+ "output_attentions": false,
13
+ "torchscript": false,
14
+ "torch_dtype": "float32",
15
+ "use_bfloat16": false,
16
+ "tf_legacy_loss": false,
17
+ "pruned_heads": {},
18
+ "tie_word_embeddings": true,
19
+ "chunk_size_feed_forward": 0,
20
+ "is_encoder_decoder": false,
21
+ "is_decoder": false,
22
+ "cross_attention_hidden_size": null,
23
+ "add_cross_attention": false,
24
+ "tie_encoder_decoder": false,
25
+ "max_length": 20,
26
+ "min_length": 0,
27
+ "do_sample": false,
28
+ "early_stopping": false,
29
+ "num_beams": 1,
30
+ "num_beam_groups": 1,
31
+ "diversity_penalty": 0.0,
32
+ "temperature": 1.0,
33
+ "top_k": 50,
34
+ "top_p": 1.0,
35
+ "typical_p": 1.0,
36
+ "repetition_penalty": 1.0,
37
+ "length_penalty": 1.0,
38
+ "no_repeat_ngram_size": 0,
39
+ "encoder_no_repeat_ngram_size": 0,
40
+ "bad_words_ids": null,
41
+ "num_return_sequences": 1,
42
+ "output_scores": false,
43
+ "return_dict_in_generate": false,
44
+ "forced_bos_token_id": null,
45
+ "forced_eos_token_id": null,
46
+ "remove_invalid_values": false,
47
+ "exponential_decay_length_penalty": null,
48
+ "suppress_tokens": null,
49
+ "begin_suppress_tokens": null,
50
+ "architectures": [
51
+ "BlipForConditionalGeneration"
52
+ ],
53
+ "finetuning_task": null,
54
+ "id2label": {
55
+ "0": "LABEL_0",
56
+ "1": "LABEL_1"
57
+ },
58
+ "label2id": {
59
+ "LABEL_0": 0,
60
+ "LABEL_1": 1
61
+ },
62
+ "tokenizer_class": null,
63
+ "prefix": null,
64
+ "bos_token_id": null,
65
+ "pad_token_id": null,
66
+ "eos_token_id": null,
67
+ "sep_token_id": null,
68
+ "decoder_start_token_id": null,
69
+ "task_specific_params": null,
70
+ "problem_type": null,
71
+ "_name_or_path": "Salesforce/blip-image-captioning-base",
72
+ "transformers_version": "4.52.4",
73
+ "initializer_factor": 1.0,
74
+ "model_type": "blip",
75
+ "text_config": {
76
+ "return_dict": true,
77
+ "output_hidden_states": false,
78
+ "output_attentions": false,
79
+ "torchscript": false,
80
+ "torch_dtype": null,
81
+ "use_bfloat16": false,
82
+ "tf_legacy_loss": false,
83
+ "pruned_heads": {},
84
+ "tie_word_embeddings": true,
85
+ "chunk_size_feed_forward": 0,
86
+ "is_encoder_decoder": false,
87
+ "is_decoder": true,
88
+ "cross_attention_hidden_size": null,
89
+ "add_cross_attention": false,
90
+ "tie_encoder_decoder": false,
91
+ "max_length": 20,
92
+ "min_length": 0,
93
+ "do_sample": false,
94
+ "early_stopping": false,
95
+ "num_beams": 1,
96
+ "num_beam_groups": 1,
97
+ "diversity_penalty": 0.0,
98
+ "temperature": 1.0,
99
+ "top_k": 50,
100
+ "top_p": 1.0,
101
+ "typical_p": 1.0,
102
+ "repetition_penalty": 1.0,
103
+ "length_penalty": 1.0,
104
+ "no_repeat_ngram_size": 0,
105
+ "encoder_no_repeat_ngram_size": 0,
106
+ "bad_words_ids": null,
107
+ "num_return_sequences": 1,
108
+ "output_scores": false,
109
+ "return_dict_in_generate": false,
110
+ "forced_bos_token_id": null,
111
+ "forced_eos_token_id": null,
112
+ "remove_invalid_values": false,
113
+ "exponential_decay_length_penalty": null,
114
+ "suppress_tokens": null,
115
+ "begin_suppress_tokens": null,
116
+ "architectures": null,
117
+ "finetuning_task": null,
118
+ "id2label": {
119
+ "0": "LABEL_0",
120
+ "1": "LABEL_1"
121
+ },
122
+ "label2id": {
123
+ "LABEL_0": 0,
124
+ "LABEL_1": 1
125
+ },
126
+ "tokenizer_class": null,
127
+ "prefix": null,
128
+ "bos_token_id": 30522,
129
+ "pad_token_id": 0,
130
+ "eos_token_id": 2,
131
+ "sep_token_id": 102,
132
+ "decoder_start_token_id": null,
133
+ "task_specific_params": null,
134
+ "problem_type": null,
135
+ "_name_or_path": "C:\\Users\\johnpaul\\mine\\conda",
136
+ "initializer_factor": 1.0,
137
+ "model_type": "blip_text_model",
138
+ "vocab_size": 30524,
139
+ "hidden_size": 768,
140
+ "encoder_hidden_size": 768,
141
+ "intermediate_size": 3072,
142
+ "projection_dim": 768,
143
+ "hidden_dropout_prob": 0.0,
144
+ "num_hidden_layers": 12,
145
+ "num_attention_heads": 12,
146
+ "max_position_embeddings": 512,
147
+ "layer_norm_eps": 1e-12,
148
+ "hidden_act": "gelu",
149
+ "initializer_range": 0.02,
150
+ "attention_probs_dropout_prob": 0.0,
151
+ "use_cache": true,
152
+ "label_smoothing": 0.0
153
+ },
154
+ "vision_config": {
155
+ "return_dict": true,
156
+ "output_hidden_states": false,
157
+ "output_attentions": false,
158
+ "torchscript": false,
159
+ "torch_dtype": null,
160
+ "use_bfloat16": false,
161
+ "tf_legacy_loss": false,
162
+ "pruned_heads": {},
163
+ "tie_word_embeddings": true,
164
+ "chunk_size_feed_forward": 0,
165
+ "is_encoder_decoder": false,
166
+ "is_decoder": false,
167
+ "cross_attention_hidden_size": null,
168
+ "add_cross_attention": false,
169
+ "tie_encoder_decoder": false,
170
+ "max_length": 20,
171
+ "min_length": 0,
172
+ "do_sample": false,
173
+ "early_stopping": false,
174
+ "num_beams": 1,
175
+ "num_beam_groups": 1,
176
+ "diversity_penalty": 0.0,
177
+ "temperature": 1.0,
178
+ "top_k": 50,
179
+ "top_p": 1.0,
180
+ "typical_p": 1.0,
181
+ "repetition_penalty": 1.0,
182
+ "length_penalty": 1.0,
183
+ "no_repeat_ngram_size": 0,
184
+ "encoder_no_repeat_ngram_size": 0,
185
+ "bad_words_ids": null,
186
+ "num_return_sequences": 1,
187
+ "output_scores": false,
188
+ "return_dict_in_generate": false,
189
+ "forced_bos_token_id": null,
190
+ "forced_eos_token_id": null,
191
+ "remove_invalid_values": false,
192
+ "exponential_decay_length_penalty": null,
193
+ "suppress_tokens": null,
194
+ "begin_suppress_tokens": null,
195
+ "architectures": null,
196
+ "finetuning_task": null,
197
+ "id2label": {
198
+ "0": "LABEL_0",
199
+ "1": "LABEL_1"
200
+ },
201
+ "label2id": {
202
+ "LABEL_0": 0,
203
+ "LABEL_1": 1
204
+ },
205
+ "tokenizer_class": null,
206
+ "prefix": null,
207
+ "bos_token_id": null,
208
+ "pad_token_id": null,
209
+ "eos_token_id": null,
210
+ "sep_token_id": null,
211
+ "decoder_start_token_id": null,
212
+ "task_specific_params": null,
213
+ "problem_type": null,
214
+ "_name_or_path": "C:\\Users\\johnpaul\\mine\\conda",
215
+ "dropout": 0.0,
216
+ "initializer_factor": 1.0,
217
+ "model_type": "blip_vision_model",
218
+ "num_channels": 3,
219
+ "hidden_size": 768,
220
+ "intermediate_size": 3072,
221
+ "projection_dim": 512,
222
+ "num_hidden_layers": 12,
223
+ "num_attention_heads": 12,
224
+ "patch_size": 16,
225
+ "image_size": 384,
226
+ "initializer_range": 0.02,
227
+ "attention_dropout": 0.0,
228
+ "layer_norm_eps": 1e-05,
229
+ "hidden_act": "gelu"
230
+ },
231
+ "projection_dim": 512,
232
+ "logit_scale_init_value": 2.6592,
233
+ "initializer_range": 0.02,
234
+ "image_text_hidden_size": 256,
235
+ "label_smoothing": 0.0,
236
+ "split_assignments": {
237
+ "vision_model.embeddings": 0,
238
+ "vision_model.encoder": 0,
239
+ "vision_model.post_layernorm": 0,
240
+ "text_decoder.bert": 1,
241
+ "text_decoder.cls": 1
242
+ },
243
+ "hf_task": "image-to-text",
244
+ "type": "hfmodel"
245
+ },
246
+ "model_components": [
247
+ {
248
+ "type": "onnxmodel",
249
+ "config": {
250
+ "model_path": "C:\\Users\\johnpaul\\mine\\conda\\output",
251
+ "onnx_file_name": "split_0.onnx",
252
+ "inference_settings": null,
253
+ "use_ort_extensions": false,
254
+ "external_initializers_file_name": null,
255
+ "constant_inputs_file_name": null,
256
+ "model_attributes": null
257
+ }
258
+ },
259
+ {
260
+ "type": "onnxmodel",
261
+ "config": {
262
+ "model_path": "C:\\Users\\johnpaul\\mine\\conda\\output",
263
+ "onnx_file_name": "split_1.onnx",
264
+ "inference_settings": null,
265
+ "use_ort_extensions": false,
266
+ "external_initializers_file_name": null,
267
+ "constant_inputs_file_name": null,
268
+ "model_attributes": null
269
+ }
270
+ }
271
+ ]
272
+ }
273
+ }
split_0.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1641f50623c959c20b6ee0dbc9628bad83fe9108fe190c5fc4e0a24a73785938
3
+ size 345122738
split_1.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6440987e079271614aa19034cf0fa25ec0e31d35efe64674130b8e8cfa860466
3
+ size 647427238