Upload folder using huggingface_hub
Browse files- config.json +4 -220
- onnx/prompt_encoder_mask_decoder.onnx +3 -0
- onnx/prompt_encoder_mask_decoder_quantized.onnx +3 -0
- onnx/vision_encoder.onnx +3 -0
- onnx/vision_encoder_quantized.onnx +3 -0
- quantize_config.json +82 -0
config.json
CHANGED
@@ -1,248 +1,32 @@
|
|
1 |
{
|
2 |
-
"_commit_hash": "0687a007b22e7a25cbfa49e3e8e51f326658963f",
|
3 |
"_name_or_path": "facebook/sam-vit-large",
|
4 |
"architectures": [
|
5 |
"SamModel"
|
6 |
],
|
7 |
"initializer_range": 0.02,
|
8 |
"mask_decoder_config": {
|
9 |
-
"
|
10 |
-
"add_cross_attention": false,
|
11 |
-
"architectures": null,
|
12 |
-
"attention_downsample_rate": 2,
|
13 |
-
"bad_words_ids": null,
|
14 |
-
"begin_suppress_tokens": null,
|
15 |
-
"bos_token_id": null,
|
16 |
-
"chunk_size_feed_forward": 0,
|
17 |
-
"cross_attention_hidden_size": null,
|
18 |
-
"decoder_start_token_id": null,
|
19 |
-
"diversity_penalty": 0.0,
|
20 |
-
"do_sample": false,
|
21 |
-
"early_stopping": false,
|
22 |
-
"encoder_no_repeat_ngram_size": 0,
|
23 |
-
"eos_token_id": null,
|
24 |
-
"exponential_decay_length_penalty": null,
|
25 |
-
"finetuning_task": null,
|
26 |
-
"forced_bos_token_id": null,
|
27 |
-
"forced_eos_token_id": null,
|
28 |
-
"hidden_act": "relu",
|
29 |
-
"hidden_size": 256,
|
30 |
-
"id2label": {
|
31 |
-
"0": "LABEL_0",
|
32 |
-
"1": "LABEL_1"
|
33 |
-
},
|
34 |
-
"iou_head_depth": 3,
|
35 |
-
"iou_head_hidden_dim": 256,
|
36 |
-
"is_decoder": false,
|
37 |
-
"is_encoder_decoder": false,
|
38 |
-
"label2id": {
|
39 |
-
"LABEL_0": 0,
|
40 |
-
"LABEL_1": 1
|
41 |
-
},
|
42 |
-
"layer_norm_eps": 1e-06,
|
43 |
-
"length_penalty": 1.0,
|
44 |
-
"max_length": 20,
|
45 |
-
"min_length": 0,
|
46 |
-
"mlp_dim": 2048,
|
47 |
-
"model_type": "",
|
48 |
-
"no_repeat_ngram_size": 0,
|
49 |
-
"num_attention_heads": 8,
|
50 |
-
"num_beam_groups": 1,
|
51 |
-
"num_beams": 1,
|
52 |
-
"num_hidden_layers": 2,
|
53 |
-
"num_multimask_outputs": 3,
|
54 |
-
"num_return_sequences": 1,
|
55 |
-
"output_attentions": false,
|
56 |
-
"output_hidden_states": false,
|
57 |
-
"output_scores": false,
|
58 |
-
"pad_token_id": null,
|
59 |
-
"prefix": null,
|
60 |
-
"problem_type": null,
|
61 |
-
"pruned_heads": {},
|
62 |
-
"remove_invalid_values": false,
|
63 |
-
"repetition_penalty": 1.0,
|
64 |
-
"return_dict": true,
|
65 |
-
"return_dict_in_generate": false,
|
66 |
-
"sep_token_id": null,
|
67 |
-
"suppress_tokens": null,
|
68 |
-
"task_specific_params": null,
|
69 |
-
"temperature": 1.0,
|
70 |
-
"tf_legacy_loss": false,
|
71 |
-
"tie_encoder_decoder": false,
|
72 |
-
"tie_word_embeddings": true,
|
73 |
-
"tokenizer_class": null,
|
74 |
-
"top_k": 50,
|
75 |
-
"top_p": 1.0,
|
76 |
-
"torch_dtype": null,
|
77 |
-
"torchscript": false,
|
78 |
-
"transformers_version": "4.29.2",
|
79 |
-
"typical_p": 1.0,
|
80 |
-
"use_bfloat16": false
|
81 |
},
|
82 |
"model_type": "sam",
|
83 |
"prompt_encoder_config": {
|
84 |
-
"
|
85 |
-
"add_cross_attention": false,
|
86 |
-
"architectures": null,
|
87 |
-
"bad_words_ids": null,
|
88 |
-
"begin_suppress_tokens": null,
|
89 |
-
"bos_token_id": null,
|
90 |
-
"chunk_size_feed_forward": 0,
|
91 |
-
"cross_attention_hidden_size": null,
|
92 |
-
"decoder_start_token_id": null,
|
93 |
-
"diversity_penalty": 0.0,
|
94 |
-
"do_sample": false,
|
95 |
-
"early_stopping": false,
|
96 |
-
"encoder_no_repeat_ngram_size": 0,
|
97 |
-
"eos_token_id": null,
|
98 |
-
"exponential_decay_length_penalty": null,
|
99 |
-
"finetuning_task": null,
|
100 |
-
"forced_bos_token_id": null,
|
101 |
-
"forced_eos_token_id": null,
|
102 |
-
"hidden_act": "gelu",
|
103 |
-
"hidden_size": 256,
|
104 |
-
"id2label": {
|
105 |
-
"0": "LABEL_0",
|
106 |
-
"1": "LABEL_1"
|
107 |
-
},
|
108 |
-
"image_embedding_size": 64,
|
109 |
-
"image_size": 1024,
|
110 |
-
"is_decoder": false,
|
111 |
-
"is_encoder_decoder": false,
|
112 |
-
"label2id": {
|
113 |
-
"LABEL_0": 0,
|
114 |
-
"LABEL_1": 1
|
115 |
-
},
|
116 |
-
"layer_norm_eps": 1e-06,
|
117 |
-
"length_penalty": 1.0,
|
118 |
-
"mask_input_channels": 16,
|
119 |
-
"max_length": 20,
|
120 |
-
"min_length": 0,
|
121 |
-
"model_type": "",
|
122 |
-
"no_repeat_ngram_size": 0,
|
123 |
-
"num_beam_groups": 1,
|
124 |
-
"num_beams": 1,
|
125 |
-
"num_point_embeddings": 4,
|
126 |
-
"num_return_sequences": 1,
|
127 |
-
"output_attentions": false,
|
128 |
-
"output_hidden_states": false,
|
129 |
-
"output_scores": false,
|
130 |
-
"pad_token_id": null,
|
131 |
-
"patch_size": 16,
|
132 |
-
"prefix": null,
|
133 |
-
"problem_type": null,
|
134 |
-
"pruned_heads": {},
|
135 |
-
"remove_invalid_values": false,
|
136 |
-
"repetition_penalty": 1.0,
|
137 |
-
"return_dict": true,
|
138 |
-
"return_dict_in_generate": false,
|
139 |
-
"sep_token_id": null,
|
140 |
-
"suppress_tokens": null,
|
141 |
-
"task_specific_params": null,
|
142 |
-
"temperature": 1.0,
|
143 |
-
"tf_legacy_loss": false,
|
144 |
-
"tie_encoder_decoder": false,
|
145 |
-
"tie_word_embeddings": true,
|
146 |
-
"tokenizer_class": null,
|
147 |
-
"top_k": 50,
|
148 |
-
"top_p": 1.0,
|
149 |
-
"torch_dtype": null,
|
150 |
-
"torchscript": false,
|
151 |
-
"transformers_version": "4.29.2",
|
152 |
-
"typical_p": 1.0,
|
153 |
-
"use_bfloat16": false
|
154 |
},
|
155 |
-
"transformers_version":
|
156 |
"vision_config": {
|
157 |
-
"_name_or_path": "",
|
158 |
-
"add_cross_attention": false,
|
159 |
-
"architectures": null,
|
160 |
-
"attention_dropout": 0.0,
|
161 |
-
"bad_words_ids": null,
|
162 |
-
"begin_suppress_tokens": null,
|
163 |
-
"bos_token_id": null,
|
164 |
-
"chunk_size_feed_forward": 0,
|
165 |
-
"cross_attention_hidden_size": null,
|
166 |
-
"decoder_start_token_id": null,
|
167 |
-
"diversity_penalty": 0.0,
|
168 |
-
"do_sample": false,
|
169 |
"dropout": 0.0,
|
170 |
-
"early_stopping": false,
|
171 |
-
"encoder_no_repeat_ngram_size": 0,
|
172 |
-
"eos_token_id": null,
|
173 |
-
"exponential_decay_length_penalty": null,
|
174 |
-
"finetuning_task": null,
|
175 |
-
"forced_bos_token_id": null,
|
176 |
-
"forced_eos_token_id": null,
|
177 |
"global_attn_indexes": [
|
178 |
5,
|
179 |
11,
|
180 |
17,
|
181 |
23
|
182 |
],
|
183 |
-
"hidden_act": "gelu",
|
184 |
"hidden_size": 1024,
|
185 |
-
"id2label": {
|
186 |
-
"0": "LABEL_0",
|
187 |
-
"1": "LABEL_1"
|
188 |
-
},
|
189 |
-
"image_size": 1024,
|
190 |
"initializer_factor": 1.0,
|
191 |
-
"initializer_range": 1e-10,
|
192 |
"intermediate_size": 6144,
|
193 |
-
"is_decoder": false,
|
194 |
-
"is_encoder_decoder": false,
|
195 |
-
"label2id": {
|
196 |
-
"LABEL_0": 0,
|
197 |
-
"LABEL_1": 1
|
198 |
-
},
|
199 |
-
"layer_norm_eps": 1e-06,
|
200 |
-
"length_penalty": 1.0,
|
201 |
-
"max_length": 20,
|
202 |
-
"min_length": 0,
|
203 |
"mlp_dim": 4096,
|
204 |
-
"mlp_ratio": 4.0,
|
205 |
"model_type": "",
|
206 |
-
"no_repeat_ngram_size": 0,
|
207 |
"num_attention_heads": 16,
|
208 |
-
"num_beam_groups": 1,
|
209 |
-
"num_beams": 1,
|
210 |
-
"num_channels": 3,
|
211 |
"num_hidden_layers": 24,
|
212 |
-
"
|
213 |
-
"num_return_sequences": 1,
|
214 |
-
"output_attentions": false,
|
215 |
-
"output_channels": 256,
|
216 |
-
"output_hidden_states": false,
|
217 |
-
"output_scores": false,
|
218 |
-
"pad_token_id": null,
|
219 |
-
"patch_size": 16,
|
220 |
-
"prefix": null,
|
221 |
-
"problem_type": null,
|
222 |
-
"projection_dim": 512,
|
223 |
-
"pruned_heads": {},
|
224 |
-
"qkv_bias": true,
|
225 |
-
"remove_invalid_values": false,
|
226 |
-
"repetition_penalty": 1.0,
|
227 |
-
"return_dict": true,
|
228 |
-
"return_dict_in_generate": false,
|
229 |
-
"sep_token_id": null,
|
230 |
-
"suppress_tokens": null,
|
231 |
-
"task_specific_params": null,
|
232 |
-
"temperature": 1.0,
|
233 |
-
"tf_legacy_loss": false,
|
234 |
-
"tie_encoder_decoder": false,
|
235 |
-
"tie_word_embeddings": true,
|
236 |
-
"tokenizer_class": null,
|
237 |
-
"top_k": 50,
|
238 |
-
"top_p": 1.0,
|
239 |
-
"torch_dtype": null,
|
240 |
-
"torchscript": false,
|
241 |
-
"transformers_version": "4.29.2",
|
242 |
-
"typical_p": 1.0,
|
243 |
-
"use_abs_pos": true,
|
244 |
-
"use_bfloat16": false,
|
245 |
-
"use_rel_pos": true,
|
246 |
-
"window_size": 14
|
247 |
}
|
248 |
}
|
|
|
1 |
{
|
|
|
2 |
"_name_or_path": "facebook/sam-vit-large",
|
3 |
"architectures": [
|
4 |
"SamModel"
|
5 |
],
|
6 |
"initializer_range": 0.02,
|
7 |
"mask_decoder_config": {
|
8 |
+
"model_type": ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
},
|
10 |
"model_type": "sam",
|
11 |
"prompt_encoder_config": {
|
12 |
+
"model_type": ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
},
|
14 |
+
"transformers_version": "4.33.0.dev0",
|
15 |
"vision_config": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
"dropout": 0.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
"global_attn_indexes": [
|
18 |
5,
|
19 |
11,
|
20 |
17,
|
21 |
23
|
22 |
],
|
|
|
23 |
"hidden_size": 1024,
|
|
|
|
|
|
|
|
|
|
|
24 |
"initializer_factor": 1.0,
|
|
|
25 |
"intermediate_size": 6144,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
"mlp_dim": 4096,
|
|
|
27 |
"model_type": "",
|
|
|
28 |
"num_attention_heads": 16,
|
|
|
|
|
|
|
29 |
"num_hidden_layers": 24,
|
30 |
+
"projection_dim": 512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
onnx/prompt_encoder_mask_decoder.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e06571d6082ee6cc2940f375930a057437015473a60d7f962f8b5893cc918148
|
3 |
+
size 16557826
|
onnx/prompt_encoder_mask_decoder_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7122483162d38ed6b5d9cce714abe9fa16abfee925e2f9fb2ee13996da9ee99c
|
3 |
+
size 4903691
|
onnx/vision_encoder.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bec1c3a3a9bf5c5f7ff897df1bd485763dd3f9dd1209b2a39c1241e534509c7c
|
3 |
+
size 1234446305
|
onnx/vision_encoder_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:769c4c514e5087557e2e43b7a2ab260d73240438790a594e818b161823ce474e
|
3 |
+
size 325259495
|
quantize_config.json
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"per_channel": true,
|
3 |
+
"reduce_range": true,
|
4 |
+
"per_model_config": {
|
5 |
+
"prompt_encoder_mask_decoder": {
|
6 |
+
"op_types": [
|
7 |
+
"Sqrt",
|
8 |
+
"MatMul",
|
9 |
+
"Cos",
|
10 |
+
"ConstantOfShape",
|
11 |
+
"Relu",
|
12 |
+
"Equal",
|
13 |
+
"Slice",
|
14 |
+
"Concat",
|
15 |
+
"Softmax",
|
16 |
+
"ScatterND",
|
17 |
+
"Div",
|
18 |
+
"Erf",
|
19 |
+
"OneHot",
|
20 |
+
"Sub",
|
21 |
+
"ReduceMean",
|
22 |
+
"Add",
|
23 |
+
"Pow",
|
24 |
+
"Cast",
|
25 |
+
"Transpose",
|
26 |
+
"Mul",
|
27 |
+
"ConvTranspose",
|
28 |
+
"Reshape",
|
29 |
+
"Tile",
|
30 |
+
"Shape",
|
31 |
+
"Range",
|
32 |
+
"Neg",
|
33 |
+
"Where",
|
34 |
+
"Expand",
|
35 |
+
"Sin",
|
36 |
+
"Constant",
|
37 |
+
"Not",
|
38 |
+
"Gather",
|
39 |
+
"Unsqueeze"
|
40 |
+
],
|
41 |
+
"weight_type": "QInt8"
|
42 |
+
},
|
43 |
+
"vision_encoder": {
|
44 |
+
"op_types": [
|
45 |
+
"Sqrt",
|
46 |
+
"MatMul",
|
47 |
+
"Cos",
|
48 |
+
"Identity",
|
49 |
+
"ConstantOfShape",
|
50 |
+
"Concat",
|
51 |
+
"Mod",
|
52 |
+
"Slice",
|
53 |
+
"Softmax",
|
54 |
+
"Div",
|
55 |
+
"Erf",
|
56 |
+
"Resize",
|
57 |
+
"Sub",
|
58 |
+
"Pad",
|
59 |
+
"ReduceMean",
|
60 |
+
"Add",
|
61 |
+
"Pow",
|
62 |
+
"Squeeze",
|
63 |
+
"Cast",
|
64 |
+
"Einsum",
|
65 |
+
"Transpose",
|
66 |
+
"Mul",
|
67 |
+
"Reshape",
|
68 |
+
"Tile",
|
69 |
+
"Shape",
|
70 |
+
"Range",
|
71 |
+
"Conv",
|
72 |
+
"Split",
|
73 |
+
"Expand",
|
74 |
+
"Sin",
|
75 |
+
"Constant",
|
76 |
+
"Gather",
|
77 |
+
"Unsqueeze"
|
78 |
+
],
|
79 |
+
"weight_type": "QUInt8"
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|