Leo-D-M-Appourchaux commited on
Commit
8d5f6b6
·
verified ·
1 Parent(s): b1fd1b4

Upload 10 files

Browse files

Initial model commit

added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<end_of_utterance>": 49154,
3
+ "<fake_token_around_image>": 49152,
4
+ "<image>": 49153
5
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "<|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}"
3
+ }
config.json ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Idefics3ForConditionalGeneration"
4
+ ],
5
+ "image_seq_len": 81,
6
+ "image_token_id": 49153,
7
+ "model_type": "idefics3",
8
+ "pad_token_id": 128002,
9
+ "scale_factor": 3,
10
+ "text_config": {
11
+ "_flash_attn_2_enabled": true,
12
+ "_name_or_path": "/fsx/m4/experiments/local_experiment_dir/s3_async_temporary_checkpoint_folder/tr_324_opt_400/unwrapped_model",
13
+ "architectures": [
14
+ "VLlama3ForCausalLM"
15
+ ],
16
+ "attention_bias": false,
17
+ "attention_dropout": 0.0,
18
+ "bos_token_id": 0,
19
+ "eos_token_id": 0,
20
+ "head_dim": 64,
21
+ "hidden_act": "silu",
22
+ "hidden_size": 2048,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 8192,
25
+ "max_position_embeddings": 16384,
26
+ "mlp_bias": false,
27
+ "model_type": "llama",
28
+ "neftune_noise_alpha": 0.0,
29
+ "num_attention_heads": 32,
30
+ "num_hidden_layers": 24,
31
+ "num_key_value_heads": 32,
32
+ "pad_token_id": 2,
33
+ "perceiver_config": {
34
+ "_attn_implementation_autoset": false,
35
+ "_name_or_path": "",
36
+ "add_cross_attention": false,
37
+ "architectures": null,
38
+ "attention_dropout": 0.0,
39
+ "bad_words_ids": null,
40
+ "begin_suppress_tokens": null,
41
+ "bos_token_id": null,
42
+ "chunk_size_feed_forward": 0,
43
+ "cross_attention_hidden_size": null,
44
+ "decoder_start_token_id": null,
45
+ "diversity_penalty": 0.0,
46
+ "do_sample": false,
47
+ "early_stopping": false,
48
+ "encoder_no_repeat_ngram_size": 0,
49
+ "eos_token_id": null,
50
+ "exponential_decay_length_penalty": null,
51
+ "finetuning_task": null,
52
+ "forced_bos_token_id": null,
53
+ "forced_eos_token_id": null,
54
+ "hidden_act": "silu",
55
+ "id2label": {
56
+ "0": "LABEL_0",
57
+ "1": "LABEL_1"
58
+ },
59
+ "is_decoder": false,
60
+ "is_encoder_decoder": false,
61
+ "label2id": {
62
+ "LABEL_0": 0,
63
+ "LABEL_1": 1
64
+ },
65
+ "length_penalty": 1.0,
66
+ "max_length": 20,
67
+ "min_length": 0,
68
+ "model_type": "vllama3",
69
+ "no_repeat_ngram_size": 0,
70
+ "num_beam_groups": 1,
71
+ "num_beams": 1,
72
+ "num_key_value_heads": 1,
73
+ "num_return_sequences": 1,
74
+ "output_attentions": false,
75
+ "output_hidden_states": false,
76
+ "output_scores": false,
77
+ "pad_token_id": null,
78
+ "prefix": null,
79
+ "problem_type": null,
80
+ "pruned_heads": {},
81
+ "qk_layer_norms_perceiver": false,
82
+ "remove_invalid_values": false,
83
+ "repetition_penalty": 1.0,
84
+ "resampler_depth": 6,
85
+ "resampler_head_dim": 96,
86
+ "resampler_n_heads": 16,
87
+ "resampler_n_latents": 64,
88
+ "return_dict": true,
89
+ "return_dict_in_generate": false,
90
+ "sep_token_id": null,
91
+ "suppress_tokens": null,
92
+ "task_specific_params": null,
93
+ "temperature": 1.0,
94
+ "tf_legacy_loss": false,
95
+ "tie_encoder_decoder": false,
96
+ "tie_word_embeddings": true,
97
+ "tokenizer_class": null,
98
+ "top_k": 50,
99
+ "top_p": 1.0,
100
+ "torch_dtype": null,
101
+ "torchscript": false,
102
+ "transformers_version": "4.46.0",
103
+ "typical_p": 1.0,
104
+ "use_bfloat16": false
105
+ },
106
+ "pretraining_tp": 1,
107
+ "qk_layer_norms": false,
108
+ "rms_norm_eps": 1e-05,
109
+ "rope_scaling": null,
110
+ "rope_theta": 273768.0,
111
+ "torch_dtype": "bfloat16",
112
+ "use_cache": true,
113
+ "use_resampler": false,
114
+ "vocab_size": 49155
115
+ },
116
+ "tie_word_embeddings": false,
117
+ "torch_dtype": "bfloat16",
118
+ "transformers.js_config": {
119
+ "dtype": {
120
+ "decoder_model_merged": "q4",
121
+ "embed_tokens": "auto",
122
+ "vision_encoder": "auto"
123
+ },
124
+ "kv_cache_dtype": {
125
+ "fp16": "float16",
126
+ "q4f16": "float16"
127
+ }
128
+ },
129
+ "transformers_version": "4.50.0",
130
+ "use_cache": false,
131
+ "vision_config": {
132
+ "attention_dropout": 0.0,
133
+ "hidden_act": "gelu_pytorch_tanh",
134
+ "hidden_size": 1152,
135
+ "image_size": 384,
136
+ "initializer_range": 0.02,
137
+ "intermediate_size": 4304,
138
+ "layer_norm_eps": 1e-06,
139
+ "max_image_size": {
140
+ "longest_edge": 384
141
+ },
142
+ "model_type": "idefics3_vision",
143
+ "num_attention_heads": 16,
144
+ "num_channels": 3,
145
+ "num_hidden_layers": 27,
146
+ "patch_size": 14,
147
+ "size": {
148
+ "longest_edge": 1920
149
+ },
150
+ "tie_word_embeddings": false,
151
+ "torch_dtype": "bfloat16"
152
+ },
153
+ "vocab_size": 49155
154
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 49154,
5
+ "pad_token_id": 2,
6
+ "transformers_version": "4.50.0"
7
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20575b4aec9ead7f5c9ff2d005b4315a9b6e0dc618235b865698c8b7968d0acf
3
+ size 4492630912
preprocessor_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_image_splitting": true,
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": "Idefics3ImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "max_image_size": {
20
+ "longest_edge": 384
21
+ },
22
+ "processor_class": "Idefics3Processor",
23
+ "resample": 1,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "longest_edge": 1536
27
+ }
28
+ }
processor_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_len": 81,
3
+ "processor_class": "Idefics3Processor"
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": "<|im_start|>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "eos_token": {
33
+ "content": "<end_of_utterance>",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ },
39
+ "pad_token": {
40
+ "content": "<|im_end|>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false
45
+ },
46
+ "unk_token": {
47
+ "content": "<|endoftext|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false
52
+ }
53
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<repo_name>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<reponame>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "5": {
45
+ "content": "<file_sep>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "6": {
53
+ "content": "<filename>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "7": {
61
+ "content": "<gh_stars>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "8": {
69
+ "content": "<issue_start>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "9": {
77
+ "content": "<issue_comment>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "10": {
85
+ "content": "<issue_closed>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "11": {
93
+ "content": "<jupyter_start>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "12": {
101
+ "content": "<jupyter_text>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "13": {
109
+ "content": "<jupyter_code>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "14": {
117
+ "content": "<jupyter_output>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": true
123
+ },
124
+ "15": {
125
+ "content": "<jupyter_script>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": true
131
+ },
132
+ "16": {
133
+ "content": "<empty_output>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": true
139
+ },
140
+ "49152": {
141
+ "content": "<fake_token_around_image>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": true
147
+ },
148
+ "49153": {
149
+ "content": "<image>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": true
155
+ },
156
+ "49154": {
157
+ "content": "<end_of_utterance>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": true
163
+ }
164
+ },
165
+ "additional_special_tokens": [
166
+ "<fake_token_around_image>",
167
+ "<image>",
168
+ "<end_of_utterance>"
169
+ ],
170
+ "bos_token": "<|im_start|>",
171
+ "chat_template": "<|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}",
172
+ "clean_up_tokenization_spaces": false,
173
+ "eos_token": "<end_of_utterance>",
174
+ "extra_special_tokens": {},
175
+ "legacy": false,
176
+ "model_max_length": 16384,
177
+ "pad_token": "<|im_end|>",
178
+ "processor_class": "Idefics3Processor",
179
+ "tokenizer_class": "GPT2Tokenizer",
180
+ "truncation_side": "left",
181
+ "unk_token": "<|endoftext|>",
182
+ "vocab_size": 49152
183
+ }