nielsr HF staff commited on
Commit
4c2dfa1
1 Parent(s): b391ebe

Upload Blip2ForConditionalGeneration

Browse files
config.json ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "architectures": [
4
+ "Blip2ForConditionalGeneration"
5
+ ],
6
+ "initializer_factor": 1.0,
7
+ "initializer_range": 0.02,
8
+ "model_type": "blip-2",
9
+ "num_query_tokens": 32,
10
+ "qformer_config": {
11
+ "_name_or_path": "",
12
+ "add_cross_attention": false,
13
+ "architectures": null,
14
+ "attention_probs_dropout_prob": 0.1,
15
+ "bad_words_ids": null,
16
+ "begin_suppress_tokens": null,
17
+ "bos_token_id": null,
18
+ "chunk_size_feed_forward": 0,
19
+ "classifier_dropout": null,
20
+ "cross_attention_frequency": 2,
21
+ "cross_attention_hidden_size": null,
22
+ "decoder_start_token_id": null,
23
+ "diversity_penalty": 0.0,
24
+ "do_sample": false,
25
+ "early_stopping": false,
26
+ "encoder_hidden_size": 1408,
27
+ "encoder_no_repeat_ngram_size": 0,
28
+ "eos_token_id": null,
29
+ "exponential_decay_length_penalty": null,
30
+ "finetuning_task": null,
31
+ "forced_bos_token_id": null,
32
+ "forced_eos_token_id": null,
33
+ "hidden_act": "gelu",
34
+ "hidden_dropout_prob": 0.1,
35
+ "hidden_size": 768,
36
+ "id2label": {
37
+ "0": "LABEL_0",
38
+ "1": "LABEL_1"
39
+ },
40
+ "initializer_range": 0.02,
41
+ "intermediate_size": 3072,
42
+ "is_decoder": false,
43
+ "is_encoder_decoder": false,
44
+ "label2id": {
45
+ "LABEL_0": 0,
46
+ "LABEL_1": 1
47
+ },
48
+ "layer_norm_eps": 1e-12,
49
+ "length_penalty": 1.0,
50
+ "max_length": 20,
51
+ "max_position_embeddings": 512,
52
+ "min_length": 0,
53
+ "model_type": "blip_2_qformer",
54
+ "no_repeat_ngram_size": 0,
55
+ "num_attention_heads": 12,
56
+ "num_beam_groups": 1,
57
+ "num_beams": 1,
58
+ "num_hidden_layers": 12,
59
+ "num_return_sequences": 1,
60
+ "output_attentions": false,
61
+ "output_hidden_states": false,
62
+ "output_scores": false,
63
+ "pad_token_id": 0,
64
+ "position_embedding_type": "absolute",
65
+ "prefix": null,
66
+ "problem_type": null,
67
+ "pruned_heads": {},
68
+ "remove_invalid_values": false,
69
+ "repetition_penalty": 1.0,
70
+ "return_dict": true,
71
+ "return_dict_in_generate": false,
72
+ "sep_token_id": null,
73
+ "suppress_tokens": null,
74
+ "task_specific_params": null,
75
+ "temperature": 1.0,
76
+ "tf_legacy_loss": false,
77
+ "tie_encoder_decoder": false,
78
+ "tie_word_embeddings": true,
79
+ "tokenizer_class": null,
80
+ "top_k": 50,
81
+ "top_p": 1.0,
82
+ "torch_dtype": null,
83
+ "torchscript": false,
84
+ "transformers_version": "4.27.0.dev0",
85
+ "typical_p": 1.0,
86
+ "use_bfloat16": false,
87
+ "vocab_size": 30522
88
+ },
89
+ "text_config": {
90
+ "_name_or_path": "",
91
+ "add_cross_attention": false,
92
+ "architectures": [
93
+ "T5ForConditionalGeneration"
94
+ ],
95
+ "bad_words_ids": null,
96
+ "begin_suppress_tokens": null,
97
+ "bos_token_id": 1,
98
+ "chunk_size_feed_forward": 0,
99
+ "cross_attention_hidden_size": null,
100
+ "d_ff": 5120,
101
+ "d_kv": 64,
102
+ "d_model": 2048,
103
+ "decoder_start_token_id": 0,
104
+ "dense_act_fn": "gelu",
105
+ "diversity_penalty": 0.0,
106
+ "do_sample": false,
107
+ "dropout_rate": 0.1,
108
+ "early_stopping": false,
109
+ "encoder_no_repeat_ngram_size": 0,
110
+ "eos_token_id": 1,
111
+ "exponential_decay_length_penalty": null,
112
+ "feed_forward_proj": "gated-gelu",
113
+ "finetuning_task": null,
114
+ "forced_bos_token_id": null,
115
+ "forced_eos_token_id": null,
116
+ "id2label": {
117
+ "0": "LABEL_0",
118
+ "1": "LABEL_1"
119
+ },
120
+ "initializer_factor": 1.0,
121
+ "is_decoder": false,
122
+ "is_encoder_decoder": true,
123
+ "is_gated_act": true,
124
+ "label2id": {
125
+ "LABEL_0": 0,
126
+ "LABEL_1": 1
127
+ },
128
+ "layer_norm_epsilon": 1e-06,
129
+ "length_penalty": 1.0,
130
+ "max_length": 20,
131
+ "min_length": 0,
132
+ "model_type": "t5",
133
+ "n_positions": 512,
134
+ "no_repeat_ngram_size": 0,
135
+ "num_beam_groups": 1,
136
+ "num_beams": 1,
137
+ "num_decoder_layers": 24,
138
+ "num_heads": 32,
139
+ "num_layers": 24,
140
+ "num_return_sequences": 1,
141
+ "output_attentions": false,
142
+ "output_hidden_states": false,
143
+ "output_past": true,
144
+ "output_scores": false,
145
+ "pad_token_id": 0,
146
+ "prefix": null,
147
+ "problem_type": null,
148
+ "pruned_heads": {},
149
+ "relative_attention_max_distance": 128,
150
+ "relative_attention_num_buckets": 32,
151
+ "remove_invalid_values": false,
152
+ "repetition_penalty": 1.0,
153
+ "return_dict": true,
154
+ "return_dict_in_generate": false,
155
+ "sep_token_id": null,
156
+ "suppress_tokens": null,
157
+ "task_specific_params": {
158
+ "summarization": {
159
+ "early_stopping": true,
160
+ "length_penalty": 2.0,
161
+ "max_length": 200,
162
+ "min_length": 30,
163
+ "no_repeat_ngram_size": 3,
164
+ "num_beams": 4,
165
+ "prefix": "summarize: "
166
+ },
167
+ "translation_en_to_de": {
168
+ "early_stopping": true,
169
+ "max_length": 300,
170
+ "num_beams": 4,
171
+ "prefix": "translate English to German: "
172
+ },
173
+ "translation_en_to_fr": {
174
+ "early_stopping": true,
175
+ "max_length": 300,
176
+ "num_beams": 4,
177
+ "prefix": "translate English to French: "
178
+ },
179
+ "translation_en_to_ro": {
180
+ "early_stopping": true,
181
+ "max_length": 300,
182
+ "num_beams": 4,
183
+ "prefix": "translate English to Romanian: "
184
+ }
185
+ },
186
+ "temperature": 1.0,
187
+ "tf_legacy_loss": false,
188
+ "tie_encoder_decoder": false,
189
+ "tie_word_embeddings": false,
190
+ "tokenizer_class": null,
191
+ "top_k": 50,
192
+ "top_p": 1.0,
193
+ "torch_dtype": "float32",
194
+ "torchscript": false,
195
+ "transformers_version": "4.27.0.dev0",
196
+ "typical_p": 1.0,
197
+ "use_bfloat16": false,
198
+ "use_cache": true,
199
+ "vocab_size": 32128
200
+ },
201
+ "torch_dtype": "float32",
202
+ "transformers_version": null,
203
+ "use_decoder_only_language_model": false,
204
+ "vision_config": {
205
+ "_name_or_path": "",
206
+ "add_cross_attention": false,
207
+ "architectures": null,
208
+ "attention_dropout": 0.0,
209
+ "bad_words_ids": null,
210
+ "begin_suppress_tokens": null,
211
+ "bos_token_id": null,
212
+ "chunk_size_feed_forward": 0,
213
+ "cross_attention_hidden_size": null,
214
+ "decoder_start_token_id": null,
215
+ "diversity_penalty": 0.0,
216
+ "do_sample": false,
217
+ "dropout": 0.0,
218
+ "early_stopping": false,
219
+ "encoder_no_repeat_ngram_size": 0,
220
+ "eos_token_id": null,
221
+ "exponential_decay_length_penalty": null,
222
+ "finetuning_task": null,
223
+ "forced_bos_token_id": null,
224
+ "forced_eos_token_id": null,
225
+ "hidden_act": "gelu",
226
+ "hidden_size": 1408,
227
+ "id2label": {
228
+ "0": "LABEL_0",
229
+ "1": "LABEL_1"
230
+ },
231
+ "image_size": 364,
232
+ "initializer_factor": 1.0,
233
+ "initializer_range": 1e-10,
234
+ "intermediate_size": 6144,
235
+ "is_decoder": false,
236
+ "is_encoder_decoder": false,
237
+ "label2id": {
238
+ "LABEL_0": 0,
239
+ "LABEL_1": 1
240
+ },
241
+ "layer_norm_eps": 1e-05,
242
+ "length_penalty": 1.0,
243
+ "max_length": 20,
244
+ "min_length": 0,
245
+ "model_type": "blip_2_vision_model",
246
+ "no_repeat_ngram_size": 0,
247
+ "num_attention_heads": 16,
248
+ "num_beam_groups": 1,
249
+ "num_beams": 1,
250
+ "num_channels": 3,
251
+ "num_hidden_layers": 39,
252
+ "num_return_sequences": 1,
253
+ "output_attentions": false,
254
+ "output_hidden_states": false,
255
+ "output_scores": false,
256
+ "pad_token_id": null,
257
+ "patch_size": 14,
258
+ "prefix": null,
259
+ "problem_type": null,
260
+ "projection_dim": 512,
261
+ "pruned_heads": {},
262
+ "qkv_bias": true,
263
+ "remove_invalid_values": false,
264
+ "repetition_penalty": 1.0,
265
+ "return_dict": true,
266
+ "return_dict_in_generate": false,
267
+ "sep_token_id": null,
268
+ "suppress_tokens": null,
269
+ "task_specific_params": null,
270
+ "temperature": 1.0,
271
+ "tf_legacy_loss": false,
272
+ "tie_encoder_decoder": false,
273
+ "tie_word_embeddings": true,
274
+ "tokenizer_class": null,
275
+ "top_k": 50,
276
+ "top_p": 1.0,
277
+ "torch_dtype": null,
278
+ "torchscript": false,
279
+ "transformers_version": "4.27.0.dev0",
280
+ "typical_p": 1.0,
281
+ "use_bfloat16": false
282
+ }
283
+ }
pytorch_model-00001-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df07071590c0ba12a89fdc570db4898cfcbafb0e051fed348fee1518fbcf6ec3
3
+ size 9443562855
pytorch_model-00002-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afef3d90827b19571700dc3cf3ce403b34ae35cbc2137d0b772660af4115d804
3
+ size 6328861892
pytorch_model.bin.index.json ADDED
The diff for this file is too large to render. See raw diff