Upload folder using huggingface_hub
Browse files- README.md +24 -3
- added_tokens.json +130 -0
- chat_template.json +3 -0
- config.json +322 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- model.safetensors.index.json +478 -0
- preprocessor_config.json +28 -0
- processor_config.json +4 -0
- special_tokens_map.json +53 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1189 -0
- vocab.json +0 -0
- zero_to_fp32.py +760 -0
README.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model:
|
3 |
+
- HuggingFaceTB/SmolVLM-256M-Instruct
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
library_name: transformers
|
7 |
+
license: apache-2.0
|
8 |
+
pipeline_tag: image-text-to-text
|
9 |
+
tags:
|
10 |
+
- mlx
|
11 |
+
---
|
12 |
+
|
13 |
+
# ds4sd/SmolDocling-256M-preview-mlx-bf16
|
14 |
+
This model was converted to MLX format from [`ds4sd/SmolDocling-256M-preview`]() using mlx-vlm version **0.1.18**.
|
15 |
+
Refer to the [original model card](https://huggingface.co/ds4sd/SmolDocling-256M-preview) for more details on the model.
|
16 |
+
## Use with mlx
|
17 |
+
|
18 |
+
```bash
|
19 |
+
pip install -U mlx-vlm
|
20 |
+
```
|
21 |
+
|
22 |
+
```bash
|
23 |
+
python -m mlx_vlm.generate --model ds4sd/SmolDocling-256M-preview-mlx-bf16 --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>
|
24 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</caption>": 49192,
|
3 |
+
"</chart>": 49248,
|
4 |
+
"</checkbox_selected>": 49211,
|
5 |
+
"</checkbox_unselected>": 49213,
|
6 |
+
"</doctag>": 49230,
|
7 |
+
"</footnote>": 49195,
|
8 |
+
"</form>": 49215,
|
9 |
+
"</formula>": 49197,
|
10 |
+
"</group>": 49228,
|
11 |
+
"</key_": 49243,
|
12 |
+
"</key_value_region>": 49217,
|
13 |
+
"</list_item>": 49199,
|
14 |
+
"</ordered_list>": 49224,
|
15 |
+
"</otsl>": 49209,
|
16 |
+
"</page_footer>": 49201,
|
17 |
+
"</page_header>": 49203,
|
18 |
+
"</paragraph>": 49220,
|
19 |
+
"</picture>": 49205,
|
20 |
+
"</reference>": 49222,
|
21 |
+
"</section_header_level_": 49207,
|
22 |
+
"</smiles>": 49251,
|
23 |
+
"</unordered_list>": 49226,
|
24 |
+
"</value_": 49245,
|
25 |
+
"<caption>": 49191,
|
26 |
+
"<chart>": 49247,
|
27 |
+
"<checkbox_selected>": 49210,
|
28 |
+
"<checkbox_unselected>": 49212,
|
29 |
+
"<ched>": 49239,
|
30 |
+
"<doctag>": 49229,
|
31 |
+
"<ecel>": 49234,
|
32 |
+
"<end_of_utterance>": 49279,
|
33 |
+
"<fake_token_around_image>": 49189,
|
34 |
+
"<fcel>": 49233,
|
35 |
+
"<footnote>": 49193,
|
36 |
+
"<form>": 49214,
|
37 |
+
"<formula>": 49196,
|
38 |
+
"<global-img>": 49152,
|
39 |
+
"<group>": 49227,
|
40 |
+
"<image>": 49190,
|
41 |
+
"<key_": 49242,
|
42 |
+
"<key_value_region>": 49216,
|
43 |
+
"<lcel>": 49235,
|
44 |
+
"<link_": 49246,
|
45 |
+
"<list_item>": 49198,
|
46 |
+
"<loc_": 49218,
|
47 |
+
"<nl>": 49238,
|
48 |
+
"<ordered_list>": 49223,
|
49 |
+
"<otsl>": 49208,
|
50 |
+
"<page_": 49231,
|
51 |
+
"<page_break>": 49249,
|
52 |
+
"<page_footer>": 49200,
|
53 |
+
"<page_header>": 49202,
|
54 |
+
"<paragraph>": 49219,
|
55 |
+
"<picture>": 49204,
|
56 |
+
"<reference>": 49221,
|
57 |
+
"<rhed>": 49240,
|
58 |
+
"<row_1_col_1>": 49153,
|
59 |
+
"<row_1_col_2>": 49154,
|
60 |
+
"<row_1_col_3>": 49155,
|
61 |
+
"<row_1_col_4>": 49156,
|
62 |
+
"<row_1_col_5>": 49157,
|
63 |
+
"<row_1_col_6>": 49158,
|
64 |
+
"<row_2_col_1>": 49159,
|
65 |
+
"<row_2_col_2>": 49160,
|
66 |
+
"<row_2_col_3>": 49161,
|
67 |
+
"<row_2_col_4>": 49162,
|
68 |
+
"<row_2_col_5>": 49163,
|
69 |
+
"<row_2_col_6>": 49164,
|
70 |
+
"<row_3_col_1>": 49165,
|
71 |
+
"<row_3_col_2>": 49166,
|
72 |
+
"<row_3_col_3>": 49167,
|
73 |
+
"<row_3_col_4>": 49168,
|
74 |
+
"<row_3_col_5>": 49169,
|
75 |
+
"<row_3_col_6>": 49170,
|
76 |
+
"<row_4_col_1>": 49171,
|
77 |
+
"<row_4_col_2>": 49172,
|
78 |
+
"<row_4_col_3>": 49173,
|
79 |
+
"<row_4_col_4>": 49174,
|
80 |
+
"<row_4_col_5>": 49175,
|
81 |
+
"<row_4_col_6>": 49176,
|
82 |
+
"<row_5_col_1>": 49177,
|
83 |
+
"<row_5_col_2>": 49178,
|
84 |
+
"<row_5_col_3>": 49179,
|
85 |
+
"<row_5_col_4>": 49180,
|
86 |
+
"<row_5_col_5>": 49181,
|
87 |
+
"<row_5_col_6>": 49182,
|
88 |
+
"<row_6_col_1>": 49183,
|
89 |
+
"<row_6_col_2>": 49184,
|
90 |
+
"<row_6_col_3>": 49185,
|
91 |
+
"<row_6_col_4>": 49186,
|
92 |
+
"<row_6_col_5>": 49187,
|
93 |
+
"<row_6_col_6>": 49188,
|
94 |
+
"<section_header_level_": 49206,
|
95 |
+
"<smiles>": 49250,
|
96 |
+
"<text_break>": 49232,
|
97 |
+
"<ucel>": 49236,
|
98 |
+
"<unordered_list>": 49225,
|
99 |
+
"<value_": 49244,
|
100 |
+
"<xcel>": 49237,
|
101 |
+
"<|reserved_special_token_3|>": 49194,
|
102 |
+
"<|reserved_special_token_50|>": 49241,
|
103 |
+
"<|reserved_special_token_61|>": 49252,
|
104 |
+
"<|reserved_special_token_62|>": 49253,
|
105 |
+
"<|reserved_special_token_63|>": 49254,
|
106 |
+
"<|reserved_special_token_64|>": 49255,
|
107 |
+
"<|reserved_special_token_65|>": 49256,
|
108 |
+
"<|reserved_special_token_66|>": 49257,
|
109 |
+
"<|reserved_special_token_67|>": 49258,
|
110 |
+
"<|reserved_special_token_68|>": 49259,
|
111 |
+
"<|reserved_special_token_69|>": 49260,
|
112 |
+
"<|reserved_special_token_70|>": 49261,
|
113 |
+
"<|reserved_special_token_71|>": 49262,
|
114 |
+
"<|reserved_special_token_72|>": 49263,
|
115 |
+
"<|reserved_special_token_73|>": 49264,
|
116 |
+
"<|reserved_special_token_74|>": 49265,
|
117 |
+
"<|reserved_special_token_75|>": 49266,
|
118 |
+
"<|reserved_special_token_76|>": 49267,
|
119 |
+
"<|reserved_special_token_77|>": 49268,
|
120 |
+
"<|reserved_special_token_78|>": 49269,
|
121 |
+
"<|reserved_special_token_79|>": 49270,
|
122 |
+
"<|reserved_special_token_80|>": 49271,
|
123 |
+
"<|reserved_special_token_81|>": 49272,
|
124 |
+
"<|reserved_special_token_82|>": 49273,
|
125 |
+
"<|reserved_special_token_83|>": 49274,
|
126 |
+
"<|reserved_special_token_84|>": 49275,
|
127 |
+
"<|reserved_special_token_85|>": 49276,
|
128 |
+
"<|reserved_special_token_86|>": 49277,
|
129 |
+
"<|reserved_special_token_87|>": 49278
|
130 |
+
}
|
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,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
"bos_token_id": null,
|
10 |
+
"chunk_size_feed_forward": 0,
|
11 |
+
"cross_attention_hidden_size": null,
|
12 |
+
"decoder_start_token_id": null,
|
13 |
+
"diversity_penalty": 0.0,
|
14 |
+
"do_sample": false,
|
15 |
+
"early_stopping": false,
|
16 |
+
"encoder_no_repeat_ngram_size": 0,
|
17 |
+
"eos_token_id": null,
|
18 |
+
"exponential_decay_length_penalty": null,
|
19 |
+
"finetuning_task": null,
|
20 |
+
"forced_bos_token_id": null,
|
21 |
+
"forced_eos_token_id": null,
|
22 |
+
"id2label": {
|
23 |
+
"0": "LABEL_0",
|
24 |
+
"1": "LABEL_1"
|
25 |
+
},
|
26 |
+
"image_token_id": 49190,
|
27 |
+
"is_decoder": false,
|
28 |
+
"is_encoder_decoder": false,
|
29 |
+
"label2id": {
|
30 |
+
"LABEL_0": 0,
|
31 |
+
"LABEL_1": 1
|
32 |
+
},
|
33 |
+
"length_penalty": 1.0,
|
34 |
+
"max_length": 20,
|
35 |
+
"min_length": 0,
|
36 |
+
"model_type": "idefics3",
|
37 |
+
"no_repeat_ngram_size": 0,
|
38 |
+
"num_beam_groups": 1,
|
39 |
+
"num_beams": 1,
|
40 |
+
"num_return_sequences": 1,
|
41 |
+
"output_attentions": false,
|
42 |
+
"output_hidden_states": false,
|
43 |
+
"output_scores": false,
|
44 |
+
"pad_token_id": 128002,
|
45 |
+
"prefix": null,
|
46 |
+
"problem_type": null,
|
47 |
+
"pruned_heads": {},
|
48 |
+
"remove_invalid_values": false,
|
49 |
+
"repetition_penalty": 1.0,
|
50 |
+
"return_dict": true,
|
51 |
+
"return_dict_in_generate": false,
|
52 |
+
"scale_factor": 4,
|
53 |
+
"sep_token_id": null,
|
54 |
+
"suppress_tokens": null,
|
55 |
+
"task_specific_params": null,
|
56 |
+
"temperature": 1.0,
|
57 |
+
"text_config": {
|
58 |
+
"vocab_size": 49280,
|
59 |
+
"max_position_embeddings": 8192,
|
60 |
+
"hidden_size": 576,
|
61 |
+
"intermediate_size": 1536,
|
62 |
+
"num_hidden_layers": 30,
|
63 |
+
"num_attention_heads": 9,
|
64 |
+
"num_key_value_heads": 3,
|
65 |
+
"hidden_act": "silu",
|
66 |
+
"initializer_range": 0.041666666666666664,
|
67 |
+
"rms_norm_eps": 1e-05,
|
68 |
+
"pretraining_tp": 1,
|
69 |
+
"use_cache": true,
|
70 |
+
"rope_theta": 100000,
|
71 |
+
"rope_scaling": null,
|
72 |
+
"attention_bias": false,
|
73 |
+
"attention_dropout": 0.0,
|
74 |
+
"mlp_bias": false,
|
75 |
+
"head_dim": 64,
|
76 |
+
"return_dict": true,
|
77 |
+
"output_hidden_states": false,
|
78 |
+
"output_attentions": false,
|
79 |
+
"torchscript": false,
|
80 |
+
"torch_dtype": "bfloat16",
|
81 |
+
"use_bfloat16": false,
|
82 |
+
"tf_legacy_loss": false,
|
83 |
+
"pruned_heads": {},
|
84 |
+
"tie_word_embeddings": false,
|
85 |
+
"chunk_size_feed_forward": 0,
|
86 |
+
"is_encoder_decoder": false,
|
87 |
+
"is_decoder": false,
|
88 |
+
"cross_attention_hidden_size": null,
|
89 |
+
"add_cross_attention": false,
|
90 |
+
"tie_encoder_decoder": false,
|
91 |
+
"max_length": 20,
|
92 |
+
"min_length": 0,
|
93 |
+
"do_sample": false,
|
94 |
+
"early_stopping": false,
|
95 |
+
"num_beams": 1,
|
96 |
+
"num_beam_groups": 1,
|
97 |
+
"diversity_penalty": 0.0,
|
98 |
+
"temperature": 1.0,
|
99 |
+
"top_k": 50,
|
100 |
+
"top_p": 1.0,
|
101 |
+
"typical_p": 1.0,
|
102 |
+
"repetition_penalty": 1.0,
|
103 |
+
"length_penalty": 1.0,
|
104 |
+
"no_repeat_ngram_size": 0,
|
105 |
+
"encoder_no_repeat_ngram_size": 0,
|
106 |
+
"bad_words_ids": null,
|
107 |
+
"num_return_sequences": 1,
|
108 |
+
"output_scores": false,
|
109 |
+
"return_dict_in_generate": false,
|
110 |
+
"forced_bos_token_id": null,
|
111 |
+
"forced_eos_token_id": null,
|
112 |
+
"remove_invalid_values": false,
|
113 |
+
"exponential_decay_length_penalty": null,
|
114 |
+
"suppress_tokens": null,
|
115 |
+
"begin_suppress_tokens": null,
|
116 |
+
"architectures": [
|
117 |
+
"VLlama3ForCausalLM"
|
118 |
+
],
|
119 |
+
"finetuning_task": null,
|
120 |
+
"id2label": {
|
121 |
+
"0": "LABEL_0",
|
122 |
+
"1": "LABEL_1"
|
123 |
+
},
|
124 |
+
"label2id": {
|
125 |
+
"LABEL_0": 0,
|
126 |
+
"LABEL_1": 1
|
127 |
+
},
|
128 |
+
"tokenizer_class": null,
|
129 |
+
"prefix": null,
|
130 |
+
"bos_token_id": 1,
|
131 |
+
"pad_token_id": 2,
|
132 |
+
"eos_token_id": 2,
|
133 |
+
"sep_token_id": null,
|
134 |
+
"decoder_start_token_id": null,
|
135 |
+
"task_specific_params": null,
|
136 |
+
"problem_type": null,
|
137 |
+
"_name_or_path": "None",
|
138 |
+
"_attn_implementation_autoset": false,
|
139 |
+
"_flash_attn_2_enabled": true,
|
140 |
+
"is_llama_config": true,
|
141 |
+
"model_type": "llama",
|
142 |
+
"neftune_noise_alpha": 0.0,
|
143 |
+
"perceiver_config": {
|
144 |
+
"_attn_implementation_autoset": false,
|
145 |
+
"_name_or_path": "",
|
146 |
+
"add_cross_attention": false,
|
147 |
+
"architectures": null,
|
148 |
+
"attention_dropout": 0.0,
|
149 |
+
"bad_words_ids": null,
|
150 |
+
"begin_suppress_tokens": null,
|
151 |
+
"bos_token_id": null,
|
152 |
+
"chunk_size_feed_forward": 0,
|
153 |
+
"cross_attention_hidden_size": null,
|
154 |
+
"decoder_start_token_id": null,
|
155 |
+
"diversity_penalty": 0.0,
|
156 |
+
"do_sample": false,
|
157 |
+
"early_stopping": false,
|
158 |
+
"encoder_no_repeat_ngram_size": 0,
|
159 |
+
"eos_token_id": null,
|
160 |
+
"exponential_decay_length_penalty": null,
|
161 |
+
"finetuning_task": null,
|
162 |
+
"forced_bos_token_id": null,
|
163 |
+
"forced_eos_token_id": null,
|
164 |
+
"hidden_act": "silu",
|
165 |
+
"id2label": {
|
166 |
+
"0": "LABEL_0",
|
167 |
+
"1": "LABEL_1"
|
168 |
+
},
|
169 |
+
"is_decoder": false,
|
170 |
+
"is_encoder_decoder": false,
|
171 |
+
"label2id": {
|
172 |
+
"LABEL_0": 0,
|
173 |
+
"LABEL_1": 1
|
174 |
+
},
|
175 |
+
"length_penalty": 1.0,
|
176 |
+
"max_length": 20,
|
177 |
+
"min_length": 0,
|
178 |
+
"model_type": "vllama3",
|
179 |
+
"no_repeat_ngram_size": 0,
|
180 |
+
"num_beam_groups": 1,
|
181 |
+
"num_beams": 1,
|
182 |
+
"num_key_value_heads": 1,
|
183 |
+
"num_return_sequences": 1,
|
184 |
+
"output_attentions": false,
|
185 |
+
"output_hidden_states": false,
|
186 |
+
"output_scores": false,
|
187 |
+
"pad_token_id": null,
|
188 |
+
"prefix": null,
|
189 |
+
"problem_type": null,
|
190 |
+
"pruned_heads": {},
|
191 |
+
"qk_layer_norms_perceiver": false,
|
192 |
+
"remove_invalid_values": false,
|
193 |
+
"repetition_penalty": 1.0,
|
194 |
+
"resampler_depth": 6,
|
195 |
+
"resampler_head_dim": 96,
|
196 |
+
"resampler_n_heads": 16,
|
197 |
+
"resampler_n_latents": 64,
|
198 |
+
"return_dict": true,
|
199 |
+
"return_dict_in_generate": false,
|
200 |
+
"sep_token_id": null,
|
201 |
+
"suppress_tokens": null,
|
202 |
+
"task_specific_params": null,
|
203 |
+
"temperature": 1.0,
|
204 |
+
"tf_legacy_loss": false,
|
205 |
+
"tie_encoder_decoder": false,
|
206 |
+
"tie_word_embeddings": true,
|
207 |
+
"tokenizer_class": null,
|
208 |
+
"top_k": 50,
|
209 |
+
"top_p": 1.0,
|
210 |
+
"torch_dtype": null,
|
211 |
+
"torchscript": false,
|
212 |
+
"transformers_version": "4.46.0",
|
213 |
+
"typical_p": 1.0,
|
214 |
+
"use_bfloat16": false
|
215 |
+
},
|
216 |
+
"pixel_shuffle_factor": 4,
|
217 |
+
"qk_layer_norms": false,
|
218 |
+
"rope_interleaved": false,
|
219 |
+
"transformers.js_config": {
|
220 |
+
"kv_cache_dtype": {
|
221 |
+
"fp16": "float16",
|
222 |
+
"q4f16": "float16"
|
223 |
+
}
|
224 |
+
},
|
225 |
+
"use_resampler": false
|
226 |
+
},
|
227 |
+
"tf_legacy_loss": false,
|
228 |
+
"tie_encoder_decoder": false,
|
229 |
+
"tie_word_embeddings": false,
|
230 |
+
"tokenizer_class": null,
|
231 |
+
"top_k": 50,
|
232 |
+
"top_p": 1.0,
|
233 |
+
"torch_dtype": "bfloat16",
|
234 |
+
"torchscript": false,
|
235 |
+
"transformers_version": "4.49.0",
|
236 |
+
"typical_p": 1.0,
|
237 |
+
"use_bfloat16": false,
|
238 |
+
"use_cache": true,
|
239 |
+
"vision_config": {
|
240 |
+
"return_dict": true,
|
241 |
+
"output_hidden_states": false,
|
242 |
+
"output_attentions": false,
|
243 |
+
"torchscript": false,
|
244 |
+
"torch_dtype": "bfloat16",
|
245 |
+
"use_bfloat16": false,
|
246 |
+
"tf_legacy_loss": false,
|
247 |
+
"pruned_heads": {},
|
248 |
+
"tie_word_embeddings": false,
|
249 |
+
"chunk_size_feed_forward": 0,
|
250 |
+
"is_encoder_decoder": false,
|
251 |
+
"is_decoder": false,
|
252 |
+
"cross_attention_hidden_size": null,
|
253 |
+
"add_cross_attention": false,
|
254 |
+
"tie_encoder_decoder": false,
|
255 |
+
"max_length": 20,
|
256 |
+
"min_length": 0,
|
257 |
+
"do_sample": false,
|
258 |
+
"early_stopping": false,
|
259 |
+
"num_beams": 1,
|
260 |
+
"num_beam_groups": 1,
|
261 |
+
"diversity_penalty": 0.0,
|
262 |
+
"temperature": 1.0,
|
263 |
+
"top_k": 50,
|
264 |
+
"top_p": 1.0,
|
265 |
+
"typical_p": 1.0,
|
266 |
+
"repetition_penalty": 1.0,
|
267 |
+
"length_penalty": 1.0,
|
268 |
+
"no_repeat_ngram_size": 0,
|
269 |
+
"encoder_no_repeat_ngram_size": 0,
|
270 |
+
"bad_words_ids": null,
|
271 |
+
"num_return_sequences": 1,
|
272 |
+
"output_scores": false,
|
273 |
+
"return_dict_in_generate": false,
|
274 |
+
"forced_bos_token_id": null,
|
275 |
+
"forced_eos_token_id": null,
|
276 |
+
"remove_invalid_values": false,
|
277 |
+
"exponential_decay_length_penalty": null,
|
278 |
+
"suppress_tokens": null,
|
279 |
+
"begin_suppress_tokens": null,
|
280 |
+
"architectures": null,
|
281 |
+
"finetuning_task": null,
|
282 |
+
"id2label": {
|
283 |
+
"0": "LABEL_0",
|
284 |
+
"1": "LABEL_1"
|
285 |
+
},
|
286 |
+
"label2id": {
|
287 |
+
"LABEL_0": 0,
|
288 |
+
"LABEL_1": 1
|
289 |
+
},
|
290 |
+
"tokenizer_class": null,
|
291 |
+
"prefix": null,
|
292 |
+
"bos_token_id": null,
|
293 |
+
"pad_token_id": null,
|
294 |
+
"eos_token_id": null,
|
295 |
+
"sep_token_id": null,
|
296 |
+
"decoder_start_token_id": null,
|
297 |
+
"task_specific_params": null,
|
298 |
+
"problem_type": null,
|
299 |
+
"_name_or_path": "",
|
300 |
+
"_attn_implementation_autoset": false,
|
301 |
+
"max_image_size": {
|
302 |
+
"longest_edge": 512
|
303 |
+
},
|
304 |
+
"model_type": "idefics3_vision",
|
305 |
+
"size": {
|
306 |
+
"longest_edge": 2048
|
307 |
+
},
|
308 |
+
"use_base_siglip": true,
|
309 |
+
"hidden_size": 768,
|
310 |
+
"intermediate_size": 3072,
|
311 |
+
"num_hidden_layers": 12,
|
312 |
+
"num_attention_heads": 12,
|
313 |
+
"num_channels": 3,
|
314 |
+
"patch_size": 16,
|
315 |
+
"image_size": 512,
|
316 |
+
"attention_dropout": 0.0,
|
317 |
+
"layer_norm_eps": 1e-06,
|
318 |
+
"hidden_act": "gelu_pytorch_tanh",
|
319 |
+
"initializer_range": 0.02
|
320 |
+
},
|
321 |
+
"vocab_size": 49280
|
322 |
+
}
|
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:c7a39b5bdf18205a9c6fd0d2f1fc95bbaaea2cd014de43d6c6450e5c15441dbe
|
3 |
+
size 513026834
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,478 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 512969856
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"connector.modality_projection.proj.weight": "model.safetensors",
|
7 |
+
"language_model.embed_tokens.weight": "model.safetensors",
|
8 |
+
"language_model.layers.0.input_layernorm.weight": "model.safetensors",
|
9 |
+
"language_model.layers.0.mlp.down_proj.weight": "model.safetensors",
|
10 |
+
"language_model.layers.0.mlp.gate_proj.weight": "model.safetensors",
|
11 |
+
"language_model.layers.0.mlp.up_proj.weight": "model.safetensors",
|
12 |
+
"language_model.layers.0.post_attention_layernorm.weight": "model.safetensors",
|
13 |
+
"language_model.layers.0.self_attn.k_proj.weight": "model.safetensors",
|
14 |
+
"language_model.layers.0.self_attn.o_proj.weight": "model.safetensors",
|
15 |
+
"language_model.layers.0.self_attn.q_proj.weight": "model.safetensors",
|
16 |
+
"language_model.layers.0.self_attn.v_proj.weight": "model.safetensors",
|
17 |
+
"language_model.layers.1.input_layernorm.weight": "model.safetensors",
|
18 |
+
"language_model.layers.1.mlp.down_proj.weight": "model.safetensors",
|
19 |
+
"language_model.layers.1.mlp.gate_proj.weight": "model.safetensors",
|
20 |
+
"language_model.layers.1.mlp.up_proj.weight": "model.safetensors",
|
21 |
+
"language_model.layers.1.post_attention_layernorm.weight": "model.safetensors",
|
22 |
+
"language_model.layers.1.self_attn.k_proj.weight": "model.safetensors",
|
23 |
+
"language_model.layers.1.self_attn.o_proj.weight": "model.safetensors",
|
24 |
+
"language_model.layers.1.self_attn.q_proj.weight": "model.safetensors",
|
25 |
+
"language_model.layers.1.self_attn.v_proj.weight": "model.safetensors",
|
26 |
+
"language_model.layers.10.input_layernorm.weight": "model.safetensors",
|
27 |
+
"language_model.layers.10.mlp.down_proj.weight": "model.safetensors",
|
28 |
+
"language_model.layers.10.mlp.gate_proj.weight": "model.safetensors",
|
29 |
+
"language_model.layers.10.mlp.up_proj.weight": "model.safetensors",
|
30 |
+
"language_model.layers.10.post_attention_layernorm.weight": "model.safetensors",
|
31 |
+
"language_model.layers.10.self_attn.k_proj.weight": "model.safetensors",
|
32 |
+
"language_model.layers.10.self_attn.o_proj.weight": "model.safetensors",
|
33 |
+
"language_model.layers.10.self_attn.q_proj.weight": "model.safetensors",
|
34 |
+
"language_model.layers.10.self_attn.v_proj.weight": "model.safetensors",
|
35 |
+
"language_model.layers.11.input_layernorm.weight": "model.safetensors",
|
36 |
+
"language_model.layers.11.mlp.down_proj.weight": "model.safetensors",
|
37 |
+
"language_model.layers.11.mlp.gate_proj.weight": "model.safetensors",
|
38 |
+
"language_model.layers.11.mlp.up_proj.weight": "model.safetensors",
|
39 |
+
"language_model.layers.11.post_attention_layernorm.weight": "model.safetensors",
|
40 |
+
"language_model.layers.11.self_attn.k_proj.weight": "model.safetensors",
|
41 |
+
"language_model.layers.11.self_attn.o_proj.weight": "model.safetensors",
|
42 |
+
"language_model.layers.11.self_attn.q_proj.weight": "model.safetensors",
|
43 |
+
"language_model.layers.11.self_attn.v_proj.weight": "model.safetensors",
|
44 |
+
"language_model.layers.12.input_layernorm.weight": "model.safetensors",
|
45 |
+
"language_model.layers.12.mlp.down_proj.weight": "model.safetensors",
|
46 |
+
"language_model.layers.12.mlp.gate_proj.weight": "model.safetensors",
|
47 |
+
"language_model.layers.12.mlp.up_proj.weight": "model.safetensors",
|
48 |
+
"language_model.layers.12.post_attention_layernorm.weight": "model.safetensors",
|
49 |
+
"language_model.layers.12.self_attn.k_proj.weight": "model.safetensors",
|
50 |
+
"language_model.layers.12.self_attn.o_proj.weight": "model.safetensors",
|
51 |
+
"language_model.layers.12.self_attn.q_proj.weight": "model.safetensors",
|
52 |
+
"language_model.layers.12.self_attn.v_proj.weight": "model.safetensors",
|
53 |
+
"language_model.layers.13.input_layernorm.weight": "model.safetensors",
|
54 |
+
"language_model.layers.13.mlp.down_proj.weight": "model.safetensors",
|
55 |
+
"language_model.layers.13.mlp.gate_proj.weight": "model.safetensors",
|
56 |
+
"language_model.layers.13.mlp.up_proj.weight": "model.safetensors",
|
57 |
+
"language_model.layers.13.post_attention_layernorm.weight": "model.safetensors",
|
58 |
+
"language_model.layers.13.self_attn.k_proj.weight": "model.safetensors",
|
59 |
+
"language_model.layers.13.self_attn.o_proj.weight": "model.safetensors",
|
60 |
+
"language_model.layers.13.self_attn.q_proj.weight": "model.safetensors",
|
61 |
+
"language_model.layers.13.self_attn.v_proj.weight": "model.safetensors",
|
62 |
+
"language_model.layers.14.input_layernorm.weight": "model.safetensors",
|
63 |
+
"language_model.layers.14.mlp.down_proj.weight": "model.safetensors",
|
64 |
+
"language_model.layers.14.mlp.gate_proj.weight": "model.safetensors",
|
65 |
+
"language_model.layers.14.mlp.up_proj.weight": "model.safetensors",
|
66 |
+
"language_model.layers.14.post_attention_layernorm.weight": "model.safetensors",
|
67 |
+
"language_model.layers.14.self_attn.k_proj.weight": "model.safetensors",
|
68 |
+
"language_model.layers.14.self_attn.o_proj.weight": "model.safetensors",
|
69 |
+
"language_model.layers.14.self_attn.q_proj.weight": "model.safetensors",
|
70 |
+
"language_model.layers.14.self_attn.v_proj.weight": "model.safetensors",
|
71 |
+
"language_model.layers.15.input_layernorm.weight": "model.safetensors",
|
72 |
+
"language_model.layers.15.mlp.down_proj.weight": "model.safetensors",
|
73 |
+
"language_model.layers.15.mlp.gate_proj.weight": "model.safetensors",
|
74 |
+
"language_model.layers.15.mlp.up_proj.weight": "model.safetensors",
|
75 |
+
"language_model.layers.15.post_attention_layernorm.weight": "model.safetensors",
|
76 |
+
"language_model.layers.15.self_attn.k_proj.weight": "model.safetensors",
|
77 |
+
"language_model.layers.15.self_attn.o_proj.weight": "model.safetensors",
|
78 |
+
"language_model.layers.15.self_attn.q_proj.weight": "model.safetensors",
|
79 |
+
"language_model.layers.15.self_attn.v_proj.weight": "model.safetensors",
|
80 |
+
"language_model.layers.16.input_layernorm.weight": "model.safetensors",
|
81 |
+
"language_model.layers.16.mlp.down_proj.weight": "model.safetensors",
|
82 |
+
"language_model.layers.16.mlp.gate_proj.weight": "model.safetensors",
|
83 |
+
"language_model.layers.16.mlp.up_proj.weight": "model.safetensors",
|
84 |
+
"language_model.layers.16.post_attention_layernorm.weight": "model.safetensors",
|
85 |
+
"language_model.layers.16.self_attn.k_proj.weight": "model.safetensors",
|
86 |
+
"language_model.layers.16.self_attn.o_proj.weight": "model.safetensors",
|
87 |
+
"language_model.layers.16.self_attn.q_proj.weight": "model.safetensors",
|
88 |
+
"language_model.layers.16.self_attn.v_proj.weight": "model.safetensors",
|
89 |
+
"language_model.layers.17.input_layernorm.weight": "model.safetensors",
|
90 |
+
"language_model.layers.17.mlp.down_proj.weight": "model.safetensors",
|
91 |
+
"language_model.layers.17.mlp.gate_proj.weight": "model.safetensors",
|
92 |
+
"language_model.layers.17.mlp.up_proj.weight": "model.safetensors",
|
93 |
+
"language_model.layers.17.post_attention_layernorm.weight": "model.safetensors",
|
94 |
+
"language_model.layers.17.self_attn.k_proj.weight": "model.safetensors",
|
95 |
+
"language_model.layers.17.self_attn.o_proj.weight": "model.safetensors",
|
96 |
+
"language_model.layers.17.self_attn.q_proj.weight": "model.safetensors",
|
97 |
+
"language_model.layers.17.self_attn.v_proj.weight": "model.safetensors",
|
98 |
+
"language_model.layers.18.input_layernorm.weight": "model.safetensors",
|
99 |
+
"language_model.layers.18.mlp.down_proj.weight": "model.safetensors",
|
100 |
+
"language_model.layers.18.mlp.gate_proj.weight": "model.safetensors",
|
101 |
+
"language_model.layers.18.mlp.up_proj.weight": "model.safetensors",
|
102 |
+
"language_model.layers.18.post_attention_layernorm.weight": "model.safetensors",
|
103 |
+
"language_model.layers.18.self_attn.k_proj.weight": "model.safetensors",
|
104 |
+
"language_model.layers.18.self_attn.o_proj.weight": "model.safetensors",
|
105 |
+
"language_model.layers.18.self_attn.q_proj.weight": "model.safetensors",
|
106 |
+
"language_model.layers.18.self_attn.v_proj.weight": "model.safetensors",
|
107 |
+
"language_model.layers.19.input_layernorm.weight": "model.safetensors",
|
108 |
+
"language_model.layers.19.mlp.down_proj.weight": "model.safetensors",
|
109 |
+
"language_model.layers.19.mlp.gate_proj.weight": "model.safetensors",
|
110 |
+
"language_model.layers.19.mlp.up_proj.weight": "model.safetensors",
|
111 |
+
"language_model.layers.19.post_attention_layernorm.weight": "model.safetensors",
|
112 |
+
"language_model.layers.19.self_attn.k_proj.weight": "model.safetensors",
|
113 |
+
"language_model.layers.19.self_attn.o_proj.weight": "model.safetensors",
|
114 |
+
"language_model.layers.19.self_attn.q_proj.weight": "model.safetensors",
|
115 |
+
"language_model.layers.19.self_attn.v_proj.weight": "model.safetensors",
|
116 |
+
"language_model.layers.2.input_layernorm.weight": "model.safetensors",
|
117 |
+
"language_model.layers.2.mlp.down_proj.weight": "model.safetensors",
|
118 |
+
"language_model.layers.2.mlp.gate_proj.weight": "model.safetensors",
|
119 |
+
"language_model.layers.2.mlp.up_proj.weight": "model.safetensors",
|
120 |
+
"language_model.layers.2.post_attention_layernorm.weight": "model.safetensors",
|
121 |
+
"language_model.layers.2.self_attn.k_proj.weight": "model.safetensors",
|
122 |
+
"language_model.layers.2.self_attn.o_proj.weight": "model.safetensors",
|
123 |
+
"language_model.layers.2.self_attn.q_proj.weight": "model.safetensors",
|
124 |
+
"language_model.layers.2.self_attn.v_proj.weight": "model.safetensors",
|
125 |
+
"language_model.layers.20.input_layernorm.weight": "model.safetensors",
|
126 |
+
"language_model.layers.20.mlp.down_proj.weight": "model.safetensors",
|
127 |
+
"language_model.layers.20.mlp.gate_proj.weight": "model.safetensors",
|
128 |
+
"language_model.layers.20.mlp.up_proj.weight": "model.safetensors",
|
129 |
+
"language_model.layers.20.post_attention_layernorm.weight": "model.safetensors",
|
130 |
+
"language_model.layers.20.self_attn.k_proj.weight": "model.safetensors",
|
131 |
+
"language_model.layers.20.self_attn.o_proj.weight": "model.safetensors",
|
132 |
+
"language_model.layers.20.self_attn.q_proj.weight": "model.safetensors",
|
133 |
+
"language_model.layers.20.self_attn.v_proj.weight": "model.safetensors",
|
134 |
+
"language_model.layers.21.input_layernorm.weight": "model.safetensors",
|
135 |
+
"language_model.layers.21.mlp.down_proj.weight": "model.safetensors",
|
136 |
+
"language_model.layers.21.mlp.gate_proj.weight": "model.safetensors",
|
137 |
+
"language_model.layers.21.mlp.up_proj.weight": "model.safetensors",
|
138 |
+
"language_model.layers.21.post_attention_layernorm.weight": "model.safetensors",
|
139 |
+
"language_model.layers.21.self_attn.k_proj.weight": "model.safetensors",
|
140 |
+
"language_model.layers.21.self_attn.o_proj.weight": "model.safetensors",
|
141 |
+
"language_model.layers.21.self_attn.q_proj.weight": "model.safetensors",
|
142 |
+
"language_model.layers.21.self_attn.v_proj.weight": "model.safetensors",
|
143 |
+
"language_model.layers.22.input_layernorm.weight": "model.safetensors",
|
144 |
+
"language_model.layers.22.mlp.down_proj.weight": "model.safetensors",
|
145 |
+
"language_model.layers.22.mlp.gate_proj.weight": "model.safetensors",
|
146 |
+
"language_model.layers.22.mlp.up_proj.weight": "model.safetensors",
|
147 |
+
"language_model.layers.22.post_attention_layernorm.weight": "model.safetensors",
|
148 |
+
"language_model.layers.22.self_attn.k_proj.weight": "model.safetensors",
|
149 |
+
"language_model.layers.22.self_attn.o_proj.weight": "model.safetensors",
|
150 |
+
"language_model.layers.22.self_attn.q_proj.weight": "model.safetensors",
|
151 |
+
"language_model.layers.22.self_attn.v_proj.weight": "model.safetensors",
|
152 |
+
"language_model.layers.23.input_layernorm.weight": "model.safetensors",
|
153 |
+
"language_model.layers.23.mlp.down_proj.weight": "model.safetensors",
|
154 |
+
"language_model.layers.23.mlp.gate_proj.weight": "model.safetensors",
|
155 |
+
"language_model.layers.23.mlp.up_proj.weight": "model.safetensors",
|
156 |
+
"language_model.layers.23.post_attention_layernorm.weight": "model.safetensors",
|
157 |
+
"language_model.layers.23.self_attn.k_proj.weight": "model.safetensors",
|
158 |
+
"language_model.layers.23.self_attn.o_proj.weight": "model.safetensors",
|
159 |
+
"language_model.layers.23.self_attn.q_proj.weight": "model.safetensors",
|
160 |
+
"language_model.layers.23.self_attn.v_proj.weight": "model.safetensors",
|
161 |
+
"language_model.layers.24.input_layernorm.weight": "model.safetensors",
|
162 |
+
"language_model.layers.24.mlp.down_proj.weight": "model.safetensors",
|
163 |
+
"language_model.layers.24.mlp.gate_proj.weight": "model.safetensors",
|
164 |
+
"language_model.layers.24.mlp.up_proj.weight": "model.safetensors",
|
165 |
+
"language_model.layers.24.post_attention_layernorm.weight": "model.safetensors",
|
166 |
+
"language_model.layers.24.self_attn.k_proj.weight": "model.safetensors",
|
167 |
+
"language_model.layers.24.self_attn.o_proj.weight": "model.safetensors",
|
168 |
+
"language_model.layers.24.self_attn.q_proj.weight": "model.safetensors",
|
169 |
+
"language_model.layers.24.self_attn.v_proj.weight": "model.safetensors",
|
170 |
+
"language_model.layers.25.input_layernorm.weight": "model.safetensors",
|
171 |
+
"language_model.layers.25.mlp.down_proj.weight": "model.safetensors",
|
172 |
+
"language_model.layers.25.mlp.gate_proj.weight": "model.safetensors",
|
173 |
+
"language_model.layers.25.mlp.up_proj.weight": "model.safetensors",
|
174 |
+
"language_model.layers.25.post_attention_layernorm.weight": "model.safetensors",
|
175 |
+
"language_model.layers.25.self_attn.k_proj.weight": "model.safetensors",
|
176 |
+
"language_model.layers.25.self_attn.o_proj.weight": "model.safetensors",
|
177 |
+
"language_model.layers.25.self_attn.q_proj.weight": "model.safetensors",
|
178 |
+
"language_model.layers.25.self_attn.v_proj.weight": "model.safetensors",
|
179 |
+
"language_model.layers.26.input_layernorm.weight": "model.safetensors",
|
180 |
+
"language_model.layers.26.mlp.down_proj.weight": "model.safetensors",
|
181 |
+
"language_model.layers.26.mlp.gate_proj.weight": "model.safetensors",
|
182 |
+
"language_model.layers.26.mlp.up_proj.weight": "model.safetensors",
|
183 |
+
"language_model.layers.26.post_attention_layernorm.weight": "model.safetensors",
|
184 |
+
"language_model.layers.26.self_attn.k_proj.weight": "model.safetensors",
|
185 |
+
"language_model.layers.26.self_attn.o_proj.weight": "model.safetensors",
|
186 |
+
"language_model.layers.26.self_attn.q_proj.weight": "model.safetensors",
|
187 |
+
"language_model.layers.26.self_attn.v_proj.weight": "model.safetensors",
|
188 |
+
"language_model.layers.27.input_layernorm.weight": "model.safetensors",
|
189 |
+
"language_model.layers.27.mlp.down_proj.weight": "model.safetensors",
|
190 |
+
"language_model.layers.27.mlp.gate_proj.weight": "model.safetensors",
|
191 |
+
"language_model.layers.27.mlp.up_proj.weight": "model.safetensors",
|
192 |
+
"language_model.layers.27.post_attention_layernorm.weight": "model.safetensors",
|
193 |
+
"language_model.layers.27.self_attn.k_proj.weight": "model.safetensors",
|
194 |
+
"language_model.layers.27.self_attn.o_proj.weight": "model.safetensors",
|
195 |
+
"language_model.layers.27.self_attn.q_proj.weight": "model.safetensors",
|
196 |
+
"language_model.layers.27.self_attn.v_proj.weight": "model.safetensors",
|
197 |
+
"language_model.layers.28.input_layernorm.weight": "model.safetensors",
|
198 |
+
"language_model.layers.28.mlp.down_proj.weight": "model.safetensors",
|
199 |
+
"language_model.layers.28.mlp.gate_proj.weight": "model.safetensors",
|
200 |
+
"language_model.layers.28.mlp.up_proj.weight": "model.safetensors",
|
201 |
+
"language_model.layers.28.post_attention_layernorm.weight": "model.safetensors",
|
202 |
+
"language_model.layers.28.self_attn.k_proj.weight": "model.safetensors",
|
203 |
+
"language_model.layers.28.self_attn.o_proj.weight": "model.safetensors",
|
204 |
+
"language_model.layers.28.self_attn.q_proj.weight": "model.safetensors",
|
205 |
+
"language_model.layers.28.self_attn.v_proj.weight": "model.safetensors",
|
206 |
+
"language_model.layers.29.input_layernorm.weight": "model.safetensors",
|
207 |
+
"language_model.layers.29.mlp.down_proj.weight": "model.safetensors",
|
208 |
+
"language_model.layers.29.mlp.gate_proj.weight": "model.safetensors",
|
209 |
+
"language_model.layers.29.mlp.up_proj.weight": "model.safetensors",
|
210 |
+
"language_model.layers.29.post_attention_layernorm.weight": "model.safetensors",
|
211 |
+
"language_model.layers.29.self_attn.k_proj.weight": "model.safetensors",
|
212 |
+
"language_model.layers.29.self_attn.o_proj.weight": "model.safetensors",
|
213 |
+
"language_model.layers.29.self_attn.q_proj.weight": "model.safetensors",
|
214 |
+
"language_model.layers.29.self_attn.v_proj.weight": "model.safetensors",
|
215 |
+
"language_model.layers.3.input_layernorm.weight": "model.safetensors",
|
216 |
+
"language_model.layers.3.mlp.down_proj.weight": "model.safetensors",
|
217 |
+
"language_model.layers.3.mlp.gate_proj.weight": "model.safetensors",
|
218 |
+
"language_model.layers.3.mlp.up_proj.weight": "model.safetensors",
|
219 |
+
"language_model.layers.3.post_attention_layernorm.weight": "model.safetensors",
|
220 |
+
"language_model.layers.3.self_attn.k_proj.weight": "model.safetensors",
|
221 |
+
"language_model.layers.3.self_attn.o_proj.weight": "model.safetensors",
|
222 |
+
"language_model.layers.3.self_attn.q_proj.weight": "model.safetensors",
|
223 |
+
"language_model.layers.3.self_attn.v_proj.weight": "model.safetensors",
|
224 |
+
"language_model.layers.4.input_layernorm.weight": "model.safetensors",
|
225 |
+
"language_model.layers.4.mlp.down_proj.weight": "model.safetensors",
|
226 |
+
"language_model.layers.4.mlp.gate_proj.weight": "model.safetensors",
|
227 |
+
"language_model.layers.4.mlp.up_proj.weight": "model.safetensors",
|
228 |
+
"language_model.layers.4.post_attention_layernorm.weight": "model.safetensors",
|
229 |
+
"language_model.layers.4.self_attn.k_proj.weight": "model.safetensors",
|
230 |
+
"language_model.layers.4.self_attn.o_proj.weight": "model.safetensors",
|
231 |
+
"language_model.layers.4.self_attn.q_proj.weight": "model.safetensors",
|
232 |
+
"language_model.layers.4.self_attn.v_proj.weight": "model.safetensors",
|
233 |
+
"language_model.layers.5.input_layernorm.weight": "model.safetensors",
|
234 |
+
"language_model.layers.5.mlp.down_proj.weight": "model.safetensors",
|
235 |
+
"language_model.layers.5.mlp.gate_proj.weight": "model.safetensors",
|
236 |
+
"language_model.layers.5.mlp.up_proj.weight": "model.safetensors",
|
237 |
+
"language_model.layers.5.post_attention_layernorm.weight": "model.safetensors",
|
238 |
+
"language_model.layers.5.self_attn.k_proj.weight": "model.safetensors",
|
239 |
+
"language_model.layers.5.self_attn.o_proj.weight": "model.safetensors",
|
240 |
+
"language_model.layers.5.self_attn.q_proj.weight": "model.safetensors",
|
241 |
+
"language_model.layers.5.self_attn.v_proj.weight": "model.safetensors",
|
242 |
+
"language_model.layers.6.input_layernorm.weight": "model.safetensors",
|
243 |
+
"language_model.layers.6.mlp.down_proj.weight": "model.safetensors",
|
244 |
+
"language_model.layers.6.mlp.gate_proj.weight": "model.safetensors",
|
245 |
+
"language_model.layers.6.mlp.up_proj.weight": "model.safetensors",
|
246 |
+
"language_model.layers.6.post_attention_layernorm.weight": "model.safetensors",
|
247 |
+
"language_model.layers.6.self_attn.k_proj.weight": "model.safetensors",
|
248 |
+
"language_model.layers.6.self_attn.o_proj.weight": "model.safetensors",
|
249 |
+
"language_model.layers.6.self_attn.q_proj.weight": "model.safetensors",
|
250 |
+
"language_model.layers.6.self_attn.v_proj.weight": "model.safetensors",
|
251 |
+
"language_model.layers.7.input_layernorm.weight": "model.safetensors",
|
252 |
+
"language_model.layers.7.mlp.down_proj.weight": "model.safetensors",
|
253 |
+
"language_model.layers.7.mlp.gate_proj.weight": "model.safetensors",
|
254 |
+
"language_model.layers.7.mlp.up_proj.weight": "model.safetensors",
|
255 |
+
"language_model.layers.7.post_attention_layernorm.weight": "model.safetensors",
|
256 |
+
"language_model.layers.7.self_attn.k_proj.weight": "model.safetensors",
|
257 |
+
"language_model.layers.7.self_attn.o_proj.weight": "model.safetensors",
|
258 |
+
"language_model.layers.7.self_attn.q_proj.weight": "model.safetensors",
|
259 |
+
"language_model.layers.7.self_attn.v_proj.weight": "model.safetensors",
|
260 |
+
"language_model.layers.8.input_layernorm.weight": "model.safetensors",
|
261 |
+
"language_model.layers.8.mlp.down_proj.weight": "model.safetensors",
|
262 |
+
"language_model.layers.8.mlp.gate_proj.weight": "model.safetensors",
|
263 |
+
"language_model.layers.8.mlp.up_proj.weight": "model.safetensors",
|
264 |
+
"language_model.layers.8.post_attention_layernorm.weight": "model.safetensors",
|
265 |
+
"language_model.layers.8.self_attn.k_proj.weight": "model.safetensors",
|
266 |
+
"language_model.layers.8.self_attn.o_proj.weight": "model.safetensors",
|
267 |
+
"language_model.layers.8.self_attn.q_proj.weight": "model.safetensors",
|
268 |
+
"language_model.layers.8.self_attn.v_proj.weight": "model.safetensors",
|
269 |
+
"language_model.layers.9.input_layernorm.weight": "model.safetensors",
|
270 |
+
"language_model.layers.9.mlp.down_proj.weight": "model.safetensors",
|
271 |
+
"language_model.layers.9.mlp.gate_proj.weight": "model.safetensors",
|
272 |
+
"language_model.layers.9.mlp.up_proj.weight": "model.safetensors",
|
273 |
+
"language_model.layers.9.post_attention_layernorm.weight": "model.safetensors",
|
274 |
+
"language_model.layers.9.self_attn.k_proj.weight": "model.safetensors",
|
275 |
+
"language_model.layers.9.self_attn.o_proj.weight": "model.safetensors",
|
276 |
+
"language_model.layers.9.self_attn.q_proj.weight": "model.safetensors",
|
277 |
+
"language_model.layers.9.self_attn.v_proj.weight": "model.safetensors",
|
278 |
+
"language_model.lm_head.weight": "model.safetensors",
|
279 |
+
"language_model.norm.weight": "model.safetensors",
|
280 |
+
"vision_model.embeddings.patch_embedding.bias": "model.safetensors",
|
281 |
+
"vision_model.embeddings.patch_embedding.weight": "model.safetensors",
|
282 |
+
"vision_model.embeddings.position_embedding.weight": "model.safetensors",
|
283 |
+
"vision_model.encoder.layers.0.layer_norm1.bias": "model.safetensors",
|
284 |
+
"vision_model.encoder.layers.0.layer_norm1.weight": "model.safetensors",
|
285 |
+
"vision_model.encoder.layers.0.layer_norm2.bias": "model.safetensors",
|
286 |
+
"vision_model.encoder.layers.0.layer_norm2.weight": "model.safetensors",
|
287 |
+
"vision_model.encoder.layers.0.mlp.fc1.bias": "model.safetensors",
|
288 |
+
"vision_model.encoder.layers.0.mlp.fc1.weight": "model.safetensors",
|
289 |
+
"vision_model.encoder.layers.0.mlp.fc2.bias": "model.safetensors",
|
290 |
+
"vision_model.encoder.layers.0.mlp.fc2.weight": "model.safetensors",
|
291 |
+
"vision_model.encoder.layers.0.self_attn.k_proj.bias": "model.safetensors",
|
292 |
+
"vision_model.encoder.layers.0.self_attn.k_proj.weight": "model.safetensors",
|
293 |
+
"vision_model.encoder.layers.0.self_attn.out_proj.bias": "model.safetensors",
|
294 |
+
"vision_model.encoder.layers.0.self_attn.out_proj.weight": "model.safetensors",
|
295 |
+
"vision_model.encoder.layers.0.self_attn.q_proj.bias": "model.safetensors",
|
296 |
+
"vision_model.encoder.layers.0.self_attn.q_proj.weight": "model.safetensors",
|
297 |
+
"vision_model.encoder.layers.0.self_attn.v_proj.bias": "model.safetensors",
|
298 |
+
"vision_model.encoder.layers.0.self_attn.v_proj.weight": "model.safetensors",
|
299 |
+
"vision_model.encoder.layers.1.layer_norm1.bias": "model.safetensors",
|
300 |
+
"vision_model.encoder.layers.1.layer_norm1.weight": "model.safetensors",
|
301 |
+
"vision_model.encoder.layers.1.layer_norm2.bias": "model.safetensors",
|
302 |
+
"vision_model.encoder.layers.1.layer_norm2.weight": "model.safetensors",
|
303 |
+
"vision_model.encoder.layers.1.mlp.fc1.bias": "model.safetensors",
|
304 |
+
"vision_model.encoder.layers.1.mlp.fc1.weight": "model.safetensors",
|
305 |
+
"vision_model.encoder.layers.1.mlp.fc2.bias": "model.safetensors",
|
306 |
+
"vision_model.encoder.layers.1.mlp.fc2.weight": "model.safetensors",
|
307 |
+
"vision_model.encoder.layers.1.self_attn.k_proj.bias": "model.safetensors",
|
308 |
+
"vision_model.encoder.layers.1.self_attn.k_proj.weight": "model.safetensors",
|
309 |
+
"vision_model.encoder.layers.1.self_attn.out_proj.bias": "model.safetensors",
|
310 |
+
"vision_model.encoder.layers.1.self_attn.out_proj.weight": "model.safetensors",
|
311 |
+
"vision_model.encoder.layers.1.self_attn.q_proj.bias": "model.safetensors",
|
312 |
+
"vision_model.encoder.layers.1.self_attn.q_proj.weight": "model.safetensors",
|
313 |
+
"vision_model.encoder.layers.1.self_attn.v_proj.bias": "model.safetensors",
|
314 |
+
"vision_model.encoder.layers.1.self_attn.v_proj.weight": "model.safetensors",
|
315 |
+
"vision_model.encoder.layers.10.layer_norm1.bias": "model.safetensors",
|
316 |
+
"vision_model.encoder.layers.10.layer_norm1.weight": "model.safetensors",
|
317 |
+
"vision_model.encoder.layers.10.layer_norm2.bias": "model.safetensors",
|
318 |
+
"vision_model.encoder.layers.10.layer_norm2.weight": "model.safetensors",
|
319 |
+
"vision_model.encoder.layers.10.mlp.fc1.bias": "model.safetensors",
|
320 |
+
"vision_model.encoder.layers.10.mlp.fc1.weight": "model.safetensors",
|
321 |
+
"vision_model.encoder.layers.10.mlp.fc2.bias": "model.safetensors",
|
322 |
+
"vision_model.encoder.layers.10.mlp.fc2.weight": "model.safetensors",
|
323 |
+
"vision_model.encoder.layers.10.self_attn.k_proj.bias": "model.safetensors",
|
324 |
+
"vision_model.encoder.layers.10.self_attn.k_proj.weight": "model.safetensors",
|
325 |
+
"vision_model.encoder.layers.10.self_attn.out_proj.bias": "model.safetensors",
|
326 |
+
"vision_model.encoder.layers.10.self_attn.out_proj.weight": "model.safetensors",
|
327 |
+
"vision_model.encoder.layers.10.self_attn.q_proj.bias": "model.safetensors",
|
328 |
+
"vision_model.encoder.layers.10.self_attn.q_proj.weight": "model.safetensors",
|
329 |
+
"vision_model.encoder.layers.10.self_attn.v_proj.bias": "model.safetensors",
|
330 |
+
"vision_model.encoder.layers.10.self_attn.v_proj.weight": "model.safetensors",
|
331 |
+
"vision_model.encoder.layers.11.layer_norm1.bias": "model.safetensors",
|
332 |
+
"vision_model.encoder.layers.11.layer_norm1.weight": "model.safetensors",
|
333 |
+
"vision_model.encoder.layers.11.layer_norm2.bias": "model.safetensors",
|
334 |
+
"vision_model.encoder.layers.11.layer_norm2.weight": "model.safetensors",
|
335 |
+
"vision_model.encoder.layers.11.mlp.fc1.bias": "model.safetensors",
|
336 |
+
"vision_model.encoder.layers.11.mlp.fc1.weight": "model.safetensors",
|
337 |
+
"vision_model.encoder.layers.11.mlp.fc2.bias": "model.safetensors",
|
338 |
+
"vision_model.encoder.layers.11.mlp.fc2.weight": "model.safetensors",
|
339 |
+
"vision_model.encoder.layers.11.self_attn.k_proj.bias": "model.safetensors",
|
340 |
+
"vision_model.encoder.layers.11.self_attn.k_proj.weight": "model.safetensors",
|
341 |
+
"vision_model.encoder.layers.11.self_attn.out_proj.bias": "model.safetensors",
|
342 |
+
"vision_model.encoder.layers.11.self_attn.out_proj.weight": "model.safetensors",
|
343 |
+
"vision_model.encoder.layers.11.self_attn.q_proj.bias": "model.safetensors",
|
344 |
+
"vision_model.encoder.layers.11.self_attn.q_proj.weight": "model.safetensors",
|
345 |
+
"vision_model.encoder.layers.11.self_attn.v_proj.bias": "model.safetensors",
|
346 |
+
"vision_model.encoder.layers.11.self_attn.v_proj.weight": "model.safetensors",
|
347 |
+
"vision_model.encoder.layers.2.layer_norm1.bias": "model.safetensors",
|
348 |
+
"vision_model.encoder.layers.2.layer_norm1.weight": "model.safetensors",
|
349 |
+
"vision_model.encoder.layers.2.layer_norm2.bias": "model.safetensors",
|
350 |
+
"vision_model.encoder.layers.2.layer_norm2.weight": "model.safetensors",
|
351 |
+
"vision_model.encoder.layers.2.mlp.fc1.bias": "model.safetensors",
|
352 |
+
"vision_model.encoder.layers.2.mlp.fc1.weight": "model.safetensors",
|
353 |
+
"vision_model.encoder.layers.2.mlp.fc2.bias": "model.safetensors",
|
354 |
+
"vision_model.encoder.layers.2.mlp.fc2.weight": "model.safetensors",
|
355 |
+
"vision_model.encoder.layers.2.self_attn.k_proj.bias": "model.safetensors",
|
356 |
+
"vision_model.encoder.layers.2.self_attn.k_proj.weight": "model.safetensors",
|
357 |
+
"vision_model.encoder.layers.2.self_attn.out_proj.bias": "model.safetensors",
|
358 |
+
"vision_model.encoder.layers.2.self_attn.out_proj.weight": "model.safetensors",
|
359 |
+
"vision_model.encoder.layers.2.self_attn.q_proj.bias": "model.safetensors",
|
360 |
+
"vision_model.encoder.layers.2.self_attn.q_proj.weight": "model.safetensors",
|
361 |
+
"vision_model.encoder.layers.2.self_attn.v_proj.bias": "model.safetensors",
|
362 |
+
"vision_model.encoder.layers.2.self_attn.v_proj.weight": "model.safetensors",
|
363 |
+
"vision_model.encoder.layers.3.layer_norm1.bias": "model.safetensors",
|
364 |
+
"vision_model.encoder.layers.3.layer_norm1.weight": "model.safetensors",
|
365 |
+
"vision_model.encoder.layers.3.layer_norm2.bias": "model.safetensors",
|
366 |
+
"vision_model.encoder.layers.3.layer_norm2.weight": "model.safetensors",
|
367 |
+
"vision_model.encoder.layers.3.mlp.fc1.bias": "model.safetensors",
|
368 |
+
"vision_model.encoder.layers.3.mlp.fc1.weight": "model.safetensors",
|
369 |
+
"vision_model.encoder.layers.3.mlp.fc2.bias": "model.safetensors",
|
370 |
+
"vision_model.encoder.layers.3.mlp.fc2.weight": "model.safetensors",
|
371 |
+
"vision_model.encoder.layers.3.self_attn.k_proj.bias": "model.safetensors",
|
372 |
+
"vision_model.encoder.layers.3.self_attn.k_proj.weight": "model.safetensors",
|
373 |
+
"vision_model.encoder.layers.3.self_attn.out_proj.bias": "model.safetensors",
|
374 |
+
"vision_model.encoder.layers.3.self_attn.out_proj.weight": "model.safetensors",
|
375 |
+
"vision_model.encoder.layers.3.self_attn.q_proj.bias": "model.safetensors",
|
376 |
+
"vision_model.encoder.layers.3.self_attn.q_proj.weight": "model.safetensors",
|
377 |
+
"vision_model.encoder.layers.3.self_attn.v_proj.bias": "model.safetensors",
|
378 |
+
"vision_model.encoder.layers.3.self_attn.v_proj.weight": "model.safetensors",
|
379 |
+
"vision_model.encoder.layers.4.layer_norm1.bias": "model.safetensors",
|
380 |
+
"vision_model.encoder.layers.4.layer_norm1.weight": "model.safetensors",
|
381 |
+
"vision_model.encoder.layers.4.layer_norm2.bias": "model.safetensors",
|
382 |
+
"vision_model.encoder.layers.4.layer_norm2.weight": "model.safetensors",
|
383 |
+
"vision_model.encoder.layers.4.mlp.fc1.bias": "model.safetensors",
|
384 |
+
"vision_model.encoder.layers.4.mlp.fc1.weight": "model.safetensors",
|
385 |
+
"vision_model.encoder.layers.4.mlp.fc2.bias": "model.safetensors",
|
386 |
+
"vision_model.encoder.layers.4.mlp.fc2.weight": "model.safetensors",
|
387 |
+
"vision_model.encoder.layers.4.self_attn.k_proj.bias": "model.safetensors",
|
388 |
+
"vision_model.encoder.layers.4.self_attn.k_proj.weight": "model.safetensors",
|
389 |
+
"vision_model.encoder.layers.4.self_attn.out_proj.bias": "model.safetensors",
|
390 |
+
"vision_model.encoder.layers.4.self_attn.out_proj.weight": "model.safetensors",
|
391 |
+
"vision_model.encoder.layers.4.self_attn.q_proj.bias": "model.safetensors",
|
392 |
+
"vision_model.encoder.layers.4.self_attn.q_proj.weight": "model.safetensors",
|
393 |
+
"vision_model.encoder.layers.4.self_attn.v_proj.bias": "model.safetensors",
|
394 |
+
"vision_model.encoder.layers.4.self_attn.v_proj.weight": "model.safetensors",
|
395 |
+
"vision_model.encoder.layers.5.layer_norm1.bias": "model.safetensors",
|
396 |
+
"vision_model.encoder.layers.5.layer_norm1.weight": "model.safetensors",
|
397 |
+
"vision_model.encoder.layers.5.layer_norm2.bias": "model.safetensors",
|
398 |
+
"vision_model.encoder.layers.5.layer_norm2.weight": "model.safetensors",
|
399 |
+
"vision_model.encoder.layers.5.mlp.fc1.bias": "model.safetensors",
|
400 |
+
"vision_model.encoder.layers.5.mlp.fc1.weight": "model.safetensors",
|
401 |
+
"vision_model.encoder.layers.5.mlp.fc2.bias": "model.safetensors",
|
402 |
+
"vision_model.encoder.layers.5.mlp.fc2.weight": "model.safetensors",
|
403 |
+
"vision_model.encoder.layers.5.self_attn.k_proj.bias": "model.safetensors",
|
404 |
+
"vision_model.encoder.layers.5.self_attn.k_proj.weight": "model.safetensors",
|
405 |
+
"vision_model.encoder.layers.5.self_attn.out_proj.bias": "model.safetensors",
|
406 |
+
"vision_model.encoder.layers.5.self_attn.out_proj.weight": "model.safetensors",
|
407 |
+
"vision_model.encoder.layers.5.self_attn.q_proj.bias": "model.safetensors",
|
408 |
+
"vision_model.encoder.layers.5.self_attn.q_proj.weight": "model.safetensors",
|
409 |
+
"vision_model.encoder.layers.5.self_attn.v_proj.bias": "model.safetensors",
|
410 |
+
"vision_model.encoder.layers.5.self_attn.v_proj.weight": "model.safetensors",
|
411 |
+
"vision_model.encoder.layers.6.layer_norm1.bias": "model.safetensors",
|
412 |
+
"vision_model.encoder.layers.6.layer_norm1.weight": "model.safetensors",
|
413 |
+
"vision_model.encoder.layers.6.layer_norm2.bias": "model.safetensors",
|
414 |
+
"vision_model.encoder.layers.6.layer_norm2.weight": "model.safetensors",
|
415 |
+
"vision_model.encoder.layers.6.mlp.fc1.bias": "model.safetensors",
|
416 |
+
"vision_model.encoder.layers.6.mlp.fc1.weight": "model.safetensors",
|
417 |
+
"vision_model.encoder.layers.6.mlp.fc2.bias": "model.safetensors",
|
418 |
+
"vision_model.encoder.layers.6.mlp.fc2.weight": "model.safetensors",
|
419 |
+
"vision_model.encoder.layers.6.self_attn.k_proj.bias": "model.safetensors",
|
420 |
+
"vision_model.encoder.layers.6.self_attn.k_proj.weight": "model.safetensors",
|
421 |
+
"vision_model.encoder.layers.6.self_attn.out_proj.bias": "model.safetensors",
|
422 |
+
"vision_model.encoder.layers.6.self_attn.out_proj.weight": "model.safetensors",
|
423 |
+
"vision_model.encoder.layers.6.self_attn.q_proj.bias": "model.safetensors",
|
424 |
+
"vision_model.encoder.layers.6.self_attn.q_proj.weight": "model.safetensors",
|
425 |
+
"vision_model.encoder.layers.6.self_attn.v_proj.bias": "model.safetensors",
|
426 |
+
"vision_model.encoder.layers.6.self_attn.v_proj.weight": "model.safetensors",
|
427 |
+
"vision_model.encoder.layers.7.layer_norm1.bias": "model.safetensors",
|
428 |
+
"vision_model.encoder.layers.7.layer_norm1.weight": "model.safetensors",
|
429 |
+
"vision_model.encoder.layers.7.layer_norm2.bias": "model.safetensors",
|
430 |
+
"vision_model.encoder.layers.7.layer_norm2.weight": "model.safetensors",
|
431 |
+
"vision_model.encoder.layers.7.mlp.fc1.bias": "model.safetensors",
|
432 |
+
"vision_model.encoder.layers.7.mlp.fc1.weight": "model.safetensors",
|
433 |
+
"vision_model.encoder.layers.7.mlp.fc2.bias": "model.safetensors",
|
434 |
+
"vision_model.encoder.layers.7.mlp.fc2.weight": "model.safetensors",
|
435 |
+
"vision_model.encoder.layers.7.self_attn.k_proj.bias": "model.safetensors",
|
436 |
+
"vision_model.encoder.layers.7.self_attn.k_proj.weight": "model.safetensors",
|
437 |
+
"vision_model.encoder.layers.7.self_attn.out_proj.bias": "model.safetensors",
|
438 |
+
"vision_model.encoder.layers.7.self_attn.out_proj.weight": "model.safetensors",
|
439 |
+
"vision_model.encoder.layers.7.self_attn.q_proj.bias": "model.safetensors",
|
440 |
+
"vision_model.encoder.layers.7.self_attn.q_proj.weight": "model.safetensors",
|
441 |
+
"vision_model.encoder.layers.7.self_attn.v_proj.bias": "model.safetensors",
|
442 |
+
"vision_model.encoder.layers.7.self_attn.v_proj.weight": "model.safetensors",
|
443 |
+
"vision_model.encoder.layers.8.layer_norm1.bias": "model.safetensors",
|
444 |
+
"vision_model.encoder.layers.8.layer_norm1.weight": "model.safetensors",
|
445 |
+
"vision_model.encoder.layers.8.layer_norm2.bias": "model.safetensors",
|
446 |
+
"vision_model.encoder.layers.8.layer_norm2.weight": "model.safetensors",
|
447 |
+
"vision_model.encoder.layers.8.mlp.fc1.bias": "model.safetensors",
|
448 |
+
"vision_model.encoder.layers.8.mlp.fc1.weight": "model.safetensors",
|
449 |
+
"vision_model.encoder.layers.8.mlp.fc2.bias": "model.safetensors",
|
450 |
+
"vision_model.encoder.layers.8.mlp.fc2.weight": "model.safetensors",
|
451 |
+
"vision_model.encoder.layers.8.self_attn.k_proj.bias": "model.safetensors",
|
452 |
+
"vision_model.encoder.layers.8.self_attn.k_proj.weight": "model.safetensors",
|
453 |
+
"vision_model.encoder.layers.8.self_attn.out_proj.bias": "model.safetensors",
|
454 |
+
"vision_model.encoder.layers.8.self_attn.out_proj.weight": "model.safetensors",
|
455 |
+
"vision_model.encoder.layers.8.self_attn.q_proj.bias": "model.safetensors",
|
456 |
+
"vision_model.encoder.layers.8.self_attn.q_proj.weight": "model.safetensors",
|
457 |
+
"vision_model.encoder.layers.8.self_attn.v_proj.bias": "model.safetensors",
|
458 |
+
"vision_model.encoder.layers.8.self_attn.v_proj.weight": "model.safetensors",
|
459 |
+
"vision_model.encoder.layers.9.layer_norm1.bias": "model.safetensors",
|
460 |
+
"vision_model.encoder.layers.9.layer_norm1.weight": "model.safetensors",
|
461 |
+
"vision_model.encoder.layers.9.layer_norm2.bias": "model.safetensors",
|
462 |
+
"vision_model.encoder.layers.9.layer_norm2.weight": "model.safetensors",
|
463 |
+
"vision_model.encoder.layers.9.mlp.fc1.bias": "model.safetensors",
|
464 |
+
"vision_model.encoder.layers.9.mlp.fc1.weight": "model.safetensors",
|
465 |
+
"vision_model.encoder.layers.9.mlp.fc2.bias": "model.safetensors",
|
466 |
+
"vision_model.encoder.layers.9.mlp.fc2.weight": "model.safetensors",
|
467 |
+
"vision_model.encoder.layers.9.self_attn.k_proj.bias": "model.safetensors",
|
468 |
+
"vision_model.encoder.layers.9.self_attn.k_proj.weight": "model.safetensors",
|
469 |
+
"vision_model.encoder.layers.9.self_attn.out_proj.bias": "model.safetensors",
|
470 |
+
"vision_model.encoder.layers.9.self_attn.out_proj.weight": "model.safetensors",
|
471 |
+
"vision_model.encoder.layers.9.self_attn.q_proj.bias": "model.safetensors",
|
472 |
+
"vision_model.encoder.layers.9.self_attn.q_proj.weight": "model.safetensors",
|
473 |
+
"vision_model.encoder.layers.9.self_attn.v_proj.bias": "model.safetensors",
|
474 |
+
"vision_model.encoder.layers.9.self_attn.v_proj.weight": "model.safetensors",
|
475 |
+
"vision_model.post_layernorm.bias": "model.safetensors",
|
476 |
+
"vision_model.post_layernorm.weight": "model.safetensors"
|
477 |
+
}
|
478 |
+
}
|
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": 512
|
21 |
+
},
|
22 |
+
"processor_class": "Idefics3Processor",
|
23 |
+
"resample": 1,
|
24 |
+
"rescale_factor": 0.00392156862745098,
|
25 |
+
"size": {
|
26 |
+
"longest_edge": 2048
|
27 |
+
}
|
28 |
+
}
|
processor_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"image_seq_len": 64,
|
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": "<|im_end|>",
|
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.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,1189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "<global-img>",
|
142 |
+
"lstrip": false,
|
143 |
+
"normalized": false,
|
144 |
+
"rstrip": false,
|
145 |
+
"single_word": false,
|
146 |
+
"special": true
|
147 |
+
},
|
148 |
+
"49153": {
|
149 |
+
"content": "<row_1_col_1>",
|
150 |
+
"lstrip": false,
|
151 |
+
"normalized": false,
|
152 |
+
"rstrip": false,
|
153 |
+
"single_word": false,
|
154 |
+
"special": true
|
155 |
+
},
|
156 |
+
"49154": {
|
157 |
+
"content": "<row_1_col_2>",
|
158 |
+
"lstrip": false,
|
159 |
+
"normalized": false,
|
160 |
+
"rstrip": false,
|
161 |
+
"single_word": false,
|
162 |
+
"special": true
|
163 |
+
},
|
164 |
+
"49155": {
|
165 |
+
"content": "<row_1_col_3>",
|
166 |
+
"lstrip": false,
|
167 |
+
"normalized": false,
|
168 |
+
"rstrip": false,
|
169 |
+
"single_word": false,
|
170 |
+
"special": true
|
171 |
+
},
|
172 |
+
"49156": {
|
173 |
+
"content": "<row_1_col_4>",
|
174 |
+
"lstrip": false,
|
175 |
+
"normalized": false,
|
176 |
+
"rstrip": false,
|
177 |
+
"single_word": false,
|
178 |
+
"special": true
|
179 |
+
},
|
180 |
+
"49157": {
|
181 |
+
"content": "<row_1_col_5>",
|
182 |
+
"lstrip": false,
|
183 |
+
"normalized": false,
|
184 |
+
"rstrip": false,
|
185 |
+
"single_word": false,
|
186 |
+
"special": true
|
187 |
+
},
|
188 |
+
"49158": {
|
189 |
+
"content": "<row_1_col_6>",
|
190 |
+
"lstrip": false,
|
191 |
+
"normalized": false,
|
192 |
+
"rstrip": false,
|
193 |
+
"single_word": false,
|
194 |
+
"special": true
|
195 |
+
},
|
196 |
+
"49159": {
|
197 |
+
"content": "<row_2_col_1>",
|
198 |
+
"lstrip": false,
|
199 |
+
"normalized": false,
|
200 |
+
"rstrip": false,
|
201 |
+
"single_word": false,
|
202 |
+
"special": true
|
203 |
+
},
|
204 |
+
"49160": {
|
205 |
+
"content": "<row_2_col_2>",
|
206 |
+
"lstrip": false,
|
207 |
+
"normalized": false,
|
208 |
+
"rstrip": false,
|
209 |
+
"single_word": false,
|
210 |
+
"special": true
|
211 |
+
},
|
212 |
+
"49161": {
|
213 |
+
"content": "<row_2_col_3>",
|
214 |
+
"lstrip": false,
|
215 |
+
"normalized": false,
|
216 |
+
"rstrip": false,
|
217 |
+
"single_word": false,
|
218 |
+
"special": true
|
219 |
+
},
|
220 |
+
"49162": {
|
221 |
+
"content": "<row_2_col_4>",
|
222 |
+
"lstrip": false,
|
223 |
+
"normalized": false,
|
224 |
+
"rstrip": false,
|
225 |
+
"single_word": false,
|
226 |
+
"special": true
|
227 |
+
},
|
228 |
+
"49163": {
|
229 |
+
"content": "<row_2_col_5>",
|
230 |
+
"lstrip": false,
|
231 |
+
"normalized": false,
|
232 |
+
"rstrip": false,
|
233 |
+
"single_word": false,
|
234 |
+
"special": true
|
235 |
+
},
|
236 |
+
"49164": {
|
237 |
+
"content": "<row_2_col_6>",
|
238 |
+
"lstrip": false,
|
239 |
+
"normalized": false,
|
240 |
+
"rstrip": false,
|
241 |
+
"single_word": false,
|
242 |
+
"special": true
|
243 |
+
},
|
244 |
+
"49165": {
|
245 |
+
"content": "<row_3_col_1>",
|
246 |
+
"lstrip": false,
|
247 |
+
"normalized": false,
|
248 |
+
"rstrip": false,
|
249 |
+
"single_word": false,
|
250 |
+
"special": true
|
251 |
+
},
|
252 |
+
"49166": {
|
253 |
+
"content": "<row_3_col_2>",
|
254 |
+
"lstrip": false,
|
255 |
+
"normalized": false,
|
256 |
+
"rstrip": false,
|
257 |
+
"single_word": false,
|
258 |
+
"special": true
|
259 |
+
},
|
260 |
+
"49167": {
|
261 |
+
"content": "<row_3_col_3>",
|
262 |
+
"lstrip": false,
|
263 |
+
"normalized": false,
|
264 |
+
"rstrip": false,
|
265 |
+
"single_word": false,
|
266 |
+
"special": true
|
267 |
+
},
|
268 |
+
"49168": {
|
269 |
+
"content": "<row_3_col_4>",
|
270 |
+
"lstrip": false,
|
271 |
+
"normalized": false,
|
272 |
+
"rstrip": false,
|
273 |
+
"single_word": false,
|
274 |
+
"special": true
|
275 |
+
},
|
276 |
+
"49169": {
|
277 |
+
"content": "<row_3_col_5>",
|
278 |
+
"lstrip": false,
|
279 |
+
"normalized": false,
|
280 |
+
"rstrip": false,
|
281 |
+
"single_word": false,
|
282 |
+
"special": true
|
283 |
+
},
|
284 |
+
"49170": {
|
285 |
+
"content": "<row_3_col_6>",
|
286 |
+
"lstrip": false,
|
287 |
+
"normalized": false,
|
288 |
+
"rstrip": false,
|
289 |
+
"single_word": false,
|
290 |
+
"special": true
|
291 |
+
},
|
292 |
+
"49171": {
|
293 |
+
"content": "<row_4_col_1>",
|
294 |
+
"lstrip": false,
|
295 |
+
"normalized": false,
|
296 |
+
"rstrip": false,
|
297 |
+
"single_word": false,
|
298 |
+
"special": true
|
299 |
+
},
|
300 |
+
"49172": {
|
301 |
+
"content": "<row_4_col_2>",
|
302 |
+
"lstrip": false,
|
303 |
+
"normalized": false,
|
304 |
+
"rstrip": false,
|
305 |
+
"single_word": false,
|
306 |
+
"special": true
|
307 |
+
},
|
308 |
+
"49173": {
|
309 |
+
"content": "<row_4_col_3>",
|
310 |
+
"lstrip": false,
|
311 |
+
"normalized": false,
|
312 |
+
"rstrip": false,
|
313 |
+
"single_word": false,
|
314 |
+
"special": true
|
315 |
+
},
|
316 |
+
"49174": {
|
317 |
+
"content": "<row_4_col_4>",
|
318 |
+
"lstrip": false,
|
319 |
+
"normalized": false,
|
320 |
+
"rstrip": false,
|
321 |
+
"single_word": false,
|
322 |
+
"special": true
|
323 |
+
},
|
324 |
+
"49175": {
|
325 |
+
"content": "<row_4_col_5>",
|
326 |
+
"lstrip": false,
|
327 |
+
"normalized": false,
|
328 |
+
"rstrip": false,
|
329 |
+
"single_word": false,
|
330 |
+
"special": true
|
331 |
+
},
|
332 |
+
"49176": {
|
333 |
+
"content": "<row_4_col_6>",
|
334 |
+
"lstrip": false,
|
335 |
+
"normalized": false,
|
336 |
+
"rstrip": false,
|
337 |
+
"single_word": false,
|
338 |
+
"special": true
|
339 |
+
},
|
340 |
+
"49177": {
|
341 |
+
"content": "<row_5_col_1>",
|
342 |
+
"lstrip": false,
|
343 |
+
"normalized": false,
|
344 |
+
"rstrip": false,
|
345 |
+
"single_word": false,
|
346 |
+
"special": true
|
347 |
+
},
|
348 |
+
"49178": {
|
349 |
+
"content": "<row_5_col_2>",
|
350 |
+
"lstrip": false,
|
351 |
+
"normalized": false,
|
352 |
+
"rstrip": false,
|
353 |
+
"single_word": false,
|
354 |
+
"special": true
|
355 |
+
},
|
356 |
+
"49179": {
|
357 |
+
"content": "<row_5_col_3>",
|
358 |
+
"lstrip": false,
|
359 |
+
"normalized": false,
|
360 |
+
"rstrip": false,
|
361 |
+
"single_word": false,
|
362 |
+
"special": true
|
363 |
+
},
|
364 |
+
"49180": {
|
365 |
+
"content": "<row_5_col_4>",
|
366 |
+
"lstrip": false,
|
367 |
+
"normalized": false,
|
368 |
+
"rstrip": false,
|
369 |
+
"single_word": false,
|
370 |
+
"special": true
|
371 |
+
},
|
372 |
+
"49181": {
|
373 |
+
"content": "<row_5_col_5>",
|
374 |
+
"lstrip": false,
|
375 |
+
"normalized": false,
|
376 |
+
"rstrip": false,
|
377 |
+
"single_word": false,
|
378 |
+
"special": true
|
379 |
+
},
|
380 |
+
"49182": {
|
381 |
+
"content": "<row_5_col_6>",
|
382 |
+
"lstrip": false,
|
383 |
+
"normalized": false,
|
384 |
+
"rstrip": false,
|
385 |
+
"single_word": false,
|
386 |
+
"special": true
|
387 |
+
},
|
388 |
+
"49183": {
|
389 |
+
"content": "<row_6_col_1>",
|
390 |
+
"lstrip": false,
|
391 |
+
"normalized": false,
|
392 |
+
"rstrip": false,
|
393 |
+
"single_word": false,
|
394 |
+
"special": true
|
395 |
+
},
|
396 |
+
"49184": {
|
397 |
+
"content": "<row_6_col_2>",
|
398 |
+
"lstrip": false,
|
399 |
+
"normalized": false,
|
400 |
+
"rstrip": false,
|
401 |
+
"single_word": false,
|
402 |
+
"special": true
|
403 |
+
},
|
404 |
+
"49185": {
|
405 |
+
"content": "<row_6_col_3>",
|
406 |
+
"lstrip": false,
|
407 |
+
"normalized": false,
|
408 |
+
"rstrip": false,
|
409 |
+
"single_word": false,
|
410 |
+
"special": true
|
411 |
+
},
|
412 |
+
"49186": {
|
413 |
+
"content": "<row_6_col_4>",
|
414 |
+
"lstrip": false,
|
415 |
+
"normalized": false,
|
416 |
+
"rstrip": false,
|
417 |
+
"single_word": false,
|
418 |
+
"special": true
|
419 |
+
},
|
420 |
+
"49187": {
|
421 |
+
"content": "<row_6_col_5>",
|
422 |
+
"lstrip": false,
|
423 |
+
"normalized": false,
|
424 |
+
"rstrip": false,
|
425 |
+
"single_word": false,
|
426 |
+
"special": true
|
427 |
+
},
|
428 |
+
"49188": {
|
429 |
+
"content": "<row_6_col_6>",
|
430 |
+
"lstrip": false,
|
431 |
+
"normalized": false,
|
432 |
+
"rstrip": false,
|
433 |
+
"single_word": false,
|
434 |
+
"special": true
|
435 |
+
},
|
436 |
+
"49189": {
|
437 |
+
"content": "<fake_token_around_image>",
|
438 |
+
"lstrip": false,
|
439 |
+
"normalized": false,
|
440 |
+
"rstrip": false,
|
441 |
+
"single_word": false,
|
442 |
+
"special": true
|
443 |
+
},
|
444 |
+
"49190": {
|
445 |
+
"content": "<image>",
|
446 |
+
"lstrip": false,
|
447 |
+
"normalized": false,
|
448 |
+
"rstrip": false,
|
449 |
+
"single_word": false,
|
450 |
+
"special": true
|
451 |
+
},
|
452 |
+
"49191": {
|
453 |
+
"content": "<caption>",
|
454 |
+
"lstrip": false,
|
455 |
+
"normalized": false,
|
456 |
+
"rstrip": false,
|
457 |
+
"single_word": false,
|
458 |
+
"special": true
|
459 |
+
},
|
460 |
+
"49192": {
|
461 |
+
"content": "</caption>",
|
462 |
+
"lstrip": false,
|
463 |
+
"normalized": false,
|
464 |
+
"rstrip": false,
|
465 |
+
"single_word": false,
|
466 |
+
"special": true
|
467 |
+
},
|
468 |
+
"49193": {
|
469 |
+
"content": "<footnote>",
|
470 |
+
"lstrip": false,
|
471 |
+
"normalized": false,
|
472 |
+
"rstrip": false,
|
473 |
+
"single_word": false,
|
474 |
+
"special": true
|
475 |
+
},
|
476 |
+
"49194": {
|
477 |
+
"content": "<|reserved_special_token_3|>",
|
478 |
+
"lstrip": false,
|
479 |
+
"normalized": false,
|
480 |
+
"rstrip": false,
|
481 |
+
"single_word": false,
|
482 |
+
"special": true
|
483 |
+
},
|
484 |
+
"49195": {
|
485 |
+
"content": "</footnote>",
|
486 |
+
"lstrip": false,
|
487 |
+
"normalized": false,
|
488 |
+
"rstrip": false,
|
489 |
+
"single_word": false,
|
490 |
+
"special": true
|
491 |
+
},
|
492 |
+
"49196": {
|
493 |
+
"content": "<formula>",
|
494 |
+
"lstrip": false,
|
495 |
+
"normalized": false,
|
496 |
+
"rstrip": false,
|
497 |
+
"single_word": false,
|
498 |
+
"special": true
|
499 |
+
},
|
500 |
+
"49197": {
|
501 |
+
"content": "</formula>",
|
502 |
+
"lstrip": false,
|
503 |
+
"normalized": false,
|
504 |
+
"rstrip": false,
|
505 |
+
"single_word": false,
|
506 |
+
"special": true
|
507 |
+
},
|
508 |
+
"49198": {
|
509 |
+
"content": "<list_item>",
|
510 |
+
"lstrip": false,
|
511 |
+
"normalized": false,
|
512 |
+
"rstrip": false,
|
513 |
+
"single_word": false,
|
514 |
+
"special": true
|
515 |
+
},
|
516 |
+
"49199": {
|
517 |
+
"content": "</list_item>",
|
518 |
+
"lstrip": false,
|
519 |
+
"normalized": false,
|
520 |
+
"rstrip": false,
|
521 |
+
"single_word": false,
|
522 |
+
"special": true
|
523 |
+
},
|
524 |
+
"49200": {
|
525 |
+
"content": "<page_footer>",
|
526 |
+
"lstrip": false,
|
527 |
+
"normalized": false,
|
528 |
+
"rstrip": false,
|
529 |
+
"single_word": false,
|
530 |
+
"special": true
|
531 |
+
},
|
532 |
+
"49201": {
|
533 |
+
"content": "</page_footer>",
|
534 |
+
"lstrip": false,
|
535 |
+
"normalized": false,
|
536 |
+
"rstrip": false,
|
537 |
+
"single_word": false,
|
538 |
+
"special": true
|
539 |
+
},
|
540 |
+
"49202": {
|
541 |
+
"content": "<page_header>",
|
542 |
+
"lstrip": false,
|
543 |
+
"normalized": false,
|
544 |
+
"rstrip": false,
|
545 |
+
"single_word": false,
|
546 |
+
"special": true
|
547 |
+
},
|
548 |
+
"49203": {
|
549 |
+
"content": "</page_header>",
|
550 |
+
"lstrip": false,
|
551 |
+
"normalized": false,
|
552 |
+
"rstrip": false,
|
553 |
+
"single_word": false,
|
554 |
+
"special": true
|
555 |
+
},
|
556 |
+
"49204": {
|
557 |
+
"content": "<picture>",
|
558 |
+
"lstrip": false,
|
559 |
+
"normalized": false,
|
560 |
+
"rstrip": false,
|
561 |
+
"single_word": false,
|
562 |
+
"special": true
|
563 |
+
},
|
564 |
+
"49205": {
|
565 |
+
"content": "</picture>",
|
566 |
+
"lstrip": false,
|
567 |
+
"normalized": false,
|
568 |
+
"rstrip": false,
|
569 |
+
"single_word": false,
|
570 |
+
"special": true
|
571 |
+
},
|
572 |
+
"49206": {
|
573 |
+
"content": "<section_header_level_",
|
574 |
+
"lstrip": false,
|
575 |
+
"normalized": false,
|
576 |
+
"rstrip": false,
|
577 |
+
"single_word": false,
|
578 |
+
"special": true
|
579 |
+
},
|
580 |
+
"49207": {
|
581 |
+
"content": "</section_header_level_",
|
582 |
+
"lstrip": false,
|
583 |
+
"normalized": false,
|
584 |
+
"rstrip": false,
|
585 |
+
"single_word": false,
|
586 |
+
"special": true
|
587 |
+
},
|
588 |
+
"49208": {
|
589 |
+
"content": "<otsl>",
|
590 |
+
"lstrip": false,
|
591 |
+
"normalized": false,
|
592 |
+
"rstrip": false,
|
593 |
+
"single_word": false,
|
594 |
+
"special": true
|
595 |
+
},
|
596 |
+
"49209": {
|
597 |
+
"content": "</otsl>",
|
598 |
+
"lstrip": false,
|
599 |
+
"normalized": false,
|
600 |
+
"rstrip": false,
|
601 |
+
"single_word": false,
|
602 |
+
"special": true
|
603 |
+
},
|
604 |
+
"49210": {
|
605 |
+
"content": "<checkbox_selected>",
|
606 |
+
"lstrip": false,
|
607 |
+
"normalized": false,
|
608 |
+
"rstrip": false,
|
609 |
+
"single_word": false,
|
610 |
+
"special": true
|
611 |
+
},
|
612 |
+
"49211": {
|
613 |
+
"content": "</checkbox_selected>",
|
614 |
+
"lstrip": false,
|
615 |
+
"normalized": false,
|
616 |
+
"rstrip": false,
|
617 |
+
"single_word": false,
|
618 |
+
"special": true
|
619 |
+
},
|
620 |
+
"49212": {
|
621 |
+
"content": "<checkbox_unselected>",
|
622 |
+
"lstrip": false,
|
623 |
+
"normalized": false,
|
624 |
+
"rstrip": false,
|
625 |
+
"single_word": false,
|
626 |
+
"special": true
|
627 |
+
},
|
628 |
+
"49213": {
|
629 |
+
"content": "</checkbox_unselected>",
|
630 |
+
"lstrip": false,
|
631 |
+
"normalized": false,
|
632 |
+
"rstrip": false,
|
633 |
+
"single_word": false,
|
634 |
+
"special": true
|
635 |
+
},
|
636 |
+
"49214": {
|
637 |
+
"content": "<form>",
|
638 |
+
"lstrip": false,
|
639 |
+
"normalized": false,
|
640 |
+
"rstrip": false,
|
641 |
+
"single_word": false,
|
642 |
+
"special": true
|
643 |
+
},
|
644 |
+
"49215": {
|
645 |
+
"content": "</form>",
|
646 |
+
"lstrip": false,
|
647 |
+
"normalized": false,
|
648 |
+
"rstrip": false,
|
649 |
+
"single_word": false,
|
650 |
+
"special": true
|
651 |
+
},
|
652 |
+
"49216": {
|
653 |
+
"content": "<key_value_region>",
|
654 |
+
"lstrip": false,
|
655 |
+
"normalized": false,
|
656 |
+
"rstrip": false,
|
657 |
+
"single_word": false,
|
658 |
+
"special": true
|
659 |
+
},
|
660 |
+
"49217": {
|
661 |
+
"content": "</key_value_region>",
|
662 |
+
"lstrip": false,
|
663 |
+
"normalized": false,
|
664 |
+
"rstrip": false,
|
665 |
+
"single_word": false,
|
666 |
+
"special": true
|
667 |
+
},
|
668 |
+
"49218": {
|
669 |
+
"content": "<loc_",
|
670 |
+
"lstrip": false,
|
671 |
+
"normalized": false,
|
672 |
+
"rstrip": false,
|
673 |
+
"single_word": false,
|
674 |
+
"special": true
|
675 |
+
},
|
676 |
+
"49219": {
|
677 |
+
"content": "<paragraph>",
|
678 |
+
"lstrip": false,
|
679 |
+
"normalized": false,
|
680 |
+
"rstrip": false,
|
681 |
+
"single_word": false,
|
682 |
+
"special": true
|
683 |
+
},
|
684 |
+
"49220": {
|
685 |
+
"content": "</paragraph>",
|
686 |
+
"lstrip": false,
|
687 |
+
"normalized": false,
|
688 |
+
"rstrip": false,
|
689 |
+
"single_word": false,
|
690 |
+
"special": true
|
691 |
+
},
|
692 |
+
"49221": {
|
693 |
+
"content": "<reference>",
|
694 |
+
"lstrip": false,
|
695 |
+
"normalized": false,
|
696 |
+
"rstrip": false,
|
697 |
+
"single_word": false,
|
698 |
+
"special": true
|
699 |
+
},
|
700 |
+
"49222": {
|
701 |
+
"content": "</reference>",
|
702 |
+
"lstrip": false,
|
703 |
+
"normalized": false,
|
704 |
+
"rstrip": false,
|
705 |
+
"single_word": false,
|
706 |
+
"special": true
|
707 |
+
},
|
708 |
+
"49223": {
|
709 |
+
"content": "<ordered_list>",
|
710 |
+
"lstrip": false,
|
711 |
+
"normalized": false,
|
712 |
+
"rstrip": false,
|
713 |
+
"single_word": false,
|
714 |
+
"special": true
|
715 |
+
},
|
716 |
+
"49224": {
|
717 |
+
"content": "</ordered_list>",
|
718 |
+
"lstrip": false,
|
719 |
+
"normalized": false,
|
720 |
+
"rstrip": false,
|
721 |
+
"single_word": false,
|
722 |
+
"special": true
|
723 |
+
},
|
724 |
+
"49225": {
|
725 |
+
"content": "<unordered_list>",
|
726 |
+
"lstrip": false,
|
727 |
+
"normalized": false,
|
728 |
+
"rstrip": false,
|
729 |
+
"single_word": false,
|
730 |
+
"special": true
|
731 |
+
},
|
732 |
+
"49226": {
|
733 |
+
"content": "</unordered_list>",
|
734 |
+
"lstrip": false,
|
735 |
+
"normalized": false,
|
736 |
+
"rstrip": false,
|
737 |
+
"single_word": false,
|
738 |
+
"special": true
|
739 |
+
},
|
740 |
+
"49227": {
|
741 |
+
"content": "<group>",
|
742 |
+
"lstrip": false,
|
743 |
+
"normalized": false,
|
744 |
+
"rstrip": false,
|
745 |
+
"single_word": false,
|
746 |
+
"special": true
|
747 |
+
},
|
748 |
+
"49228": {
|
749 |
+
"content": "</group>",
|
750 |
+
"lstrip": false,
|
751 |
+
"normalized": false,
|
752 |
+
"rstrip": false,
|
753 |
+
"single_word": false,
|
754 |
+
"special": true
|
755 |
+
},
|
756 |
+
"49229": {
|
757 |
+
"content": "<doctag>",
|
758 |
+
"lstrip": false,
|
759 |
+
"normalized": false,
|
760 |
+
"rstrip": false,
|
761 |
+
"single_word": false,
|
762 |
+
"special": true
|
763 |
+
},
|
764 |
+
"49230": {
|
765 |
+
"content": "</doctag>",
|
766 |
+
"lstrip": false,
|
767 |
+
"normalized": false,
|
768 |
+
"rstrip": false,
|
769 |
+
"single_word": false,
|
770 |
+
"special": true
|
771 |
+
},
|
772 |
+
"49231": {
|
773 |
+
"content": "<page_",
|
774 |
+
"lstrip": false,
|
775 |
+
"normalized": false,
|
776 |
+
"rstrip": false,
|
777 |
+
"single_word": false,
|
778 |
+
"special": true
|
779 |
+
},
|
780 |
+
"49232": {
|
781 |
+
"content": "<text_break>",
|
782 |
+
"lstrip": false,
|
783 |
+
"normalized": false,
|
784 |
+
"rstrip": false,
|
785 |
+
"single_word": false,
|
786 |
+
"special": true
|
787 |
+
},
|
788 |
+
"49233": {
|
789 |
+
"content": "<fcel>",
|
790 |
+
"lstrip": false,
|
791 |
+
"normalized": false,
|
792 |
+
"rstrip": false,
|
793 |
+
"single_word": false,
|
794 |
+
"special": true
|
795 |
+
},
|
796 |
+
"49234": {
|
797 |
+
"content": "<ecel>",
|
798 |
+
"lstrip": false,
|
799 |
+
"normalized": false,
|
800 |
+
"rstrip": false,
|
801 |
+
"single_word": false,
|
802 |
+
"special": true
|
803 |
+
},
|
804 |
+
"49235": {
|
805 |
+
"content": "<lcel>",
|
806 |
+
"lstrip": false,
|
807 |
+
"normalized": false,
|
808 |
+
"rstrip": false,
|
809 |
+
"single_word": false,
|
810 |
+
"special": true
|
811 |
+
},
|
812 |
+
"49236": {
|
813 |
+
"content": "<ucel>",
|
814 |
+
"lstrip": false,
|
815 |
+
"normalized": false,
|
816 |
+
"rstrip": false,
|
817 |
+
"single_word": false,
|
818 |
+
"special": true
|
819 |
+
},
|
820 |
+
"49237": {
|
821 |
+
"content": "<xcel>",
|
822 |
+
"lstrip": false,
|
823 |
+
"normalized": false,
|
824 |
+
"rstrip": false,
|
825 |
+
"single_word": false,
|
826 |
+
"special": true
|
827 |
+
},
|
828 |
+
"49238": {
|
829 |
+
"content": "<nl>",
|
830 |
+
"lstrip": false,
|
831 |
+
"normalized": false,
|
832 |
+
"rstrip": false,
|
833 |
+
"single_word": false,
|
834 |
+
"special": true
|
835 |
+
},
|
836 |
+
"49239": {
|
837 |
+
"content": "<ched>",
|
838 |
+
"lstrip": false,
|
839 |
+
"normalized": false,
|
840 |
+
"rstrip": false,
|
841 |
+
"single_word": false,
|
842 |
+
"special": true
|
843 |
+
},
|
844 |
+
"49240": {
|
845 |
+
"content": "<rhed>",
|
846 |
+
"lstrip": false,
|
847 |
+
"normalized": false,
|
848 |
+
"rstrip": false,
|
849 |
+
"single_word": false,
|
850 |
+
"special": true
|
851 |
+
},
|
852 |
+
"49241": {
|
853 |
+
"content": "<|reserved_special_token_50|>",
|
854 |
+
"lstrip": false,
|
855 |
+
"normalized": false,
|
856 |
+
"rstrip": false,
|
857 |
+
"single_word": false,
|
858 |
+
"special": true
|
859 |
+
},
|
860 |
+
"49242": {
|
861 |
+
"content": "<key_",
|
862 |
+
"lstrip": false,
|
863 |
+
"normalized": false,
|
864 |
+
"rstrip": false,
|
865 |
+
"single_word": false,
|
866 |
+
"special": true
|
867 |
+
},
|
868 |
+
"49243": {
|
869 |
+
"content": "</key_",
|
870 |
+
"lstrip": false,
|
871 |
+
"normalized": false,
|
872 |
+
"rstrip": false,
|
873 |
+
"single_word": false,
|
874 |
+
"special": true
|
875 |
+
},
|
876 |
+
"49244": {
|
877 |
+
"content": "<value_",
|
878 |
+
"lstrip": false,
|
879 |
+
"normalized": false,
|
880 |
+
"rstrip": false,
|
881 |
+
"single_word": false,
|
882 |
+
"special": true
|
883 |
+
},
|
884 |
+
"49245": {
|
885 |
+
"content": "</value_",
|
886 |
+
"lstrip": false,
|
887 |
+
"normalized": false,
|
888 |
+
"rstrip": false,
|
889 |
+
"single_word": false,
|
890 |
+
"special": true
|
891 |
+
},
|
892 |
+
"49246": {
|
893 |
+
"content": "<link_",
|
894 |
+
"lstrip": false,
|
895 |
+
"normalized": false,
|
896 |
+
"rstrip": false,
|
897 |
+
"single_word": false,
|
898 |
+
"special": true
|
899 |
+
},
|
900 |
+
"49247": {
|
901 |
+
"content": "<chart>",
|
902 |
+
"lstrip": false,
|
903 |
+
"normalized": false,
|
904 |
+
"rstrip": false,
|
905 |
+
"single_word": false,
|
906 |
+
"special": true
|
907 |
+
},
|
908 |
+
"49248": {
|
909 |
+
"content": "</chart>",
|
910 |
+
"lstrip": false,
|
911 |
+
"normalized": false,
|
912 |
+
"rstrip": false,
|
913 |
+
"single_word": false,
|
914 |
+
"special": true
|
915 |
+
},
|
916 |
+
"49249": {
|
917 |
+
"content": "<page_break>",
|
918 |
+
"lstrip": false,
|
919 |
+
"normalized": false,
|
920 |
+
"rstrip": false,
|
921 |
+
"single_word": false,
|
922 |
+
"special": true
|
923 |
+
},
|
924 |
+
"49250": {
|
925 |
+
"content": "<smiles>",
|
926 |
+
"lstrip": false,
|
927 |
+
"normalized": false,
|
928 |
+
"rstrip": false,
|
929 |
+
"single_word": false,
|
930 |
+
"special": true
|
931 |
+
},
|
932 |
+
"49251": {
|
933 |
+
"content": "</smiles>",
|
934 |
+
"lstrip": false,
|
935 |
+
"normalized": false,
|
936 |
+
"rstrip": false,
|
937 |
+
"single_word": false,
|
938 |
+
"special": true
|
939 |
+
},
|
940 |
+
"49252": {
|
941 |
+
"content": "<|reserved_special_token_61|>",
|
942 |
+
"lstrip": false,
|
943 |
+
"normalized": false,
|
944 |
+
"rstrip": false,
|
945 |
+
"single_word": false,
|
946 |
+
"special": true
|
947 |
+
},
|
948 |
+
"49253": {
|
949 |
+
"content": "<|reserved_special_token_62|>",
|
950 |
+
"lstrip": false,
|
951 |
+
"normalized": false,
|
952 |
+
"rstrip": false,
|
953 |
+
"single_word": false,
|
954 |
+
"special": true
|
955 |
+
},
|
956 |
+
"49254": {
|
957 |
+
"content": "<|reserved_special_token_63|>",
|
958 |
+
"lstrip": false,
|
959 |
+
"normalized": false,
|
960 |
+
"rstrip": false,
|
961 |
+
"single_word": false,
|
962 |
+
"special": true
|
963 |
+
},
|
964 |
+
"49255": {
|
965 |
+
"content": "<|reserved_special_token_64|>",
|
966 |
+
"lstrip": false,
|
967 |
+
"normalized": false,
|
968 |
+
"rstrip": false,
|
969 |
+
"single_word": false,
|
970 |
+
"special": true
|
971 |
+
},
|
972 |
+
"49256": {
|
973 |
+
"content": "<|reserved_special_token_65|>",
|
974 |
+
"lstrip": false,
|
975 |
+
"normalized": false,
|
976 |
+
"rstrip": false,
|
977 |
+
"single_word": false,
|
978 |
+
"special": true
|
979 |
+
},
|
980 |
+
"49257": {
|
981 |
+
"content": "<|reserved_special_token_66|>",
|
982 |
+
"lstrip": false,
|
983 |
+
"normalized": false,
|
984 |
+
"rstrip": false,
|
985 |
+
"single_word": false,
|
986 |
+
"special": true
|
987 |
+
},
|
988 |
+
"49258": {
|
989 |
+
"content": "<|reserved_special_token_67|>",
|
990 |
+
"lstrip": false,
|
991 |
+
"normalized": false,
|
992 |
+
"rstrip": false,
|
993 |
+
"single_word": false,
|
994 |
+
"special": true
|
995 |
+
},
|
996 |
+
"49259": {
|
997 |
+
"content": "<|reserved_special_token_68|>",
|
998 |
+
"lstrip": false,
|
999 |
+
"normalized": false,
|
1000 |
+
"rstrip": false,
|
1001 |
+
"single_word": false,
|
1002 |
+
"special": true
|
1003 |
+
},
|
1004 |
+
"49260": {
|
1005 |
+
"content": "<|reserved_special_token_69|>",
|
1006 |
+
"lstrip": false,
|
1007 |
+
"normalized": false,
|
1008 |
+
"rstrip": false,
|
1009 |
+
"single_word": false,
|
1010 |
+
"special": true
|
1011 |
+
},
|
1012 |
+
"49261": {
|
1013 |
+
"content": "<|reserved_special_token_70|>",
|
1014 |
+
"lstrip": false,
|
1015 |
+
"normalized": false,
|
1016 |
+
"rstrip": false,
|
1017 |
+
"single_word": false,
|
1018 |
+
"special": true
|
1019 |
+
},
|
1020 |
+
"49262": {
|
1021 |
+
"content": "<|reserved_special_token_71|>",
|
1022 |
+
"lstrip": false,
|
1023 |
+
"normalized": false,
|
1024 |
+
"rstrip": false,
|
1025 |
+
"single_word": false,
|
1026 |
+
"special": true
|
1027 |
+
},
|
1028 |
+
"49263": {
|
1029 |
+
"content": "<|reserved_special_token_72|>",
|
1030 |
+
"lstrip": false,
|
1031 |
+
"normalized": false,
|
1032 |
+
"rstrip": false,
|
1033 |
+
"single_word": false,
|
1034 |
+
"special": true
|
1035 |
+
},
|
1036 |
+
"49264": {
|
1037 |
+
"content": "<|reserved_special_token_73|>",
|
1038 |
+
"lstrip": false,
|
1039 |
+
"normalized": false,
|
1040 |
+
"rstrip": false,
|
1041 |
+
"single_word": false,
|
1042 |
+
"special": true
|
1043 |
+
},
|
1044 |
+
"49265": {
|
1045 |
+
"content": "<|reserved_special_token_74|>",
|
1046 |
+
"lstrip": false,
|
1047 |
+
"normalized": false,
|
1048 |
+
"rstrip": false,
|
1049 |
+
"single_word": false,
|
1050 |
+
"special": true
|
1051 |
+
},
|
1052 |
+
"49266": {
|
1053 |
+
"content": "<|reserved_special_token_75|>",
|
1054 |
+
"lstrip": false,
|
1055 |
+
"normalized": false,
|
1056 |
+
"rstrip": false,
|
1057 |
+
"single_word": false,
|
1058 |
+
"special": true
|
1059 |
+
},
|
1060 |
+
"49267": {
|
1061 |
+
"content": "<|reserved_special_token_76|>",
|
1062 |
+
"lstrip": false,
|
1063 |
+
"normalized": false,
|
1064 |
+
"rstrip": false,
|
1065 |
+
"single_word": false,
|
1066 |
+
"special": true
|
1067 |
+
},
|
1068 |
+
"49268": {
|
1069 |
+
"content": "<|reserved_special_token_77|>",
|
1070 |
+
"lstrip": false,
|
1071 |
+
"normalized": false,
|
1072 |
+
"rstrip": false,
|
1073 |
+
"single_word": false,
|
1074 |
+
"special": true
|
1075 |
+
},
|
1076 |
+
"49269": {
|
1077 |
+
"content": "<|reserved_special_token_78|>",
|
1078 |
+
"lstrip": false,
|
1079 |
+
"normalized": false,
|
1080 |
+
"rstrip": false,
|
1081 |
+
"single_word": false,
|
1082 |
+
"special": true
|
1083 |
+
},
|
1084 |
+
"49270": {
|
1085 |
+
"content": "<|reserved_special_token_79|>",
|
1086 |
+
"lstrip": false,
|
1087 |
+
"normalized": false,
|
1088 |
+
"rstrip": false,
|
1089 |
+
"single_word": false,
|
1090 |
+
"special": true
|
1091 |
+
},
|
1092 |
+
"49271": {
|
1093 |
+
"content": "<|reserved_special_token_80|>",
|
1094 |
+
"lstrip": false,
|
1095 |
+
"normalized": false,
|
1096 |
+
"rstrip": false,
|
1097 |
+
"single_word": false,
|
1098 |
+
"special": true
|
1099 |
+
},
|
1100 |
+
"49272": {
|
1101 |
+
"content": "<|reserved_special_token_81|>",
|
1102 |
+
"lstrip": false,
|
1103 |
+
"normalized": false,
|
1104 |
+
"rstrip": false,
|
1105 |
+
"single_word": false,
|
1106 |
+
"special": true
|
1107 |
+
},
|
1108 |
+
"49273": {
|
1109 |
+
"content": "<|reserved_special_token_82|>",
|
1110 |
+
"lstrip": false,
|
1111 |
+
"normalized": false,
|
1112 |
+
"rstrip": false,
|
1113 |
+
"single_word": false,
|
1114 |
+
"special": true
|
1115 |
+
},
|
1116 |
+
"49274": {
|
1117 |
+
"content": "<|reserved_special_token_83|>",
|
1118 |
+
"lstrip": false,
|
1119 |
+
"normalized": false,
|
1120 |
+
"rstrip": false,
|
1121 |
+
"single_word": false,
|
1122 |
+
"special": true
|
1123 |
+
},
|
1124 |
+
"49275": {
|
1125 |
+
"content": "<|reserved_special_token_84|>",
|
1126 |
+
"lstrip": false,
|
1127 |
+
"normalized": false,
|
1128 |
+
"rstrip": false,
|
1129 |
+
"single_word": false,
|
1130 |
+
"special": true
|
1131 |
+
},
|
1132 |
+
"49276": {
|
1133 |
+
"content": "<|reserved_special_token_85|>",
|
1134 |
+
"lstrip": false,
|
1135 |
+
"normalized": false,
|
1136 |
+
"rstrip": false,
|
1137 |
+
"single_word": false,
|
1138 |
+
"special": true
|
1139 |
+
},
|
1140 |
+
"49277": {
|
1141 |
+
"content": "<|reserved_special_token_86|>",
|
1142 |
+
"lstrip": false,
|
1143 |
+
"normalized": false,
|
1144 |
+
"rstrip": false,
|
1145 |
+
"single_word": false,
|
1146 |
+
"special": true
|
1147 |
+
},
|
1148 |
+
"49278": {
|
1149 |
+
"content": "<|reserved_special_token_87|>",
|
1150 |
+
"lstrip": false,
|
1151 |
+
"normalized": false,
|
1152 |
+
"rstrip": false,
|
1153 |
+
"single_word": false,
|
1154 |
+
"special": true
|
1155 |
+
},
|
1156 |
+
"49279": {
|
1157 |
+
"content": "<end_of_utterance>",
|
1158 |
+
"lstrip": false,
|
1159 |
+
"normalized": false,
|
1160 |
+
"rstrip": false,
|
1161 |
+
"single_word": false,
|
1162 |
+
"special": true
|
1163 |
+
}
|
1164 |
+
},
|
1165 |
+
"additional_special_tokens": [
|
1166 |
+
"<fake_token_around_image>",
|
1167 |
+
"<image>",
|
1168 |
+
"<end_of_utterance>"
|
1169 |
+
],
|
1170 |
+
"bos_token": "<|im_start|>",
|
1171 |
+
"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 %}",
|
1172 |
+
"clean_up_tokenization_spaces": false,
|
1173 |
+
"eos_token": "<|im_end|>",
|
1174 |
+
"extra_special_tokens": {},
|
1175 |
+
"legacy": false,
|
1176 |
+
"max_length": 8192,
|
1177 |
+
"model_max_length": 8192,
|
1178 |
+
"pad_to_multiple_of": null,
|
1179 |
+
"pad_token": "<|im_end|>",
|
1180 |
+
"pad_token_type_id": 0,
|
1181 |
+
"padding_side": "right",
|
1182 |
+
"processor_class": "Idefics3Processor",
|
1183 |
+
"stride": 0,
|
1184 |
+
"tokenizer_class": "GPT2Tokenizer",
|
1185 |
+
"truncation_side": "right",
|
1186 |
+
"truncation_strategy": "longest_first",
|
1187 |
+
"unk_token": "<|endoftext|>",
|
1188 |
+
"vocab_size": 49152
|
1189 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
zero_to_fp32.py
ADDED
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
|
3 |
+
# Copyright (c) Microsoft Corporation.
|
4 |
+
# SPDX-License-Identifier: Apache-2.0
|
5 |
+
|
6 |
+
# DeepSpeed Team
|
7 |
+
|
8 |
+
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
|
9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
11 |
+
# application.
|
12 |
+
#
|
13 |
+
# example:
|
14 |
+
# python zero_to_fp32.py . output_dir/
|
15 |
+
# or
|
16 |
+
# python zero_to_fp32.py . output_dir/ --safe_serialization
|
17 |
+
|
18 |
+
import argparse
|
19 |
+
import torch
|
20 |
+
import glob
|
21 |
+
import math
|
22 |
+
import os
|
23 |
+
import re
|
24 |
+
import gc
|
25 |
+
import json
|
26 |
+
import numpy as np
|
27 |
+
from tqdm import tqdm
|
28 |
+
from collections import OrderedDict
|
29 |
+
from dataclasses import dataclass
|
30 |
+
|
31 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
32 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
33 |
+
from deepspeed.utils import logger
|
34 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
35 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
36 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
37 |
+
|
38 |
+
|
39 |
+
@dataclass
|
40 |
+
class zero_model_state:
|
41 |
+
buffers: dict()
|
42 |
+
param_shapes: dict()
|
43 |
+
shared_params: list
|
44 |
+
ds_version: int
|
45 |
+
frozen_param_shapes: dict()
|
46 |
+
frozen_param_fragments: dict()
|
47 |
+
|
48 |
+
|
49 |
+
debug = 0
|
50 |
+
|
51 |
+
# load to cpu
|
52 |
+
device = torch.device('cpu')
|
53 |
+
|
54 |
+
|
55 |
+
def atoi(text):
|
56 |
+
return int(text) if text.isdigit() else text
|
57 |
+
|
58 |
+
|
59 |
+
def natural_keys(text):
|
60 |
+
'''
|
61 |
+
alist.sort(key=natural_keys) sorts in human order
|
62 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
63 |
+
(See Toothy's implementation in the comments)
|
64 |
+
'''
|
65 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
66 |
+
|
67 |
+
|
68 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
69 |
+
if not os.path.isdir(checkpoint_dir):
|
70 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
71 |
+
|
72 |
+
# there should be only one file
|
73 |
+
if zero_stage <= 2:
|
74 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
75 |
+
elif zero_stage == 3:
|
76 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
77 |
+
|
78 |
+
if not os.path.exists(file):
|
79 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
80 |
+
|
81 |
+
return file
|
82 |
+
|
83 |
+
|
84 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
85 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
86 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
87 |
+
|
88 |
+
if len(ckpt_files) == 0:
|
89 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
90 |
+
|
91 |
+
return ckpt_files
|
92 |
+
|
93 |
+
|
94 |
+
def get_optim_files(checkpoint_dir):
|
95 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
96 |
+
|
97 |
+
|
98 |
+
def get_model_state_files(checkpoint_dir):
|
99 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
100 |
+
|
101 |
+
|
102 |
+
def parse_model_states(files):
|
103 |
+
zero_model_states = []
|
104 |
+
for file in files:
|
105 |
+
state_dict = torch.load(file, map_location=device, weights_only=False)
|
106 |
+
|
107 |
+
if BUFFER_NAMES not in state_dict:
|
108 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
109 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
110 |
+
if debug:
|
111 |
+
print("Found buffers:", buffer_names)
|
112 |
+
|
113 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
114 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
115 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
116 |
+
|
117 |
+
# collect parameters that are included in param_shapes
|
118 |
+
param_names = []
|
119 |
+
for s in param_shapes:
|
120 |
+
for name in s.keys():
|
121 |
+
param_names.append(name)
|
122 |
+
|
123 |
+
# update with frozen parameters
|
124 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
125 |
+
if frozen_param_shapes is not None:
|
126 |
+
if debug:
|
127 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
128 |
+
param_names += list(frozen_param_shapes.keys())
|
129 |
+
|
130 |
+
# handle shared params
|
131 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
132 |
+
|
133 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
134 |
+
|
135 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
136 |
+
|
137 |
+
z_model_state = zero_model_state(buffers=buffers,
|
138 |
+
param_shapes=param_shapes,
|
139 |
+
shared_params=shared_params,
|
140 |
+
ds_version=ds_version,
|
141 |
+
frozen_param_shapes=frozen_param_shapes,
|
142 |
+
frozen_param_fragments=frozen_param_fragments)
|
143 |
+
zero_model_states.append(z_model_state)
|
144 |
+
|
145 |
+
return zero_model_states
|
146 |
+
|
147 |
+
|
148 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
149 |
+
total_files = len(files)
|
150 |
+
state_dicts = []
|
151 |
+
for f in tqdm(files, desc='Loading checkpoint shards'):
|
152 |
+
state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
|
153 |
+
# immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
|
154 |
+
# and also handle the case where it was already removed by another helper script
|
155 |
+
state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
|
156 |
+
state_dicts.append(state_dict)
|
157 |
+
|
158 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
159 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
160 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
161 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
162 |
+
|
163 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
164 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
165 |
+
# use the max of the partition_count to get the dp world_size.
|
166 |
+
|
167 |
+
if type(world_size) is list:
|
168 |
+
world_size = max(world_size)
|
169 |
+
|
170 |
+
if world_size != total_files:
|
171 |
+
raise ValueError(
|
172 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
173 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
174 |
+
)
|
175 |
+
|
176 |
+
# the groups are named differently in each stage
|
177 |
+
if zero_stage <= 2:
|
178 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
179 |
+
elif zero_stage == 3:
|
180 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
181 |
+
else:
|
182 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
183 |
+
|
184 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
185 |
+
return zero_stage, world_size, fp32_flat_groups
|
186 |
+
|
187 |
+
|
188 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
|
189 |
+
"""
|
190 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
191 |
+
|
192 |
+
Args:
|
193 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
194 |
+
|
195 |
+
"""
|
196 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
197 |
+
|
198 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
199 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
200 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
201 |
+
|
202 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
203 |
+
|
204 |
+
zero_model_states = parse_model_states(model_files)
|
205 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
206 |
+
|
207 |
+
if zero_stage <= 2:
|
208 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
209 |
+
exclude_frozen_parameters)
|
210 |
+
elif zero_stage == 3:
|
211 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
212 |
+
exclude_frozen_parameters)
|
213 |
+
|
214 |
+
|
215 |
+
def _zero2_merge_frozen_params(state_dict, zero_model_states):
|
216 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
217 |
+
return
|
218 |
+
|
219 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
220 |
+
frozen_param_fragments = zero_model_states[0].frozen_param_fragments
|
221 |
+
|
222 |
+
if debug:
|
223 |
+
num_elem = sum(s.numel() for s in frozen_param_shapes.values())
|
224 |
+
print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
225 |
+
|
226 |
+
wanted_params = len(frozen_param_shapes)
|
227 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
228 |
+
avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
|
229 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
230 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
231 |
+
|
232 |
+
total_params = 0
|
233 |
+
total_numel = 0
|
234 |
+
for name, shape in frozen_param_shapes.items():
|
235 |
+
total_params += 1
|
236 |
+
unpartitioned_numel = shape.numel()
|
237 |
+
total_numel += unpartitioned_numel
|
238 |
+
|
239 |
+
state_dict[name] = frozen_param_fragments[name]
|
240 |
+
|
241 |
+
if debug:
|
242 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
243 |
+
|
244 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
245 |
+
|
246 |
+
|
247 |
+
def _has_callable(obj, fn):
|
248 |
+
attr = getattr(obj, fn, None)
|
249 |
+
return callable(attr)
|
250 |
+
|
251 |
+
|
252 |
+
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
253 |
+
param_shapes = zero_model_states[0].param_shapes
|
254 |
+
|
255 |
+
# Reconstruction protocol:
|
256 |
+
#
|
257 |
+
# XXX: document this
|
258 |
+
|
259 |
+
if debug:
|
260 |
+
for i in range(world_size):
|
261 |
+
for j in range(len(fp32_flat_groups[0])):
|
262 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
263 |
+
|
264 |
+
# XXX: memory usage doubles here (zero2)
|
265 |
+
num_param_groups = len(fp32_flat_groups[0])
|
266 |
+
merged_single_partition_of_fp32_groups = []
|
267 |
+
for i in range(num_param_groups):
|
268 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
269 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
270 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
271 |
+
avail_numel = sum(
|
272 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
273 |
+
|
274 |
+
if debug:
|
275 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
276 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
277 |
+
# not asserting if there is a mismatch due to possible padding
|
278 |
+
print(f"Have {avail_numel} numels to process.")
|
279 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
280 |
+
|
281 |
+
# params
|
282 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
283 |
+
# out-of-core computing solution
|
284 |
+
total_numel = 0
|
285 |
+
total_params = 0
|
286 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
287 |
+
offset = 0
|
288 |
+
avail_numel = full_single_fp32_vector.numel()
|
289 |
+
for name, shape in shapes.items():
|
290 |
+
|
291 |
+
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
|
292 |
+
total_numel += unpartitioned_numel
|
293 |
+
total_params += 1
|
294 |
+
|
295 |
+
if debug:
|
296 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
297 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
298 |
+
offset += unpartitioned_numel
|
299 |
+
|
300 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
301 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
302 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
303 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
304 |
+
align_to = 2 * world_size
|
305 |
+
|
306 |
+
def zero2_align(x):
|
307 |
+
return align_to * math.ceil(x / align_to)
|
308 |
+
|
309 |
+
if debug:
|
310 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
311 |
+
|
312 |
+
offset = zero2_align(offset)
|
313 |
+
avail_numel = zero2_align(avail_numel)
|
314 |
+
|
315 |
+
if debug:
|
316 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
317 |
+
|
318 |
+
# Sanity check
|
319 |
+
if offset != avail_numel:
|
320 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
321 |
+
|
322 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
323 |
+
|
324 |
+
|
325 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
326 |
+
exclude_frozen_parameters):
|
327 |
+
state_dict = OrderedDict()
|
328 |
+
|
329 |
+
# buffers
|
330 |
+
buffers = zero_model_states[0].buffers
|
331 |
+
state_dict.update(buffers)
|
332 |
+
if debug:
|
333 |
+
print(f"added {len(buffers)} buffers")
|
334 |
+
|
335 |
+
if not exclude_frozen_parameters:
|
336 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
337 |
+
|
338 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
339 |
+
|
340 |
+
# recover shared parameters
|
341 |
+
for pair in zero_model_states[0].shared_params:
|
342 |
+
if pair[1] in state_dict:
|
343 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
344 |
+
|
345 |
+
return state_dict
|
346 |
+
|
347 |
+
|
348 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
349 |
+
remainder = unpartitioned_numel % world_size
|
350 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
351 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
352 |
+
return partitioned_numel, padding_numel
|
353 |
+
|
354 |
+
|
355 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
356 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
357 |
+
return
|
358 |
+
|
359 |
+
if debug:
|
360 |
+
for i in range(world_size):
|
361 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
362 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
363 |
+
|
364 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
365 |
+
wanted_params = len(frozen_param_shapes)
|
366 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
367 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
368 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
369 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
370 |
+
|
371 |
+
total_params = 0
|
372 |
+
total_numel = 0
|
373 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
374 |
+
total_params += 1
|
375 |
+
unpartitioned_numel = shape.numel()
|
376 |
+
total_numel += unpartitioned_numel
|
377 |
+
|
378 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
379 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
380 |
+
|
381 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
382 |
+
|
383 |
+
if debug:
|
384 |
+
print(
|
385 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
386 |
+
)
|
387 |
+
|
388 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
389 |
+
|
390 |
+
|
391 |
+
class GatheredTensor:
|
392 |
+
"""
|
393 |
+
A pseudo tensor that collects partitioned weights.
|
394 |
+
It is more memory efficient when there are multiple groups.
|
395 |
+
"""
|
396 |
+
|
397 |
+
def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
|
398 |
+
self.flat_groups = flat_groups
|
399 |
+
self.flat_groups_offset = flat_groups_offset
|
400 |
+
self.offset = offset
|
401 |
+
self.partitioned_numel = partitioned_numel
|
402 |
+
self.shape = shape
|
403 |
+
self.dtype = self.flat_groups[0][0].dtype
|
404 |
+
|
405 |
+
def contiguous(self):
|
406 |
+
"""
|
407 |
+
Merge partitioned weights from flat_groups into a single tensor.
|
408 |
+
"""
|
409 |
+
end_idx = self.offset + self.partitioned_numel
|
410 |
+
world_size = len(self.flat_groups)
|
411 |
+
pad_flat_param_chunks = []
|
412 |
+
|
413 |
+
for rank_i in range(world_size):
|
414 |
+
# for each rank, we need to collect weights from related group/groups
|
415 |
+
flat_groups_at_rank_i = self.flat_groups[rank_i]
|
416 |
+
start_group_id = None
|
417 |
+
end_group_id = None
|
418 |
+
for group_id in range(len(self.flat_groups_offset)):
|
419 |
+
if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
|
420 |
+
start_group_id = group_id
|
421 |
+
if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
|
422 |
+
end_group_id = group_id
|
423 |
+
break
|
424 |
+
# collect weights from related group/groups
|
425 |
+
for group_id in range(start_group_id, end_group_id + 1):
|
426 |
+
flat_tensor = flat_groups_at_rank_i[group_id]
|
427 |
+
start_offset = self.offset - self.flat_groups_offset[group_id]
|
428 |
+
end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
|
429 |
+
pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
|
430 |
+
|
431 |
+
# collect weights from all ranks
|
432 |
+
pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
|
433 |
+
param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
|
434 |
+
return param
|
435 |
+
|
436 |
+
|
437 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
438 |
+
param_shapes = zero_model_states[0].param_shapes
|
439 |
+
avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
|
440 |
+
|
441 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
442 |
+
# param, re-consolidating each param, while dealing with padding if any
|
443 |
+
|
444 |
+
# merge list of dicts, preserving order
|
445 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
446 |
+
|
447 |
+
if debug:
|
448 |
+
for i in range(world_size):
|
449 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
450 |
+
|
451 |
+
wanted_params = len(param_shapes)
|
452 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
453 |
+
# not asserting if there is a mismatch due to possible padding
|
454 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
455 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
456 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
457 |
+
|
458 |
+
# params
|
459 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
460 |
+
# out-of-core computing solution
|
461 |
+
offset = 0
|
462 |
+
total_numel = 0
|
463 |
+
total_params = 0
|
464 |
+
flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
|
465 |
+
for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
|
466 |
+
unpartitioned_numel = shape.numel()
|
467 |
+
total_numel += unpartitioned_numel
|
468 |
+
total_params += 1
|
469 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
470 |
+
|
471 |
+
if debug:
|
472 |
+
print(
|
473 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
474 |
+
)
|
475 |
+
|
476 |
+
# memory efficient tensor
|
477 |
+
tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
|
478 |
+
state_dict[name] = tensor
|
479 |
+
offset += partitioned_numel
|
480 |
+
|
481 |
+
offset *= world_size
|
482 |
+
|
483 |
+
# Sanity check
|
484 |
+
if offset != avail_numel:
|
485 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
486 |
+
|
487 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
488 |
+
|
489 |
+
|
490 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
491 |
+
exclude_frozen_parameters):
|
492 |
+
state_dict = OrderedDict()
|
493 |
+
|
494 |
+
# buffers
|
495 |
+
buffers = zero_model_states[0].buffers
|
496 |
+
state_dict.update(buffers)
|
497 |
+
if debug:
|
498 |
+
print(f"added {len(buffers)} buffers")
|
499 |
+
|
500 |
+
if not exclude_frozen_parameters:
|
501 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
502 |
+
|
503 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
504 |
+
|
505 |
+
# recover shared parameters
|
506 |
+
for pair in zero_model_states[0].shared_params:
|
507 |
+
if pair[1] in state_dict:
|
508 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
509 |
+
|
510 |
+
return state_dict
|
511 |
+
|
512 |
+
|
513 |
+
def to_torch_tensor(state_dict, return_empty_tensor=False):
|
514 |
+
"""
|
515 |
+
Convert state_dict of GatheredTensor to torch tensor
|
516 |
+
"""
|
517 |
+
torch_state_dict = {}
|
518 |
+
converted_tensors = {}
|
519 |
+
for name, tensor in state_dict.items():
|
520 |
+
tensor_id = id(tensor)
|
521 |
+
if tensor_id in converted_tensors: # shared tensors
|
522 |
+
shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
|
523 |
+
torch_state_dict[name] = shared_tensor
|
524 |
+
else:
|
525 |
+
converted_tensors[tensor_id] = name
|
526 |
+
if return_empty_tensor:
|
527 |
+
torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
|
528 |
+
else:
|
529 |
+
torch_state_dict[name] = tensor.contiguous()
|
530 |
+
return torch_state_dict
|
531 |
+
|
532 |
+
|
533 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
534 |
+
tag=None,
|
535 |
+
exclude_frozen_parameters=False,
|
536 |
+
lazy_mode=False):
|
537 |
+
"""
|
538 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
539 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
540 |
+
via a model hub.
|
541 |
+
|
542 |
+
Args:
|
543 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
544 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
|
545 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
546 |
+
- ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
|
547 |
+
Convert the pesduo tensor to torch tensor by ``.contiguous()``
|
548 |
+
|
549 |
+
Returns:
|
550 |
+
- pytorch ``state_dict``
|
551 |
+
|
552 |
+
A typical usage might be ::
|
553 |
+
|
554 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
555 |
+
# do the training and checkpoint saving
|
556 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
557 |
+
model = model.cpu() # move to cpu
|
558 |
+
model.load_state_dict(state_dict)
|
559 |
+
# submit to model hub or save the model to share with others
|
560 |
+
|
561 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
562 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
563 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
564 |
+
|
565 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
566 |
+
|
567 |
+
Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
|
568 |
+
You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
569 |
+
the checkpoint. Or you can load state_dict in lazy mode ::
|
570 |
+
|
571 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
572 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
|
573 |
+
for name, lazy_tensor in state_dict.item():
|
574 |
+
tensor = lazy_tensor.contiguous() # to cpu
|
575 |
+
print(name, tensor)
|
576 |
+
# del tensor to release memory if it no longer in use
|
577 |
+
"""
|
578 |
+
if tag is None:
|
579 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
580 |
+
if os.path.isfile(latest_path):
|
581 |
+
with open(latest_path, 'r') as fd:
|
582 |
+
tag = fd.read().strip()
|
583 |
+
else:
|
584 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
585 |
+
|
586 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
587 |
+
|
588 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
589 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
590 |
+
|
591 |
+
state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
|
592 |
+
if lazy_mode:
|
593 |
+
return state_dict
|
594 |
+
else:
|
595 |
+
return to_torch_tensor(state_dict)
|
596 |
+
|
597 |
+
|
598 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
|
599 |
+
output_dir,
|
600 |
+
max_shard_size="5GB",
|
601 |
+
safe_serialization=False,
|
602 |
+
tag=None,
|
603 |
+
exclude_frozen_parameters=False):
|
604 |
+
"""
|
605 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
606 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
607 |
+
|
608 |
+
Args:
|
609 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
610 |
+
- ``output_dir``: directory to the pytorch fp32 state_dict output files
|
611 |
+
- ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
|
612 |
+
- ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
|
613 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
614 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
615 |
+
"""
|
616 |
+
|
617 |
+
# Dependency pre-check
|
618 |
+
if safe_serialization:
|
619 |
+
try:
|
620 |
+
from safetensors.torch import save_file
|
621 |
+
except ImportError:
|
622 |
+
print('If you want to use `safe_serialization`, please `pip install safetensors`')
|
623 |
+
raise
|
624 |
+
if max_shard_size is not None:
|
625 |
+
try:
|
626 |
+
from huggingface_hub import split_torch_state_dict_into_shards
|
627 |
+
except ImportError:
|
628 |
+
print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
|
629 |
+
raise
|
630 |
+
|
631 |
+
# Convert zero checkpoint to state_dict
|
632 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
633 |
+
tag,
|
634 |
+
exclude_frozen_parameters,
|
635 |
+
lazy_mode=True)
|
636 |
+
|
637 |
+
# Shard the model if it is too big.
|
638 |
+
weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
|
639 |
+
if max_shard_size is not None:
|
640 |
+
filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
|
641 |
+
# an memory-efficient approach for sharding
|
642 |
+
empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
|
643 |
+
state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
|
644 |
+
filename_pattern=filename_pattern,
|
645 |
+
max_shard_size=max_shard_size)
|
646 |
+
else:
|
647 |
+
from collections import namedtuple
|
648 |
+
StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
|
649 |
+
state_dict_split = StateDictSplit(is_sharded=False,
|
650 |
+
filename_to_tensors={weights_name: list(state_dict.keys())})
|
651 |
+
|
652 |
+
# Save the model by shard
|
653 |
+
os.makedirs(output_dir, exist_ok=True)
|
654 |
+
filename_to_tensors = state_dict_split.filename_to_tensors.items()
|
655 |
+
for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
|
656 |
+
shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
|
657 |
+
shard_state_dict = to_torch_tensor(shard_state_dict)
|
658 |
+
output_path = os.path.join(output_dir, shard_file)
|
659 |
+
if safe_serialization:
|
660 |
+
save_file(shard_state_dict, output_path, metadata={"format": "pt"})
|
661 |
+
else:
|
662 |
+
torch.save(shard_state_dict, output_path)
|
663 |
+
# release the memory of current shard
|
664 |
+
for tensor_name in list(shard_state_dict.keys()):
|
665 |
+
del state_dict[tensor_name]
|
666 |
+
del shard_state_dict[tensor_name]
|
667 |
+
del shard_state_dict
|
668 |
+
gc.collect()
|
669 |
+
|
670 |
+
# Save index if sharded
|
671 |
+
if state_dict_split.is_sharded:
|
672 |
+
index = {
|
673 |
+
"metadata": state_dict_split.metadata,
|
674 |
+
"weight_map": state_dict_split.tensor_to_filename,
|
675 |
+
}
|
676 |
+
save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
|
677 |
+
save_index_file = os.path.join(output_dir, save_index_file)
|
678 |
+
with open(save_index_file, "w", encoding="utf-8") as f:
|
679 |
+
content = json.dumps(index, indent=2, sort_keys=True) + "\n"
|
680 |
+
f.write(content)
|
681 |
+
|
682 |
+
|
683 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
684 |
+
"""
|
685 |
+
1. Put the provided model to cpu
|
686 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
687 |
+
3. Load it into the provided model
|
688 |
+
|
689 |
+
Args:
|
690 |
+
- ``model``: the model object to update
|
691 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
692 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
693 |
+
|
694 |
+
Returns:
|
695 |
+
- ``model`: modified model
|
696 |
+
|
697 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
698 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
699 |
+
conveniently placed for you in the checkpoint folder.
|
700 |
+
|
701 |
+
A typical usage might be ::
|
702 |
+
|
703 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
704 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
705 |
+
# submit to model hub or save the model to share with others
|
706 |
+
|
707 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
708 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
709 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
710 |
+
|
711 |
+
"""
|
712 |
+
logger.info(f"Extracting fp32 weights")
|
713 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
714 |
+
|
715 |
+
logger.info(f"Overwriting model with fp32 weights")
|
716 |
+
model = model.cpu()
|
717 |
+
model.load_state_dict(state_dict, strict=False)
|
718 |
+
|
719 |
+
return model
|
720 |
+
|
721 |
+
|
722 |
+
if __name__ == "__main__":
|
723 |
+
parser = argparse.ArgumentParser()
|
724 |
+
parser.add_argument("checkpoint_dir",
|
725 |
+
type=str,
|
726 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
727 |
+
parser.add_argument("output_dir",
|
728 |
+
type=str,
|
729 |
+
help="directory to the pytorch fp32 state_dict output files"
|
730 |
+
"(e.g. path/checkpoint-12-output/)")
|
731 |
+
parser.add_argument(
|
732 |
+
"--max_shard_size",
|
733 |
+
type=str,
|
734 |
+
default="5GB",
|
735 |
+
help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
|
736 |
+
"lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
|
737 |
+
"We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
|
738 |
+
"without CPU OOM issues.")
|
739 |
+
parser.add_argument(
|
740 |
+
"--safe_serialization",
|
741 |
+
default=False,
|
742 |
+
action='store_true',
|
743 |
+
help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
|
744 |
+
parser.add_argument("-t",
|
745 |
+
"--tag",
|
746 |
+
type=str,
|
747 |
+
default=None,
|
748 |
+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
|
749 |
+
parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
|
750 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
751 |
+
args = parser.parse_args()
|
752 |
+
|
753 |
+
debug = args.debug
|
754 |
+
|
755 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
|
756 |
+
args.output_dir,
|
757 |
+
max_shard_size=args.max_shard_size,
|
758 |
+
safe_serialization=args.safe_serialization,
|
759 |
+
tag=args.tag,
|
760 |
+
exclude_frozen_parameters=args.exclude_frozen_parameters)
|