xugefu commited on
Commit
93ac1e7
1 Parent(s): cf83b9c

Upload Idefics2ForConditionalGeneration

Browse files
Files changed (3) hide show
  1. config.json +249 -0
  2. generation_config.json +18 -0
  3. model.safetensors +3 -0
config.json ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "HuggingFaceM4/idefics2-8b",
3
+ "architectures": [
4
+ "Idefics2ForConditionalGeneration"
5
+ ],
6
+ "image_token_id": 32001,
7
+ "model_type": "idefics2",
8
+ "perceiver_config": {
9
+ "_name_or_path": "",
10
+ "add_cross_attention": false,
11
+ "architectures": null,
12
+ "attention_dropout": 0.0,
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": "silu",
29
+ "id2label": {
30
+ "0": "LABEL_0",
31
+ "1": "LABEL_1"
32
+ },
33
+ "is_decoder": false,
34
+ "is_encoder_decoder": false,
35
+ "label2id": {
36
+ "LABEL_0": 0,
37
+ "LABEL_1": 1
38
+ },
39
+ "length_penalty": 1.0,
40
+ "max_length": 20,
41
+ "min_length": 0,
42
+ "model_type": "idefics2",
43
+ "no_repeat_ngram_size": 0,
44
+ "num_beam_groups": 1,
45
+ "num_beams": 1,
46
+ "num_key_value_heads": 4,
47
+ "num_return_sequences": 1,
48
+ "output_attentions": false,
49
+ "output_hidden_states": false,
50
+ "output_scores": false,
51
+ "pad_token_id": null,
52
+ "prefix": null,
53
+ "problem_type": null,
54
+ "pruned_heads": {},
55
+ "remove_invalid_values": false,
56
+ "repetition_penalty": 1.0,
57
+ "resampler_depth": 3,
58
+ "resampler_head_dim": 96,
59
+ "resampler_n_heads": 16,
60
+ "resampler_n_latents": 64,
61
+ "return_dict": true,
62
+ "return_dict_in_generate": false,
63
+ "sep_token_id": null,
64
+ "suppress_tokens": null,
65
+ "task_specific_params": null,
66
+ "temperature": 1.0,
67
+ "tf_legacy_loss": false,
68
+ "tie_encoder_decoder": false,
69
+ "tie_word_embeddings": true,
70
+ "tokenizer_class": null,
71
+ "top_k": 50,
72
+ "top_p": 1.0,
73
+ "torch_dtype": null,
74
+ "torchscript": false,
75
+ "typical_p": 1.0,
76
+ "use_bfloat16": false
77
+ },
78
+ "quantization_config": {
79
+ "_load_in_4bit": true,
80
+ "_load_in_8bit": false,
81
+ "bnb_4bit_compute_dtype": "bfloat16",
82
+ "bnb_4bit_quant_storage": "uint8",
83
+ "bnb_4bit_quant_type": "nf4",
84
+ "bnb_4bit_use_double_quant": true,
85
+ "llm_int8_enable_fp32_cpu_offload": false,
86
+ "llm_int8_has_fp16_weight": false,
87
+ "llm_int8_skip_modules": null,
88
+ "llm_int8_threshold": 6.0,
89
+ "load_in_4bit": true,
90
+ "load_in_8bit": false,
91
+ "quant_method": "bitsandbytes"
92
+ },
93
+ "text_config": {
94
+ "_name_or_path": "",
95
+ "add_cross_attention": false,
96
+ "architectures": null,
97
+ "attention_dropout": 0.0,
98
+ "bad_words_ids": null,
99
+ "begin_suppress_tokens": null,
100
+ "bos_token_id": 1,
101
+ "chunk_size_feed_forward": 0,
102
+ "cross_attention_hidden_size": null,
103
+ "decoder_start_token_id": null,
104
+ "diversity_penalty": 0.0,
105
+ "do_sample": false,
106
+ "early_stopping": false,
107
+ "encoder_no_repeat_ngram_size": 0,
108
+ "eos_token_id": 2,
109
+ "exponential_decay_length_penalty": null,
110
+ "finetuning_task": null,
111
+ "forced_bos_token_id": null,
112
+ "forced_eos_token_id": null,
113
+ "head_dim": 128,
114
+ "hidden_act": "silu",
115
+ "hidden_size": 4096,
116
+ "id2label": {
117
+ "0": "LABEL_0",
118
+ "1": "LABEL_1"
119
+ },
120
+ "initializer_range": 0.02,
121
+ "intermediate_size": 14336,
122
+ "is_decoder": false,
123
+ "is_encoder_decoder": false,
124
+ "label2id": {
125
+ "LABEL_0": 0,
126
+ "LABEL_1": 1
127
+ },
128
+ "length_penalty": 1.0,
129
+ "max_length": 20,
130
+ "max_position_embeddings": 32768,
131
+ "min_length": 0,
132
+ "model_type": "mistral",
133
+ "no_repeat_ngram_size": 0,
134
+ "num_attention_heads": 32,
135
+ "num_beam_groups": 1,
136
+ "num_beams": 1,
137
+ "num_hidden_layers": 32,
138
+ "num_key_value_heads": 8,
139
+ "num_return_sequences": 1,
140
+ "output_attentions": false,
141
+ "output_hidden_states": false,
142
+ "output_scores": false,
143
+ "pad_token_id": 0,
144
+ "prefix": null,
145
+ "problem_type": null,
146
+ "pruned_heads": {},
147
+ "remove_invalid_values": false,
148
+ "repetition_penalty": 1.0,
149
+ "return_dict": true,
150
+ "return_dict_in_generate": false,
151
+ "rms_norm_eps": 1e-05,
152
+ "rope_theta": 10000.0,
153
+ "sep_token_id": null,
154
+ "sliding_window": 4096,
155
+ "suppress_tokens": null,
156
+ "task_specific_params": null,
157
+ "temperature": 1.0,
158
+ "tf_legacy_loss": false,
159
+ "tie_encoder_decoder": false,
160
+ "tie_word_embeddings": false,
161
+ "tokenizer_class": null,
162
+ "top_k": 50,
163
+ "top_p": 1.0,
164
+ "torch_dtype": null,
165
+ "torchscript": false,
166
+ "typical_p": 1.0,
167
+ "use_bfloat16": false,
168
+ "use_cache": true,
169
+ "vocab_size": 32003
170
+ },
171
+ "tie_word_embeddings": false,
172
+ "torch_dtype": "bfloat16",
173
+ "transformers_version": "4.44.2",
174
+ "use_cache": true,
175
+ "vision_config": {
176
+ "_name_or_path": "",
177
+ "add_cross_attention": false,
178
+ "architectures": null,
179
+ "attention_dropout": 0.0,
180
+ "bad_words_ids": null,
181
+ "begin_suppress_tokens": null,
182
+ "bos_token_id": null,
183
+ "chunk_size_feed_forward": 0,
184
+ "cross_attention_hidden_size": null,
185
+ "decoder_start_token_id": null,
186
+ "diversity_penalty": 0.0,
187
+ "do_sample": false,
188
+ "early_stopping": false,
189
+ "encoder_no_repeat_ngram_size": 0,
190
+ "eos_token_id": null,
191
+ "exponential_decay_length_penalty": null,
192
+ "finetuning_task": null,
193
+ "forced_bos_token_id": null,
194
+ "forced_eos_token_id": null,
195
+ "hidden_act": "gelu_pytorch_tanh",
196
+ "hidden_size": 1152,
197
+ "id2label": {
198
+ "0": "LABEL_0",
199
+ "1": "LABEL_1"
200
+ },
201
+ "image_size": 980,
202
+ "initializer_range": 0.02,
203
+ "intermediate_size": 4304,
204
+ "is_decoder": false,
205
+ "is_encoder_decoder": false,
206
+ "label2id": {
207
+ "LABEL_0": 0,
208
+ "LABEL_1": 1
209
+ },
210
+ "layer_norm_eps": 1e-06,
211
+ "length_penalty": 1.0,
212
+ "max_length": 20,
213
+ "min_length": 0,
214
+ "model_type": "idefics2",
215
+ "no_repeat_ngram_size": 0,
216
+ "num_attention_heads": 16,
217
+ "num_beam_groups": 1,
218
+ "num_beams": 1,
219
+ "num_channels": 3,
220
+ "num_hidden_layers": 27,
221
+ "num_return_sequences": 1,
222
+ "output_attentions": false,
223
+ "output_hidden_states": false,
224
+ "output_scores": false,
225
+ "pad_token_id": null,
226
+ "patch_size": 14,
227
+ "prefix": null,
228
+ "problem_type": null,
229
+ "pruned_heads": {},
230
+ "remove_invalid_values": false,
231
+ "repetition_penalty": 1.0,
232
+ "return_dict": true,
233
+ "return_dict_in_generate": false,
234
+ "sep_token_id": null,
235
+ "suppress_tokens": null,
236
+ "task_specific_params": null,
237
+ "temperature": 1.0,
238
+ "tf_legacy_loss": false,
239
+ "tie_encoder_decoder": false,
240
+ "tie_word_embeddings": true,
241
+ "tokenizer_class": null,
242
+ "top_k": 50,
243
+ "top_p": 1.0,
244
+ "torch_dtype": null,
245
+ "torchscript": false,
246
+ "typical_p": 1.0,
247
+ "use_bfloat16": false
248
+ }
249
+ }
generation_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bad_words_ids": [
4
+ [
5
+ 32000
6
+ ],
7
+ [
8
+ 32001
9
+ ]
10
+ ],
11
+ "bos_token_id": 1,
12
+ "eos_token_id": [
13
+ 2,
14
+ 32002
15
+ ],
16
+ "pad_token_id": 0,
17
+ "transformers_version": "4.44.2"
18
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4ccd9dda159a29313eb08196035e968037a5ae239bd585a77e9c45f2d9cbdea
3
+ size 4735535644