danielhanchen commited on
Commit
6e655bd
·
verified ·
1 Parent(s): 4c8d04b

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %} \n {%- if messages[0]['content'] is string %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- else %}\n {#- FIXME: The processor requires an array, always. #}\n {%- set system_message = messages[0]['content'][0]['text']|trim %}\n {%- endif %}\n {%- set messages = messages[1:] %}\n {%- set user_supplied_system_message = true %}\n{%- else %}\n {%- set system_message = \"\" %}\n {%- set user_supplied_system_message = false %}\n{%- endif %}\n\n{#- System message if the user supplied one #}\n{%- if user_supplied_system_message %}\n {{- \"<|header_start|>system<|header_end|>\n\n\" }}\n {%- if tools is not none %}\n {{- \"Environment: ipython\n\" }}\n {%- endif %}\n {%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\n\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\n\n\" }}\n {%- endfor %}\n {%- endif %}\n {{- system_message }}\n {{- \"<|eot|>\" }}\n{%- endif %}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|header_start|>user<|header_end|>\n\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\n\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\n\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\n\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|header_start|>' + message['role'] + '<|header_end|>\n\n' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- \"<|eot|>\" }}\n {%- elif 'tool_calls' in message and message.tool_calls|length > 0 %}\n {{- '<|header_start|>assistant<|header_end|>\n\n' -}}\n {{- '<|python_start|>' }}\n {%- if message['content'] is string %}\n {{- message['content'] }}\n {%- else %}\n {%- for content in message['content'] %}\n {%- if content['type'] == 'image' %}\n {{- '<|image|>' }}\n {%- elif content['type'] == 'text' %}\n {{- content['text'] }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|python_end|>' }}\n {%- for tool_call in message.tool_calls %}\n {{- '{\"name\": \"' + tool_call.function.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.function.arguments | tojson }}\n {{- \"}\" }}\n {%- endfor %}\n {{- \"<|eot|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|header_start|>ipython<|header_end|>\n\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|header_start|>assistant<|header_end|>\n\n' }}\n{%- endif %}\n"
3
+ }
config.json ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Llama4ForConditionalGeneration"
4
+ ],
5
+ "boi_token_index": 200080,
6
+ "eoi_token_index": 200081,
7
+ "image_token_index": 200092,
8
+ "model_type": "llama4",
9
+ "quantization_config": {
10
+ "_load_in_4bit": false,
11
+ "_load_in_8bit": true,
12
+ "bnb_4bit_compute_dtype": "float32",
13
+ "bnb_4bit_quant_storage": "uint8",
14
+ "bnb_4bit_quant_type": "fp4",
15
+ "bnb_4bit_use_double_quant": false,
16
+ "llm_int8_enable_fp32_cpu_offload": false,
17
+ "llm_int8_has_fp16_weight": false,
18
+ "llm_int8_skip_modules": [
19
+ "vision_model",
20
+ "multi_modal_projector",
21
+ "lm_head",
22
+ "router"
23
+ ],
24
+ "llm_int8_threshold": 6.0,
25
+ "load_in_4bit": false,
26
+ "load_in_8bit": true,
27
+ "quant_method": "bitsandbytes"
28
+ },
29
+ "text_config": {
30
+ "_attn_implementation_autoset": true,
31
+ "attention_bias": false,
32
+ "attention_chunk_size": 8192,
33
+ "attention_dropout": 0.0,
34
+ "attn_scale": 0.1,
35
+ "attn_temperature_tuning": 4,
36
+ "bos_token_id": 200000,
37
+ "eos_token_id": [
38
+ 200001,
39
+ 200007,
40
+ 200008
41
+ ],
42
+ "floor_scale": 8192,
43
+ "for_llm_compressor": false,
44
+ "head_dim": 128,
45
+ "hidden_act": "silu",
46
+ "hidden_size": 5120,
47
+ "initializer_range": 0.02,
48
+ "interleave_moe_layer_step": 1,
49
+ "intermediate_size": 8192,
50
+ "intermediate_size_mlp": 16384,
51
+ "max_position_embeddings": 262144,
52
+ "model_type": "llama4_text",
53
+ "moe_layers": [
54
+ 0,
55
+ 1,
56
+ 2,
57
+ 3,
58
+ 4,
59
+ 5,
60
+ 6,
61
+ 7,
62
+ 8,
63
+ 9,
64
+ 10,
65
+ 11,
66
+ 12,
67
+ 13,
68
+ 14,
69
+ 15,
70
+ 16,
71
+ 17,
72
+ 18,
73
+ 19,
74
+ 20,
75
+ 21,
76
+ 22,
77
+ 23,
78
+ 24,
79
+ 25,
80
+ 26,
81
+ 27,
82
+ 28,
83
+ 29,
84
+ 30,
85
+ 31,
86
+ 32,
87
+ 33,
88
+ 34,
89
+ 35,
90
+ 36,
91
+ 37,
92
+ 38,
93
+ 39,
94
+ 40,
95
+ 41,
96
+ 42,
97
+ 43,
98
+ 44,
99
+ 45,
100
+ 46,
101
+ 47
102
+ ],
103
+ "no_rope_layers": [
104
+ 1,
105
+ 1,
106
+ 1,
107
+ 0,
108
+ 1,
109
+ 1,
110
+ 1,
111
+ 0,
112
+ 1,
113
+ 1,
114
+ 1,
115
+ 0,
116
+ 1,
117
+ 1,
118
+ 1,
119
+ 0,
120
+ 1,
121
+ 1,
122
+ 1,
123
+ 0,
124
+ 1,
125
+ 1,
126
+ 1,
127
+ 0,
128
+ 1,
129
+ 1,
130
+ 1,
131
+ 0,
132
+ 1,
133
+ 1,
134
+ 1,
135
+ 0,
136
+ 1,
137
+ 1,
138
+ 1,
139
+ 0,
140
+ 1,
141
+ 1,
142
+ 1,
143
+ 0,
144
+ 1,
145
+ 1,
146
+ 1,
147
+ 0,
148
+ 1,
149
+ 1,
150
+ 1,
151
+ 0
152
+ ],
153
+ "num_attention_heads": 40,
154
+ "num_experts_per_tok": 1,
155
+ "num_hidden_layers": 48,
156
+ "num_key_value_heads": 8,
157
+ "num_local_experts": 16,
158
+ "output_router_logits": false,
159
+ "pad_token_id": 200018,
160
+ "rms_norm_eps": 1e-05,
161
+ "rope_scaling": {
162
+ "factor": 8.0,
163
+ "high_freq_factor": 4.0,
164
+ "low_freq_factor": 1.0,
165
+ "original_max_position_embeddings": 8192,
166
+ "rope_type": "llama3"
167
+ },
168
+ "rope_theta": 500000.0,
169
+ "router_aux_loss_coef": 0.001,
170
+ "router_jitter_noise": 0.0,
171
+ "torch_dtype": "bfloat16",
172
+ "use_cache": true,
173
+ "use_qk_norm": true,
174
+ "vocab_size": 202048
175
+ },
176
+ "tie_word_embeddings": false,
177
+ "torch_dtype": "bfloat16",
178
+ "transformers_version": "4.51.0",
179
+ "vision_config": {
180
+ "_attn_implementation_autoset": true,
181
+ "attention_dropout": 0.0,
182
+ "hidden_act": "gelu",
183
+ "hidden_size": 1408,
184
+ "image_size": 336,
185
+ "initializer_range": 0.02,
186
+ "intermediate_size": 5632,
187
+ "model_type": "llama4_vision_model",
188
+ "multi_modal_projector_bias": false,
189
+ "norm_eps": 1e-05,
190
+ "num_attention_heads": 16,
191
+ "num_channels": 3,
192
+ "num_hidden_layers": 34,
193
+ "patch_size": 14,
194
+ "pixel_shuffle_ratio": 0.5,
195
+ "projector_dropout": 0.0,
196
+ "projector_input_dim": 4096,
197
+ "projector_output_dim": 4096,
198
+ "rope_theta": 10000,
199
+ "torch_dtype": "bfloat16",
200
+ "vision_feature_layer": -1,
201
+ "vision_feature_select_strategy": "default",
202
+ "vision_output_dim": 4096
203
+ }
204
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 200000,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 200001,
6
+ 200007,
7
+ 200008
8
+ ],
9
+ "pad_token_id": 200018,
10
+ "temperature": 0.6,
11
+ "top_p": 0.9,
12
+ "transformers_version": "4.51.0"
13
+ }
model-00001-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56f878d015fefb0e4b983490f5d50accf0757b10f2f83b59c5a7863b4b00033e
3
+ size 4547287685
model-00002-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc6bc63388cb4573e79a4b4e518f8a51ea5b5b300be583a1172c8c94830d9884
3
+ size 4407026372
model-00003-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cd152dd990d942bfb1d66b270aeac60431ef7685653755ecde818567a6ef10e
3
+ size 4407026372
model-00004-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75a1cb29bedeab632ba85058e597bd5925ba4bfe2d7b39456dd0d346ec58eb04
3
+ size 4407026372
model-00005-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5916e6c37e6d6de195ed7374132e7121e67d6427cd80ca4080c6047c6ed38da3
3
+ size 4407026372
model-00006-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82c262da6b50c946063346ad6273c9fc9c878686d7b83c4d2f63e2ca6e6946a1
3
+ size 4407026372
model-00007-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b441d2d44044a3c9164931d3ab4aa8ad2a62e081552457e4ea705d869316762
3
+ size 4407026436
model-00008-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f5e1dfc5c973093b9347b6fe58cf5eaece8757f9781d3104bc20bbcdb1fc33d
3
+ size 4407026436
model-00009-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63bed793936dc9602fbaab235d88eca14b0595d2e7357f10a0a0a856d62e26e8
3
+ size 4407026436
model-00010-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b222a3ddffc789267bd13c4ce68b1c9d74845a7d1a86cf6cc0eca1a27a1dafee
3
+ size 4407026436
model-00011-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46f27aa813b03ab23e64f438d5a68f891bf80eb3e6b1d7470f9fb55f514b826d
3
+ size 4407026436
model-00012-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2f756afcdce64095656beb36fb1d1243d79b4896c7f9631707fddc34601327e
3
+ size 4407026436
model-00013-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c78309acfc27e33418d22f222578abdaf8893e54a2f9c62ca979b15dd24a8d7
3
+ size 4407026436
model-00014-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f96dc1d51b7435618fc88f0994be8e11fa2e6087ee365be0dc92ad7298fca601
3
+ size 4407026436
model-00015-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8844d9f9943099e7ac71cd99c44001c89b6148c59ce124f1a9bde0cec5dc469a
3
+ size 4407026436
model-00016-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e893027f5e3829b9517f5d3cc1d2c4900b16713edf47029dd4daa93a7d66ab80
3
+ size 4407026436
model-00017-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad0bf23b4c56c26665d3bca99e11d5d4165ccc3acf6832b278c6a4a2ce7e0773
3
+ size 4407026436
model-00018-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8131a96d5b1d5bcf4edceba64691f51cda3b4bf7e33dd5f875511d59355e2020
3
+ size 4407026436
model-00019-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b3bfc4d4688b4d2a65ecfb038683ffea46c2b551826dbd0241069fac4777520
3
+ size 4407026436
model-00020-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9627047bb66f7f92b89c14b4c14f957d322d63955c4e740711e90f4ed1aedc16
3
+ size 4407026436
model-00021-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4c1b96a80a98d9d051b9faf62667fba849949ea8867609fdcb7a3300e1f9cfa
3
+ size 4407026436
model-00022-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9aa2e452ab88f6a42385a2221507f0d4c6332658266582eaeb84c03c2c8b637e
3
+ size 4407026436
model-00023-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5050eca6b40f46527dafd2821869828f1c7bd797fd360db64c6d742089e7c6f5
3
+ size 4407026436
model-00024-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:082b89a5ecc844d3b5db2927d82441e447b46853a161c1320997a8a86937c156
3
+ size 4407026436
model-00025-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c32ef040433d965460794671c05fc505bd96747b58d754eb3b32615b6c02e2f2
3
+ size 3672654807
model-00026-of-00026.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6cf2a4d34ffc16073c8a771e20cb75ab2fc4bd4c323758e1cdc7436ca8a6482e
3
+ size 2068971664
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "do_center_crop": null,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "image_mean": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "image_processor_type": "Llama4ImageProcessorFast",
17
+ "image_std": [
18
+ 0.5,
19
+ 0.5,
20
+ 0.5
21
+ ],
22
+ "input_data_format": null,
23
+ "max_patches": 16,
24
+ "processor_class": "Llama4Processor",
25
+ "resample": 2,
26
+ "rescale_factor": 0.00392156862745098,
27
+ "resize_to_max_canvas": false,
28
+ "return_tensors": null,
29
+ "size": {
30
+ "height": 336,
31
+ "width": 336
32
+ }
33
+ }
processor_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "fake_image_token": "<|image|>",
3
+ "image_token": "<|image|>",
4
+ "patch_size": 14,
5
+ "processor_class": "Llama4Processor"
6
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|begin_of_text|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|eot|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|finetune_right_pad_id|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:172c9eb4beafc72601690da3ccfcede5c2e6806a8d5ec1fca33e22acea8023a4
3
+ size 27948578
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff