jihadzakki commited on
Commit
9796958
1 Parent(s): 71e9d7b

Upload 11 files

Browse files
adapter_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "HuggingFaceM4/idefics2-8b",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": false,
8
+ "init_lora_weights": "gaussian",
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 8,
14
+ "lora_dropout": 0.1,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 8,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": ".*(text_model|modality_projection|perceiver_resampler).*(down_proj|gate_proj|up_proj|k_proj|q_proj|v_proj|o_proj).*$",
23
+ "task_type": null,
24
+ "use_dora": false,
25
+ "use_rslora": false
26
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b17af47da190d6e7355dd5e8fd0718c5fd3c3ed74075a4fdf57b046d7644f900
3
+ size 93378688
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<end_of_utterance>": 32002,
3
+ "<fake_token_around_image>": 32000,
4
+ "<image>": 32001
5
+ }
config.json ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "float16",
82
+ "bnb_4bit_quant_storage": "uint8",
83
+ "bnb_4bit_quant_type": "nf4",
84
+ "bnb_4bit_use_double_quant": false,
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
+ "hidden_act": "silu",
114
+ "hidden_size": 4096,
115
+ "id2label": {
116
+ "0": "LABEL_0",
117
+ "1": "LABEL_1"
118
+ },
119
+ "initializer_range": 0.02,
120
+ "intermediate_size": 14336,
121
+ "is_decoder": false,
122
+ "is_encoder_decoder": false,
123
+ "label2id": {
124
+ "LABEL_0": 0,
125
+ "LABEL_1": 1
126
+ },
127
+ "length_penalty": 1.0,
128
+ "max_length": 20,
129
+ "max_position_embeddings": 32768,
130
+ "min_length": 0,
131
+ "model_type": "mistral",
132
+ "no_repeat_ngram_size": 0,
133
+ "num_attention_heads": 32,
134
+ "num_beam_groups": 1,
135
+ "num_beams": 1,
136
+ "num_hidden_layers": 32,
137
+ "num_key_value_heads": 8,
138
+ "num_return_sequences": 1,
139
+ "output_attentions": false,
140
+ "output_hidden_states": false,
141
+ "output_scores": false,
142
+ "pad_token_id": 0,
143
+ "prefix": null,
144
+ "problem_type": null,
145
+ "pruned_heads": {},
146
+ "remove_invalid_values": false,
147
+ "repetition_penalty": 1.0,
148
+ "return_dict": true,
149
+ "return_dict_in_generate": false,
150
+ "rms_norm_eps": 1e-05,
151
+ "rope_theta": 10000.0,
152
+ "sep_token_id": null,
153
+ "sliding_window": 4096,
154
+ "suppress_tokens": null,
155
+ "task_specific_params": null,
156
+ "temperature": 1.0,
157
+ "tf_legacy_loss": false,
158
+ "tie_encoder_decoder": false,
159
+ "tie_word_embeddings": false,
160
+ "tokenizer_class": null,
161
+ "top_k": 50,
162
+ "top_p": 1.0,
163
+ "torch_dtype": null,
164
+ "torchscript": false,
165
+ "typical_p": 1.0,
166
+ "use_bfloat16": false,
167
+ "use_cache": true,
168
+ "vocab_size": 32003
169
+ },
170
+ "tie_word_embeddings": false,
171
+ "torch_dtype": "float16",
172
+ "transformers_version": "4.42.0.dev0",
173
+ "use_cache": true,
174
+ "vision_config": {
175
+ "_name_or_path": "",
176
+ "add_cross_attention": false,
177
+ "architectures": null,
178
+ "attention_dropout": 0.0,
179
+ "bad_words_ids": null,
180
+ "begin_suppress_tokens": null,
181
+ "bos_token_id": null,
182
+ "chunk_size_feed_forward": 0,
183
+ "cross_attention_hidden_size": null,
184
+ "decoder_start_token_id": null,
185
+ "diversity_penalty": 0.0,
186
+ "do_sample": false,
187
+ "early_stopping": false,
188
+ "encoder_no_repeat_ngram_size": 0,
189
+ "eos_token_id": null,
190
+ "exponential_decay_length_penalty": null,
191
+ "finetuning_task": null,
192
+ "forced_bos_token_id": null,
193
+ "forced_eos_token_id": null,
194
+ "hidden_act": "gelu_pytorch_tanh",
195
+ "hidden_size": 1152,
196
+ "id2label": {
197
+ "0": "LABEL_0",
198
+ "1": "LABEL_1"
199
+ },
200
+ "image_size": 980,
201
+ "initializer_range": 0.02,
202
+ "intermediate_size": 4304,
203
+ "is_decoder": false,
204
+ "is_encoder_decoder": false,
205
+ "label2id": {
206
+ "LABEL_0": 0,
207
+ "LABEL_1": 1
208
+ },
209
+ "layer_norm_eps": 1e-06,
210
+ "length_penalty": 1.0,
211
+ "max_length": 20,
212
+ "min_length": 0,
213
+ "model_type": "idefics2",
214
+ "no_repeat_ngram_size": 0,
215
+ "num_attention_heads": 16,
216
+ "num_beam_groups": 1,
217
+ "num_beams": 1,
218
+ "num_channels": 3,
219
+ "num_hidden_layers": 27,
220
+ "num_return_sequences": 1,
221
+ "output_attentions": false,
222
+ "output_hidden_states": false,
223
+ "output_scores": false,
224
+ "pad_token_id": null,
225
+ "patch_size": 14,
226
+ "prefix": null,
227
+ "problem_type": null,
228
+ "pruned_heads": {},
229
+ "remove_invalid_values": false,
230
+ "repetition_penalty": 1.0,
231
+ "return_dict": true,
232
+ "return_dict_in_generate": false,
233
+ "sep_token_id": null,
234
+ "suppress_tokens": null,
235
+ "task_specific_params": null,
236
+ "temperature": 1.0,
237
+ "tf_legacy_loss": false,
238
+ "tie_encoder_decoder": false,
239
+ "tie_word_embeddings": true,
240
+ "tokenizer_class": null,
241
+ "top_k": 50,
242
+ "top_p": 1.0,
243
+ "torch_dtype": null,
244
+ "torchscript": false,
245
+ "typical_p": 1.0,
246
+ "use_bfloat16": false
247
+ }
248
+ }
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.42.0.dev0"
18
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_image_splitting": false,
4
+ "do_normalize": true,
5
+ "do_pad": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "Idefics2ImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Idefics2Processor",
20
+ "resample": 2,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "longest_edge": 980,
24
+ "shortest_edge": 378
25
+ }
26
+ }
processor_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_len": 64,
3
+ "processor_class": "Idefics2Processor"
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<fake_token_around_image>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "<image>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ {
18
+ "content": "<end_of_utterance>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ ],
25
+ "bos_token": {
26
+ "content": "<s>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "eos_token": {
33
+ "content": "</s>",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ },
39
+ "pad_token": {
40
+ "content": "<unk>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false
45
+ },
46
+ "unk_token": {
47
+ "content": "<unk>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false
52
+ }
53
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
3
+ size 493443
tokenizer_config.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "32000": {
31
+ "content": "<fake_token_around_image>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<image>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "32002": {
47
+ "content": "<end_of_utterance>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ }
54
+ },
55
+ "additional_special_tokens": [
56
+ "<fake_token_around_image>",
57
+ "<image>",
58
+ "<end_of_utterance>"
59
+ ],
60
+ "bos_token": "<s>",
61
+ "clean_up_tokenization_spaces": false,
62
+ "do_image_splitting": false,
63
+ "eos_token": "</s>",
64
+ "legacy": false,
65
+ "max_length": null,
66
+ "model_max_length": 1000000000000000019884624838656,
67
+ "pad_to_multiple_of": null,
68
+ "pad_token": "<unk>",
69
+ "pad_token_type_id": 0,
70
+ "padding_side": "left",
71
+ "processor_class": "Idefics2Processor",
72
+ "sp_model_kwargs": {},
73
+ "spaces_between_special_tokens": false,
74
+ "tokenizer_class": "LlamaTokenizer",
75
+ "unk_token": "<unk>",
76
+ "use_default_system_prompt": true
77
+ }