qgallouedec HF Staff commited on
Commit
235b68a
·
verified ·
1 Parent(s): ca65871

Upload Idefics3ForConditionalGeneration

Browse files
Files changed (3) hide show
  1. config.json +111 -10
  2. generation_config.json +6 -2
  3. model.safetensors +2 -2
config.json CHANGED
@@ -7,42 +7,143 @@
7
  "pad_token_id": 128002,
8
  "scale_factor": 2,
9
  "text_config": {
 
 
 
 
 
10
  "attention_bias": false,
11
  "attention_dropout": 0.0,
12
- "head_dim": 4,
 
 
 
 
 
 
 
 
 
 
13
  "hidden_act": "silu",
14
  "hidden_size": 16,
15
  "initializer_range": 0.02,
16
- "intermediate_size": 32,
17
- "max_position_embeddings": 2048,
18
  "mlp_bias": false,
19
  "model_type": "llama",
 
20
  "num_attention_heads": 4,
21
  "num_hidden_layers": 2,
22
  "num_key_value_heads": 2,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  "pretraining_tp": 1,
24
- "rms_norm_eps": 1e-06,
25
- "rope_scaling": null,
26
- "rope_theta": 10000.0,
 
 
 
 
 
 
 
 
27
  "use_cache": true,
 
28
  "vocab_size": 128259
29
  },
30
  "tie_word_embeddings": false,
31
- "torch_dtype": "float32",
32
  "transformers_version": "4.56.0.dev0",
33
  "use_cache": true,
34
  "vision_config": {
35
  "attention_dropout": 0.0,
36
  "hidden_act": "gelu_pytorch_tanh",
37
  "hidden_size": 16,
38
- "image_size": 224,
39
  "initializer_range": 0.02,
40
- "intermediate_size": 32,
41
  "layer_norm_eps": 1e-06,
42
  "model_type": "idefics3_vision",
43
  "num_attention_heads": 4,
44
  "num_channels": 3,
45
  "num_hidden_layers": 2,
46
- "patch_size": 32
 
 
 
47
  }
48
  }
 
7
  "pad_token_id": 128002,
8
  "scale_factor": 2,
