Commit
·
8e467b7
1
Parent(s):
4d62223
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +0 -1
- chat_template.json +3 -0
- config.json +210 -0
- generation_config.json +13 -0
- model.safetensors.index.json +0 -0
- preprocessor_config.json +33 -0
- processor_config.json +6 -0
- special_tokens_map.json +23 -0
- tokenizer_config.json +0 -0
.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
|
README.md
CHANGED
@@ -17,7 +17,6 @@ base_model:
|
|
17 |
- meta-llama/Llama-4-Scout-17B-16E
|
18 |
tags:
|
19 |
- facebook
|
20 |
-
- unsloth
|
21 |
- meta
|
22 |
- pytorch
|
23 |
- llama
|
|
|
17 |
- meta-llama/Llama-4-Scout-17B-16E
|
18 |
tags:
|
19 |
- facebook
|
|
|
20 |
- meta
|
21 |
- pytorch
|
22 |
- llama
|
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,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Llama4ForConditionalGeneration"
|
4 |
+
],
|
5 |
+
"boi_token_index": 200080,
|
6 |
+
"bos_token_id": 200000,
|
7 |
+
"eoi_token_index": 200081,
|
8 |
+
"eos_token_id": 200008,
|
9 |
+
"image_token_index": 200092,
|
10 |
+
"model_type": "llama4",
|
11 |
+
"pad_token_id": 201134,
|
12 |
+
"quantization_config": {
|
13 |
+
"_load_in_4bit": true,
|
14 |
+
"_load_in_8bit": false,
|
15 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
16 |
+
"bnb_4bit_quant_storage": "uint8",
|
17 |
+
"bnb_4bit_quant_type": "nf4",
|
18 |
+
"bnb_4bit_use_double_quant": true,
|
19 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
20 |
+
"llm_int8_has_fp16_weight": false,
|
21 |
+
"llm_int8_skip_modules": [
|
22 |
+
"lm_head",
|
23 |
+
"multi_modal_projector",
|
24 |
+
"merger",
|
25 |
+
"modality_projection",
|
26 |
+
"vision_model.model.layers.33.mlp",
|
27 |
+
"language_model.model.layers.43.self_attn"
|
28 |
+
],
|
29 |
+
"llm_int8_threshold": 6.0,
|
30 |
+
"load_in_4bit": true,
|
31 |
+
"load_in_8bit": false,
|
32 |
+
"quant_method": "bitsandbytes"
|
33 |
+
},
|
34 |
+
"text_config": {
|
35 |
+
"_attn_implementation_autoset": true,
|
36 |
+
"attention_bias": false,
|
37 |
+
"attention_chunk_size": 8192,
|
38 |
+
"attention_dropout": 0.0,
|
39 |
+
"attn_scale": 0.1,
|
40 |
+
"attn_temperature_tuning": 4,
|
41 |
+
"bos_token_id": 200000,
|
42 |
+
"eos_token_id": [
|
43 |
+
200001,
|
44 |
+
200007,
|
45 |
+
200008
|
46 |
+
],
|
47 |
+
"floor_scale": 8192,
|
48 |
+
"for_llm_compressor": false,
|
49 |
+
"head_dim": 128,
|
50 |
+
"hidden_act": "silu",
|
51 |
+
"hidden_size": 5120,
|
52 |
+
"initializer_range": 0.02,
|
53 |
+
"interleave_moe_layer_step": 1,
|
54 |
+
"intermediate_size": 8192,
|
55 |
+
"intermediate_size_mlp": 16384,
|
56 |
+
"max_position_embeddings": 10485760,
|
57 |
+
"model_type": "llama4_text",
|
58 |
+
"moe_layers": [
|
59 |
+
0,
|
60 |
+
1,
|
61 |
+
2,
|
62 |
+
3,
|
63 |
+
4,
|
64 |
+
5,
|
65 |
+
6,
|
66 |
+
7,
|
67 |
+
8,
|
68 |
+
9,
|
69 |
+
10,
|
70 |
+
11,
|
71 |
+
12,
|
72 |
+
13,
|
73 |
+
14,
|
74 |
+
15,
|
75 |
+
16,
|
76 |
+
17,
|
77 |
+
18,
|
78 |
+
19,
|
79 |
+
20,
|
80 |
+
21,
|
81 |
+
22,
|
82 |
+
23,
|
83 |
+
24,
|
84 |
+
25,
|
85 |
+
26,
|
86 |
+
27,
|
87 |
+
28,
|
88 |
+
29,
|
89 |
+
30,
|
90 |
+
31,
|
91 |
+
32,
|
92 |
+
33,
|
93 |
+
34,
|
94 |
+
35,
|
95 |
+
36,
|
96 |
+
37,
|
97 |
+
38,
|
98 |
+
39,
|
99 |
+
40,
|
100 |
+
41,
|
101 |
+
42,
|
102 |
+
43,
|
103 |
+
44,
|
104 |
+
45,
|
105 |
+
46,
|
106 |
+
47
|
107 |
+
],
|
108 |
+
"no_rope_layers": [
|
109 |
+
1,
|
110 |
+
1,
|
111 |
+
1,
|
112 |
+
0,
|
113 |
+
1,
|
114 |
+
1,
|
115 |
+
1,
|
116 |
+
0,
|
117 |
+
1,
|
118 |
+
1,
|
119 |
+
1,
|
120 |
+
0,
|
121 |
+
1,
|
122 |
+
1,
|
123 |
+
1,
|
124 |
+
0,
|
125 |
+
1,
|
126 |
+
1,
|
127 |
+
1,
|
128 |
+
0,
|
129 |
+
1,
|
130 |
+
1,
|
131 |
+
1,
|
132 |
+
0,
|
133 |
+
1,
|
134 |
+
1,
|
135 |
+
1,
|
136 |
+
0,
|
137 |
+
1,
|
138 |
+
1,
|
139 |
+
1,
|
140 |
+
0,
|
141 |
+
1,
|
142 |
+
1,
|
143 |
+
1,
|
144 |
+
0,
|
145 |
+
1,
|
146 |
+
1,
|
147 |
+
1,
|
148 |
+
0,
|
149 |
+
1,
|
150 |
+
1,
|
151 |
+
1,
|
152 |
+
0,
|
153 |
+
1,
|
154 |
+
1,
|
155 |
+
1,
|
156 |
+
0
|
157 |
+
],
|
158 |
+
"num_attention_heads": 40,
|
159 |
+
"num_experts_per_tok": 1,
|
160 |
+
"num_hidden_layers": 48,
|
161 |
+
"num_key_value_heads": 8,
|
162 |
+
"num_local_experts": 16,
|
163 |
+
"output_router_logits": false,
|
164 |
+
"pad_token_id": 200018,
|
165 |
+
"rms_norm_eps": 1e-05,
|
166 |
+
"rope_scaling": {
|
167 |
+
"factor": 8.0,
|
168 |
+
"high_freq_factor": 4.0,
|
169 |
+
"low_freq_factor": 1.0,
|
170 |
+
"original_max_position_embeddings": 8192,
|
171 |
+
"rope_type": "llama3"
|
172 |
+
},
|
173 |
+
"rope_theta": 500000.0,
|
174 |
+
"router_aux_loss_coef": 0.001,
|
175 |
+
"router_jitter_noise": 0.0,
|
176 |
+
"torch_dtype": "bfloat16",
|
177 |
+
"use_cache": true,
|
178 |
+
"use_qk_norm": true,
|
179 |
+
"vocab_size": 202048
|
180 |
+
},
|
181 |
+
"tie_word_embeddings": false,
|
182 |
+
"torch_dtype": "bfloat16",
|
183 |
+
"transformers_version": "4.51.0",
|
184 |
+
"unsloth_fixed": true,
|
185 |
+
"vision_config": {
|
186 |
+
"_attn_implementation_autoset": true,
|
187 |
+
"attention_dropout": 0.0,
|
188 |
+
"hidden_act": "gelu",
|
189 |
+
"hidden_size": 1408,
|
190 |
+
"image_size": 336,
|
191 |
+
"initializer_range": 0.02,
|
192 |
+
"intermediate_size": 5632,
|
193 |
+
"model_type": "llama4_vision_model",
|
194 |
+
"multi_modal_projector_bias": false,
|
195 |
+
"norm_eps": 1e-05,
|
196 |
+
"num_attention_heads": 16,
|
197 |
+
"num_channels": 3,
|
198 |
+
"num_hidden_layers": 34,
|
199 |
+
"patch_size": 14,
|
200 |
+
"pixel_shuffle_ratio": 0.5,
|
201 |
+
"projector_dropout": 0.0,
|
202 |
+
"projector_input_dim": 4096,
|
203 |
+
"projector_output_dim": 4096,
|
204 |
+
"rope_theta": 10000,
|
205 |
+
"torch_dtype": "bfloat16",
|
206 |
+
"vision_feature_layer": -1,
|
207 |
+
"vision_feature_select_strategy": "default",
|
208 |
+
"vision_output_dim": 4096
|
209 |
+
}
|
210 |
+
}
|
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": 201134,
|
10 |
+
"temperature": 0.6,
|
11 |
+
"top_p": 0.9,
|
12 |
+
"transformers_version": "4.51.0"
|
13 |
+
}
|
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_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|