thwin27 commited on
Commit
01dc3fb
1 Parent(s): e3fe426

Upload Idefics3ForConditionalGeneration

Browse files
Files changed (4) hide show
  1. README.md +199 -0
  2. config.json +282 -0
  3. generation_config.json +12 -0
  4. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
config.json ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "HuggingFaceM4/Idefics3-8B-Llama3",
3
+ "architectures": [
4
+ "Idefics3ForConditionalGeneration"
5
+ ],
6
+ "image_token_id": 128257,
7
+ "model_type": "idefics3",
8
+ "quantization_config": {
9
+ "_load_in_4bit": true,
10
+ "_load_in_8bit": false,
11
+ "bnb_4bit_compute_dtype": "bfloat16",
12
+ "bnb_4bit_quant_storage": "uint8",
13
+ "bnb_4bit_quant_type": "nf4",
14
+ "bnb_4bit_use_double_quant": true,
15
+ "llm_int8_enable_fp32_cpu_offload": true,
16
+ "llm_int8_has_fp16_weight": false,
17
+ "llm_int8_skip_modules": [
18
+ "lm_head",
19
+ "model.vision_model",
20
+ "model.connector"
21
+ ],
22
+ "llm_int8_threshold": 6.0,
23
+ "load_in_4bit": true,
24
+ "load_in_8bit": false,
25
+ "quant_method": "bitsandbytes"
26
+ },
27
+ "scale_factor": 2,
28
+ "text_config": {
29
+ "_attn_implementation_autoset": false,
30
+ "_flash_attn_2_enabled": true,
31
+ "_name_or_path": "None",
32
+ "add_cross_attention": false,
33
+ "architectures": [
34
+ "Idefics3ForVisionText2Text"
35
+ ],
36
+ "attention_bias": false,
37
+ "attention_dropout": 0.0,
38
+ "auto_map": {
39
+ "AutoConfig": "configuration_idefics3.Idefics3Config",
40
+ "AutoModelForCausalLM": "modeling_idefics3.Idefics3ForVisionText2Text"
41
+ },
42
+ "bad_words_ids": null,
43
+ "begin_suppress_tokens": null,
44
+ "bos_token_id": 128000,
45
+ "chunk_size_feed_forward": 0,
46
+ "cross_attention_hidden_size": null,
47
+ "decoder_start_token_id": null,
48
+ "diversity_penalty": 0.0,
49
+ "do_sample": false,
50
+ "early_stopping": false,
51
+ "encoder_no_repeat_ngram_size": 0,
52
+ "eos_token_id": [
53
+ 128001,
54
+ 128008,
55
+ 128009
56
+ ],
57
+ "exponential_decay_length_penalty": null,
58
+ "finetuning_task": null,
59
+ "forced_bos_token_id": null,
60
+ "forced_eos_token_id": null,
61
+ "head_dim": 128,
62
+ "hidden_act": "silu",
63
+ "hidden_size": 4096,
64
+ "id2label": {
65
+ "0": "LABEL_0",
66
+ "1": "LABEL_1"
67
+ },
68
+ "initializer_range": 0.02,
69
+ "intermediate_size": 14336,
70
+ "is_decoder": false,
71
+ "is_encoder_decoder": false,
72
+ "label2id": {
73
+ "LABEL_0": 0,
74
+ "LABEL_1": 1
75
+ },
76
+ "length_penalty": 1.0,
77
+ "max_length": 20,
78
+ "max_position_embeddings": 131072,
79
+ "min_length": 0,
80
+ "mlp_bias": false,
81
+ "model_type": "llama",
82
+ "neftune_noise_alpha": 0.0,
83
+ "no_repeat_ngram_size": 0,
84
+ "num_attention_heads": 32,
85
+ "num_beam_groups": 1,
86
+ "num_beams": 1,
87
+ "num_hidden_layers": 32,
88
+ "num_key_value_heads": 8,
89
+ "num_return_sequences": 1,
90
+ "output_attentions": false,
91
+ "output_hidden_states": false,
92
+ "output_scores": false,
93
+ "pad_token_id": 128002,
94
+ "perceiver_config": {
95
+ "_name_or_path": "",
96
+ "add_cross_attention": false,
97
+ "architectures": null,
98
+ "attention_dropout": 0.0,
99
+ "bad_words_ids": null,
100
+ "begin_suppress_tokens": null,
101
+ "bos_token_id": null,
102
+ "chunk_size_feed_forward": 0,
103
+ "cross_attention_hidden_size": null,
104
+ "decoder_start_token_id": null,
105
+ "diversity_penalty": 0.0,
106
+ "do_sample": false,
107
+ "early_stopping": false,
108
+ "encoder_no_repeat_ngram_size": 0,
109
+ "eos_token_id": null,
110
+ "exponential_decay_length_penalty": null,
111
+ "finetuning_task": null,
112
+ "forced_bos_token_id": null,
113
+ "forced_eos_token_id": null,
114
+ "hidden_act": "silu",
115
+ "id2label": {
116
+ "0": "LABEL_0",
117
+ "1": "LABEL_1"
118
+ },
119
+ "is_decoder": false,
120
+ "is_encoder_decoder": false,
121
+ "label2id": {
122
+ "LABEL_0": 0,
123
+ "LABEL_1": 1
124
+ },
125
+ "length_penalty": 1.0,
126
+ "max_length": 20,
127
+ "min_length": 0,
128
+ "model_type": "idefics3",
129
+ "no_repeat_ngram_size": 0,
130
+ "num_beam_groups": 1,
131
+ "num_beams": 1,
132
+ "num_key_value_heads": 1,
133
+ "num_return_sequences": 1,
134
+ "output_attentions": false,
135
+ "output_hidden_states": false,
136
+ "output_scores": false,
137
+ "pad_token_id": 128002,
138
+ "prefix": null,
139
+ "problem_type": null,
140
+ "pruned_heads": {},
141
+ "qk_layer_norms_perceiver": false,
142
+ "remove_invalid_values": false,
143
+ "repetition_penalty": 1.0,
144
+ "resampler_depth": 6,
145
+ "resampler_head_dim": 96,
146
+ "resampler_n_heads": 16,
147
+ "resampler_n_latents": 64,
148
+ "return_dict": true,
149
+ "return_dict_in_generate": false,
150
+ "sep_token_id": null,
151
+ "suppress_tokens": null,
152
+ "task_specific_params": null,
153
+ "temperature": 1.0,
154
+ "tf_legacy_loss": false,
155
+ "tie_encoder_decoder": false,
156
+ "tie_word_embeddings": true,
157
+ "tokenizer_class": null,
158
+ "top_k": 50,
159
+ "top_p": 1.0,
160
+ "torch_dtype": null,
161
+ "torchscript": false,
162
+ "transformers_version": "4.43.2",
163
+ "typical_p": 1.0,
164
+ "use_bfloat16": false
165
+ },
166
+ "prefix": null,
167
+ "pretraining_tp": 1,
168
+ "problem_type": null,
169
+ "pruned_heads": {},
170
+ "qk_layer_norms": false,
171
+ "remove_invalid_values": false,
172
+ "repetition_penalty": 1.0,
173
+ "return_dict": true,
174
+ "return_dict_in_generate": false,
175
+ "rms_norm_eps": 1e-05,
176
+ "rope_scaling": {
177
+ "factor": 8.0,
178
+ "high_freq_factor": 4.0,
179
+ "low_freq_factor": 1.0,
180
+ "original_max_position_embeddings": 8192,
181
+ "rope_type": "llama3"
182
+ },
183
+ "rope_theta": 500000.0,
184
+ "sep_token_id": null,
185
+ "suppress_tokens": null,
186
+ "task_specific_params": null,
187
+ "temperature": 1.0,
188
+ "tf_legacy_loss": false,
189
+ "tie_encoder_decoder": false,
190
+ "tie_word_embeddings": false,
191
+ "tokenizer_class": null,
192
+ "top_k": 50,
193
+ "top_p": 1.0,
194
+ "torch_dtype": "bfloat16",
195
+ "torchscript": false,
196
+ "typical_p": 1.0,
197
+ "use_bfloat16": false,
198
+ "use_cache": true,
199
+ "use_resampler": false,
200
+ "vocab_size": 128259
201
+ },
202
+ "tie_word_embeddings": false,
203
+ "torch_dtype": "float16",
204
+ "transformers_version": "4.46.1",
205
+ "use_cache": true,
206
+ "vision_config": {
207
+ "_attn_implementation_autoset": false,
208
+ "_name_or_path": "",
209
+ "add_cross_attention": false,
210
+ "architectures": null,
211
+ "attention_dropout": 0.0,
212
+ "bad_words_ids": null,
213
+ "begin_suppress_tokens": null,
214
+ "bos_token_id": null,
215
+ "chunk_size_feed_forward": 0,
216
+ "cross_attention_hidden_size": null,
217
+ "decoder_start_token_id": null,
218
+ "diversity_penalty": 0.0,
219
+ "do_sample": false,
220
+ "early_stopping": false,
221
+ "encoder_no_repeat_ngram_size": 0,
222
+ "eos_token_id": null,
223
+ "exponential_decay_length_penalty": null,
224
+ "finetuning_task": null,
225
+ "forced_bos_token_id": null,
226
+ "forced_eos_token_id": null,
227
+ "hidden_act": "gelu_pytorch_tanh",
228
+ "hidden_size": 1152,
229
+ "id2label": {
230
+ "0": "LABEL_0",
231
+ "1": "LABEL_1"
232
+ },
233
+ "image_size": 364,
234
+ "initializer_range": 0.02,
235
+ "intermediate_size": 4304,
236
+ "is_decoder": false,
237
+ "is_encoder_decoder": false,
238
+ "label2id": {
239
+ "LABEL_0": 0,
240
+ "LABEL_1": 1
241
+ },
242
+ "layer_norm_eps": 1e-06,
243
+ "length_penalty": 1.0,
244
+ "max_length": 20,
245
+ "min_length": 0,
246
+ "model_type": "idefics3",
247
+ "no_repeat_ngram_size": 0,
248
+ "num_attention_heads": 16,
249
+ "num_beam_groups": 1,
250
+ "num_beams": 1,
251
+ "num_channels": 3,
252
+ "num_hidden_layers": 27,
253
+ "num_return_sequences": 1,
254
+ "old_vision_model_name": "/fsx/hugo/siglip-so400m-14-364-flash-attn2-navit",
255
+ "output_attentions": false,
256
+ "output_hidden_states": false,
257
+ "output_scores": false,
258
+ "pad_token_id": 128002,
259
+ "patch_size": 14,
260
+ "prefix": null,
261
+ "problem_type": null,
262
+ "pruned_heads": {},
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
+ "typical_p": 1.0,
280
+ "use_bfloat16": false
281
+ }
282
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 128000,
4
+ "eos_token_id": [
5
+ 128001,
6
+ 128008,
7
+ 128009,
8
+ 128258
9
+ ],
10
+ "pad_token_id": 128002,
11
+ "transformers_version": "4.46.1"
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12aa114fd31201153d716cf9adcc492e6830aa6ea6f0c0bfed0c696919e54ab5
3
+ size 6566468916