Update config.json
Browse files- config.json +11 -162
config.json
CHANGED
@@ -1,111 +1,4 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "microsoft/Florence-2-base",
|
3 |
-
"architectures": [
|
4 |
-
"Florence2ForConditionalGeneration"
|
5 |
-
],
|
6 |
-
"auto_map": {
|
7 |
-
"AutoConfig": "microsoft/Florence-2-base--configuration_florence2.Florence2Config",
|
8 |
-
"AutoModelForCausalLM": "microsoft/Florence-2-base--modeling_florence2.Florence2ForConditionalGeneration"
|
9 |
-
},
|
10 |
-
"bos_token_id": 0,
|
11 |
-
"eos_token_id": 2,
|
12 |
-
"ignore_index": -100,
|
13 |
-
"is_encoder_decoder": true,
|
14 |
-
"model_type": "florence2",
|
15 |
-
"pad_token_id": 1,
|
16 |
-
"projection_dim": 768,
|
17 |
-
"text_config": {
|
18 |
-
"_name_or_path": "",
|
19 |
-
"activation_dropout": 0.1,
|
20 |
-
"activation_function": "gelu",
|
21 |
-
"add_bias_logits": false,
|
22 |
-
"add_cross_attention": false,
|
23 |
-
"add_final_layer_norm": false,
|
24 |
-
"architectures": null,
|
25 |
-
"attention_dropout": 0.1,
|
26 |
-
"bad_words_ids": null,
|
27 |
-
"begin_suppress_tokens": null,
|
28 |
-
"bos_token_id": 0,
|
29 |
-
"chunk_size_feed_forward": 0,
|
30 |
-
"classif_dropout": 0.1,
|
31 |
-
"classifier_dropout": 0.0,
|
32 |
-
"cross_attention_hidden_size": null,
|
33 |
-
"d_model": 768,
|
34 |
-
"decoder_attention_heads": 12,
|
35 |
-
"decoder_ffn_dim": 3072,
|
36 |
-
"decoder_layerdrop": 0.0,
|
37 |
-
"decoder_layers": 6,
|
38 |
-
"decoder_start_token_id": 2,
|
39 |
-
"diversity_penalty": 0.0,
|
40 |
-
"do_sample": false,
|
41 |
-
"dropout": 0.1,
|
42 |
-
"early_stopping": true,
|
43 |
-
"encoder_attention_heads": 12,
|
44 |
-
"encoder_ffn_dim": 3072,
|
45 |
-
"encoder_layerdrop": 0.0,
|
46 |
-
"encoder_layers": 6,
|
47 |
-
"encoder_no_repeat_ngram_size": 0,
|
48 |
-
"eos_token_id": 2,
|
49 |
-
"exponential_decay_length_penalty": null,
|
50 |
-
"finetuning_task": null,
|
51 |
-
"forced_bos_token_id": 0,
|
52 |
-
"forced_eos_token_id": 2,
|
53 |
-
"gradient_checkpointing": false,
|
54 |
-
"id2label": {
|
55 |
-
"0": "LABEL_0",
|
56 |
-
"1": "LABEL_1",
|
57 |
-
"2": "LABEL_2"
|
58 |
-
},
|
59 |
-
"init_std": 0.02,
|
60 |
-
"is_decoder": false,
|
61 |
-
"is_encoder_decoder": true,
|
62 |
-
"label2id": {
|
63 |
-
"LABEL_0": 0,
|
64 |
-
"LABEL_1": 1,
|
65 |
-
"LABEL_2": 2
|
66 |
-
},
|
67 |
-
"length_penalty": 1.0,
|
68 |
-
"max_length": 20,
|
69 |
-
"max_position_embeddings": 1024,
|
70 |
-
"min_length": 0,
|
71 |
-
"model_type": "florence2_language",
|
72 |
-
"no_repeat_ngram_size": 3,
|
73 |
-
"normalize_before": false,
|
74 |
-
"num_beam_groups": 1,
|
75 |
-
"num_beams": 3,
|
76 |
-
"num_hidden_layers": 6,
|
77 |
-
"num_return_sequences": 1,
|
78 |
-
"output_attentions": false,
|
79 |
-
"output_hidden_states": false,
|
80 |
-
"output_scores": false,
|
81 |
-
"pad_token_id": 1,
|
82 |
-
"prefix": null,
|
83 |
-
"problem_type": null,
|
84 |
-
"pruned_heads": {},
|
85 |
-
"remove_invalid_values": false,
|
86 |
-
"repetition_penalty": 1.0,
|
87 |
-
"return_dict": true,
|
88 |
-
"return_dict_in_generate": false,
|
89 |
-
"scale_embedding": false,
|
90 |
-
"sep_token_id": null,
|
91 |
-
"suppress_tokens": null,
|
92 |
-
"task_specific_params": null,
|
93 |
-
"temperature": 1.0,
|
94 |
-
"tf_legacy_loss": false,
|
95 |
-
"tie_encoder_decoder": false,
|
96 |
-
"tie_word_embeddings": true,
|
97 |
-
"tokenizer_class": null,
|
98 |
-
"top_k": 50,
|
99 |
-
"top_p": 1.0,
|
100 |
-
"torch_dtype": null,
|
101 |
-
"torchscript": false,
|
102 |
-
"typical_p": 1.0,
|
103 |
-
"use_bfloat16": false,
|
104 |
-
"use_cache": true,
|
105 |
-
"vocab_size": 51289
|
106 |
-
},
|
107 |
-
"torch_dtype": "float32",
|
108 |
-
"transformers_version": "4.45.2",
|
109 |
"vision_config": {
|
110 |
"_name_or_path": "",
|
111 |
"add_cross_attention": false,
|
@@ -116,18 +9,8 @@
|
|
116 |
"chunk_size_feed_forward": 0,
|
117 |
"cross_attention_hidden_size": null,
|
118 |
"decoder_start_token_id": null,
|
119 |
-
"depths": [
|
120 |
-
|
121 |
-
1,
|
122 |
-
9,
|
123 |
-
1
|
124 |
-
],
|
125 |
-
"dim_embed": [
|
126 |
-
128,
|
127 |
-
256,
|
128 |
-
512,
|
129 |
-
1024
|
130 |
-
],
|
131 |
"diversity_penalty": 0.0,
|
132 |
"do_sample": false,
|
133 |
"drop_path_rate": 0.1,
|
@@ -143,10 +26,7 @@
|
|
143 |
"0": "LABEL_0",
|
144 |
"1": "LABEL_1"
|
145 |
},
|
146 |
-
"image_feature_source": [
|
147 |
-
"spatial_avg_pool",
|
148 |
-
"temporal_avg_pool"
|
149 |
-
],
|
150 |
"image_pos_embed": {
|
151 |
"max_pos_embeddings": 50,
|
152 |
"type": "learned_abs_2d"
|
@@ -160,51 +40,21 @@
|
|
160 |
"length_penalty": 1.0,
|
161 |
"max_length": 20,
|
162 |
"min_length": 0,
|
163 |
-
"model_type": "",
|
164 |
"no_repeat_ngram_size": 0,
|
165 |
"num_beam_groups": 1,
|
166 |
"num_beams": 1,
|
167 |
-
"num_groups": [
|
168 |
-
|
169 |
-
8,
|
170 |
-
16,
|
171 |
-
32
|
172 |
-
],
|
173 |
-
"num_heads": [
|
174 |
-
4,
|
175 |
-
8,
|
176 |
-
16,
|
177 |
-
32
|
178 |
-
],
|
179 |
"num_return_sequences": 1,
|
180 |
"output_attentions": false,
|
181 |
"output_hidden_states": false,
|
182 |
"output_scores": false,
|
183 |
"pad_token_id": null,
|
184 |
-
"patch_padding": [
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
1
|
189 |
-
],
|
190 |
-
"patch_prenorm": [
|
191 |
-
false,
|
192 |
-
true,
|
193 |
-
true,
|
194 |
-
true
|
195 |
-
],
|
196 |
-
"patch_size": [
|
197 |
-
7,
|
198 |
-
3,
|
199 |
-
3,
|
200 |
-
3
|
201 |
-
],
|
202 |
-
"patch_stride": [
|
203 |
-
4,
|
204 |
-
2,
|
205 |
-
2,
|
206 |
-
2
|
207 |
-
],
|
208 |
"prefix": null,
|
209 |
"problem_type": null,
|
210 |
"projection_dim": 768,
|
@@ -232,6 +82,5 @@
|
|
232 |
"type": "COSINE"
|
233 |
},
|
234 |
"window_size": 12
|
235 |
-
}
|
236 |
-
"vocab_size": 51289
|
237 |
}
|
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"vision_config": {
|
3 |
"_name_or_path": "",
|
4 |
"add_cross_attention": false,
|
|
|
9 |
"chunk_size_feed_forward": 0,
|
10 |
"cross_attention_hidden_size": null,
|
11 |
"decoder_start_token_id": null,
|
12 |
+
"depths": [1, 1, 9, 1],
|
13 |
+
"dim_embed": [128, 256, 512, 1024],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
"diversity_penalty": 0.0,
|
15 |
"do_sample": false,
|
16 |
"drop_path_rate": 0.1,
|
|
|
26 |
"0": "LABEL_0",
|
27 |
"1": "LABEL_1"
|
28 |
},
|
29 |
+
"image_feature_source": ["spatial_avg_pool", "temporal_avg_pool"],
|
|
|
|
|
|
|
30 |
"image_pos_embed": {
|
31 |
"max_pos_embeddings": 50,
|
32 |
"type": "learned_abs_2d"
|
|
|
40 |
"length_penalty": 1.0,
|
41 |
"max_length": 20,
|
42 |
"min_length": 0,
|
43 |
+
"model_type": "davit", // <--- Add this line
|
44 |
"no_repeat_ngram_size": 0,
|
45 |
"num_beam_groups": 1,
|
46 |
"num_beams": 1,
|
47 |
+
"num_groups": [4, 8, 16, 32],
|
48 |
+
"num_heads": [4, 8, 16, 32],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
"num_return_sequences": 1,
|
50 |
"output_attentions": false,
|
51 |
"output_hidden_states": false,
|
52 |
"output_scores": false,
|
53 |
"pad_token_id": null,
|
54 |
+
"patch_padding": [3, 1, 1, 1],
|
55 |
+
"patch_prenorm": [false, true, true, true],
|
56 |
+
"patch_size": [7, 3, 3, 3],
|
57 |
+
"patch_stride": [4, 2, 2, 2],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
"prefix": null,
|
59 |
"problem_type": null,
|
60 |
"projection_dim": 768,
|
|
|
82 |
"type": "COSINE"
|
83 |
},
|
84 |
"window_size": 12
|
85 |
+
}
|
|
|
86 |
}
|