9
  "text_config": {
10
+ "_flash_attn_2_enabled": true,
11
+ "_name_or_path": "None",
12
+ "architectures": [
13
+ "Idefics3ForVisionText2Text"
14
+ ],
15
  "attention_bias": false,
16
  "attention_dropout": 0.0,
17
+ "auto_map": {
18
+ "AutoConfig": "configuration_idefics3.Idefics3Config",
19
+ "AutoModelForCausalLM": "modeling_idefics3.Idefics3ForVisionText2Text"
20
+ },
21
+ "bos_token_id": 128000,
22
+ "eos_token_id": [
23
+ 128001,
24
+ 128008,
25
+ 128009
26
+ ],
27
+ "head_dim": 128,
28
  "hidden_act": "silu",
29
  "hidden_size": 16,
30
  "initializer_range": 0.02,
31
+ "intermediate_size": 14336,
32
+ "max_position_embeddings": 131072,
33
  "mlp_bias": false,
34
  "model_type": "llama",
35
+ "neftune_noise_alpha": 0.0,
36
  "num_attention_heads": 4,
37
  "num_hidden_layers": 2,
38
  "num_key_value_heads": 2,
39
+ "pad_token_id": 128002,
40
+ "perceiver_config": {
41
+ "_name_or_path": "",
42
+ "add_cross_attention": false,
43
+ "architectures": null,
44
+ "attention_dropout": 0.0,
45
+ "bad_words_ids": null,
46
+ "begin_suppress_tokens": null,
47
+ "bos_token_id": null,
48
+ "chunk_size_feed_forward": 0,
49
+ "cross_attention_hidden_size": null,
50
+ "decoder_start_token_id": null,
51
+ "diversity_penalty": 0.0,
52
+ "do_sample": false,
53
+ "early_stopping": false,
54
+ "encoder_no_repeat_ngram_size": 0,
55
+ "eos_token_id": null,
56
+ "exponential_decay_length_penalty": null,
57
+ "finetuning_task": null,
58
+ "forced_bos_token_id": null,
59
+ "forced_eos_token_id": null,
60
+ "hidden_act": "silu",
61
+ "id2label": {
62
+ "0": "LABEL_0",
63
+ "1": "LABEL_1"
64
+ },
65
+ "is_decoder": false,
66
+ "is_encoder_decoder": false,
67
+ "label2id": {
68
+ "LABEL_0": 0,
69
+ "LABEL_1": 1
70
+ },
71
+ "length_penalty": 1.0,
72
+ "max_length": 20,
73
+ "min_length": 0,
74
+ "model_type": "idefics3",
75
+ "no_repeat_ngram_size": 0,
76
+ "num_beam_groups": 1,
77
+ "num_beams": 1,
78
+ "num_key_value_heads": 1,
79
+ "num_return_sequences": 1,
80
+ "output_attentions": false,
81
+ "output_hidden_states": false,
82
+ "output_scores": false,
83
+ "pad_token_id": 128002,
84
+ "prefix": null,
85
+ "problem_type": null,
86
+ "pruned_heads": {},
87
+ "qk_layer_norms_perceiver": false,
88
+ "remove_invalid_values": false,
89
+ "repetition_penalty": 1.0,
90
+ "resampler_depth": 6,
91
+ "resampler_head_dim": 96,
92
+ "resampler_n_heads": 16,
93
+ "resampler_n_latents": 64,
94
+ "return_dict": true,
95
+ "return_dict_in_generate": false,
96
+ "sep_token_id": null,
97
+ "suppress_tokens": null,
98
+ "task_specific_params": null,
99
+ "temperature": 1.0,
100
+ "tf_legacy_loss": false,
101
+ "tie_encoder_decoder": false,
102
+ "tie_word_embeddings": true,
103
+ "tokenizer_class": null,
104
+ "top_k": 50,
105
+ "top_p": 1.0,
106
+ "torch_dtype": null,
107
+ "torchscript": false,
108
+ "transformers_version": "4.43.2",
109
+ "typical_p": 1.0,
110
+ "use_bfloat16": false
111
+ },
112
  "pretraining_tp": 1,
113
+ "qk_layer_norms": false,
114
+ "rms_norm_eps": 1e-05,
115
+ "rope_scaling": {
116
+ "factor": 8.0,
117
+ "high_freq_factor": 4.0,
118
+ "low_freq_factor": 1.0,
119
+ "original_max_position_embeddings": 8192,
120
+ "rope_type": "llama3"
121
+ },
122
+ "rope_theta": 500000.0,
123
+ "torch_dtype": "bfloat16",
124
  "use_cache": true,
125
+ "use_resampler": false,
126
  "vocab_size": 128259
127
  },
128
  "tie_word_embeddings": false,
129
+ "torch_dtype": "bfloat16",
130
  "transformers_version": "4.56.0.dev0",
131
  "use_cache": true,
132
  "vision_config": {
133
  "attention_dropout": 0.0,
134
  "hidden_act": "gelu_pytorch_tanh",
135
  "hidden_size": 16,
136
+ "image_size": 364,
137
  "initializer_range": 0.02,
138
+ "intermediate_size": 4304,
139
  "layer_norm_eps": 1e-06,
140
  "model_type": "idefics3_vision",
141
  "num_attention_heads": 4,
142
  "num_channels": 3,
143
  "num_hidden_layers": 2,
144
+ "num_key_value_heads": 2,
145
+ "old_vision_model_name": "/fsx/hugo/siglip-so400m-14-364-flash-attn2-navit",
146
+ "pad_token_id": 128002,
147
+ "patch_size": 14
148
  }
149
  }
generation_config.json CHANGED
@@ -1,7 +1,11 @@
1
  {
2
  "_from_model_config": true,
3
- "bos_token_id": 1,
4
- "eos_token_id": 2,
 
 
 
 
5
  "pad_token_id": 128002,
6
  "transformers_version": "4.56.0.dev0"
7
  }
 
1
  {
2
  "_from_model_config": true,
3
+ "bos_token_id": 128000,
4
+ "eos_token_id": [
5
+ 128001,
6
+ 128008,
7
+ 128009
8
+ ],
9
  "pad_token_id": 128002,
10
  "transformers_version": "4.56.0.dev0"
11
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0e7b437fd28bcbaf93e52dd6758b46b53758fbc085f7ba9af89cf8d65b435b3a
3
- size 16664800
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da631b250a2511e3aec1519afb448683bc565b40461c68122ebeb50e133760bc
3
+ size 11682096