DFveloper commited on
Commit
c9d49be
·
verified ·
1 Parent(s): 360fe55

Upload model trained with Unsloth

Browse files

Upload model trained with Unsloth 2x faster

.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.jinja ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ bos_token }}{%- macro strip_thinking(text) -%}
2
+ {%- set ns = namespace(result='') -%}
3
+ {%- for part in text.split('<channel|>') -%}
4
+ {%- if '<|channel>' in part -%}
5
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
6
+ {%- else -%}
7
+ {%- set ns.result = ns.result + part -%}
8
+ {%- endif -%}
9
+ {%- endfor -%}
10
+ {{- ns.result | trim -}}
11
+ {%- endmacro -%}
12
+ {%- set thinking = enable_thinking is defined and enable_thinking -%}
13
+ {%- set loop_messages = messages -%}
14
+ {%- if messages[0]['role'] in ['system', 'developer'] or thinking -%}
15
+ {{ '<|turn>system
16
+ ' }}
17
+ {%- if thinking -%}
18
+ {{ '<|think|>
19
+ ' }}
20
+ {%- endif -%}
21
+ {%- if messages[0]['role'] in ['system', 'developer'] -%}
22
+ {{ messages[0]['content'] | trim }}
23
+ {%- set loop_messages = messages[1:] -%}
24
+ {%- endif -%}
25
+ {{ '<turn|>
26
+ ' }}
27
+ {%- endif -%}
28
+ {%- for message in loop_messages -%}
29
+ {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
30
+ {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
31
+ {%- endif -%}
32
+ {%- if (message['role'] == 'assistant') -%}
33
+ {%- set role = "model" -%}
34
+ {%- else -%}
35
+ {%- set role = message['role'] -%}
36
+ {%- endif -%}
37
+ {{ '<|turn>' + role + '
38
+ ' }}
39
+ {%- if message['content'] is string -%}
40
+ {%- if role == "model" -%}
41
+ {{ strip_thinking(message['content']) }}
42
+ {%- else -%}
43
+ {{ message['content'] | trim }}
44
+ {%- endif -%}
45
+ {%- elif message['content'] is iterable -%}
46
+ {%- for item in message['content'] -%}
47
+ {%- if item['type'] == 'audio' -%}
48
+ {{ '<|audio|>' }}
49
+ {%- elif item['type'] == 'image' -%}
50
+ {{ '<|image|>' }}
51
+ {%- elif item['type'] == 'video' -%}
52
+ {{ '<|video|>' }}
53
+ {%- elif item['type'] == 'text' -%}
54
+ {%- if role == "model" -%}
55
+ {{ strip_thinking(item['text']) }}
56
+ {%- else -%}
57
+ {{ item['text'] | trim }}
58
+ {%- endif -%}
59
+ {%- endif -%}
60
+ {%- endfor -%}
61
+ {%- else -%}
62
+ {{ raise_exception("Invalid content type") }}
63
+ {%- endif -%}
64
+ {{ '<turn|>
65
+ ' }}
66
+ {%- endfor -%}
67
+ {%- if add_generation_prompt -%}
68
+ {{'<|turn>model
69
+ '}}
70
+ {%- if not thinking -%}
71
+ {{ '<|channel>thought
72
+ <channel|>' }}
73
+ {%- endif -%}
74
+ {%- endif -%}
processor_config.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_ms_per_token": 40,
3
+ "audio_seq_length": 750,
4
+ "feature_extractor": {
5
+ "dither": 0.0,
6
+ "feature_extractor_type": "Gemma4AudioFeatureExtractor",
7
+ "feature_size": 128,
8
+ "fft_length": 512,
9
+ "fft_overdrive": false,
10
+ "frame_length": 320,
11
+ "hop_length": 160,
12
+ "input_scale_factor": 1.0,
13
+ "max_frequency": 8000.0,
14
+ "mel_floor": 0.001,
15
+ "min_frequency": 0.0,
16
+ "padding_side": "right",
17
+ "padding_value": 0.0,
18
+ "per_bin_mean": null,
19
+ "per_bin_stddev": null,
20
+ "preemphasis": 0.0,
21
+ "preemphasis_htk_flavor": true,
22
+ "return_attention_mask": true,
23
+ "sampling_rate": 16000
24
+ },
25
+ "image_processor": {
26
+ "do_convert_rgb": true,
27
+ "do_normalize": false,
28
+ "do_rescale": true,
29
+ "do_resize": true,
30
+ "image_mean": [
31
+ 0.0,
32
+ 0.0,
33
+ 0.0
34
+ ],
35
+ "image_processor_type": "Gemma4ImageProcessor",
36
+ "image_seq_length": 280,
37
+ "image_std": [
38
+ 1.0,
39
+ 1.0,
40
+ 1.0
41
+ ],
42
+ "max_soft_tokens": 280,
43
+ "patch_size": 16,
44
+ "pooling_kernel_size": 3,
45
+ "resample": 3,
46
+ "rescale_factor": 0.00392156862745098
47
+ },
48
+ "image_seq_length": 280,
49
+ "processor_class": "Gemma4Processor",
50
+ "video_processor": {
51
+ "do_convert_rgb": true,
52
+ "do_normalize": true,
53
+ "do_rescale": true,
54
+ "do_resize": true,
55
+ "do_sample_frames": true,
56
+ "image_mean": [
57
+ 0.0,
58
+ 0.0,
59
+ 0.0
60
+ ],
61
+ "image_std": [
62
+ 1.0,
63
+ 1.0,
64
+ 1.0
65
+ ],
66
+ "max_soft_tokens": 70,
67
+ "num_frames": 32,
68
+ "patch_size": 16,
69
+ "pooling_kernel_size": 3,
70
+ "resample": 3,
71
+ "rescale_factor": 0.00392156862745098,
72
+ "return_metadata": false,
73
+ "video_processor_type": "Gemma4VideoProcessor"
74
+ }
75
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1d8bced9d66859cd2c3f4dcd8ab427197d4d46af3d9598b72af9fcf80b8392e
3
+ size 32169781
tokenizer_config.json ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_token": "<|audio|>",
3
+ "backend": "tokenizers",
4
+ "boa_token": "<|audio>",
5
+ "boi_token": "<|image>",
6
+ "bos_token": "<bos>",
7
+ "eoa_token": "<audio|>",
8
+ "eoc_token": "<channel|>",
9
+ "eoi_token": "<image|>",
10
+ "eos_token": "<turn|>",
11
+ "eot_token": "<turn|>",
12
+ "escape_token": "<|\"|>",
13
+ "etc_token": "<tool_call|>",
14
+ "etd_token": "<tool|>",
15
+ "etr_token": "<tool_response|>",
16
+ "extra_special_tokens": [
17
+ "<|video|>"
18
+ ],
19
+ "image_token": "<|image|>",
20
+ "is_local": false,
21
+ "local_files_only": false,
22
+ "mask_token": "<mask>",
23
+ "model_max_length": 262144,
24
+ "model_specific_special_tokens": {
25
+ "audio_token": "<|audio|>",
26
+ "boa_token": "<|audio>",
27
+ "boi_token": "<|image>",
28
+ "eoa_token": "<audio|>",
29
+ "eoc_token": "<channel|>",
30
+ "eoi_token": "<image|>",
31
+ "eot_token": "<turn|>",
32
+ "escape_token": "<|\"|>",
33
+ "etc_token": "<tool_call|>",
34
+ "etd_token": "<tool|>",
35
+ "etr_token": "<tool_response|>",
36
+ "image_token": "<|image|>",
37
+ "soc_token": "<|channel>",
38
+ "sot_token": "<|turn>",
39
+ "stc_token": "<|tool_call>",
40
+ "std_token": "<|tool>",
41
+ "str_token": "<|tool_response>",
42
+ "think_token": "<|think|>"
43
+ },
44
+ "pad_token": "<pad>",
45
+ "padding_side": "right",
46
+ "processor_class": "Gemma4Processor",
47
+ "response_schema": {
48
+ "properties": {
49
+ "content": {
50
+ "type": "string"
51
+ },
52
+ "role": {
53
+ "const": "assistant"
54
+ },
55
+ "thinking": {
56
+ "type": "string"
57
+ },
58
+ "tool_calls": {
59
+ "items": {
60
+ "properties": {
61
+ "function": {
62
+ "properties": {
63
+ "arguments": {
64
+ "additionalProperties": {},
65
+ "type": "object",
66
+ "x-parser": "gemma4-tool-call"
67
+ },
68
+ "name": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "type": "object",
73
+ "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
74
+ },
75
+ "type": {
76
+ "const": "function"
77
+ }
78
+ },
79
+ "type": "object"
80
+ },
81
+ "type": "array",
82
+ "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
83
+ }
84
+ },
85
+ "type": "object",
86
+ "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
87
+ },
88
+ "soc_token": "<|channel>",
89
+ "sot_token": "<|turn>",
90
+ "stc_token": "<|tool_call>",
91
+ "std_token": "<|tool>",
92
+ "str_token": "<|tool_response>",
93
+ "think_token": "<|think|>",
94
+ "tokenizer_class": "GemmaTokenizer",
95
+ "unk_token": "<unk>",
96
+ "added_tokens_decoder": {
97
+ "0": {
98
+ "content": "<pad>",
99
+ "single_word": false,
100
+ "lstrip": false,
101
+ "rstrip": false,
102
+ "normalized": false,
103
+ "special": true
104
+ },
105
+ "1": {
106
+ "content": "<eos>",
107
+ "single_word": false,
108
+ "lstrip": false,
109
+ "rstrip": false,
110
+ "normalized": false,
111
+ "special": true
112
+ },
113
+ "2": {
114
+ "content": "<bos>",
115
+ "single_word": false,
116
+ "lstrip": false,
117
+ "rstrip": false,
118
+ "normalized": false,
119
+ "special": true
120
+ },
121
+ "3": {
122
+ "content": "<unk>",
123
+ "single_word": false,
124
+ "lstrip": false,
125
+ "rstrip": false,
126
+ "normalized": false,
127
+ "special": true
128
+ },
129
+ "4": {
130
+ "content": "<mask>",
131
+ "single_word": false,
132
+ "lstrip": false,
133
+ "rstrip": false,
134
+ "normalized": false,
135
+ "special": true
136
+ },
137
+ "46": {
138
+ "content": "<|tool>",
139
+ "single_word": false,
140
+ "lstrip": false,
141
+ "rstrip": false,
142
+ "normalized": false,
143
+ "special": true
144
+ },
145
+ "47": {
146
+ "content": "<tool|>",
147
+ "single_word": false,
148
+ "lstrip": false,
149
+ "rstrip": false,
150
+ "normalized": false,
151
+ "special": true
152
+ },
153
+ "48": {
154
+ "content": "<|tool_call>",
155
+ "single_word": false,
156
+ "lstrip": false,
157
+ "rstrip": false,
158
+ "normalized": false,
159
+ "special": true
160
+ },
161
+ "49": {
162
+ "content": "<tool_call|>",
163
+ "single_word": false,
164
+ "lstrip": false,
165
+ "rstrip": false,
166
+ "normalized": false,
167
+ "special": true
168
+ },
169
+ "50": {
170
+ "content": "<|tool_response>",
171
+ "single_word": false,
172
+ "lstrip": false,
173
+ "rstrip": false,
174
+ "normalized": false,
175
+ "special": true
176
+ },
177
+ "51": {
178
+ "content": "<tool_response|>",
179
+ "single_word": false,
180
+ "lstrip": false,
181
+ "rstrip": false,
182
+ "normalized": false,
183
+ "special": true
184
+ },
185
+ "52": {
186
+ "content": "<|\"|>",
187
+ "single_word": false,
188
+ "lstrip": false,
189
+ "rstrip": false,
190
+ "normalized": false,
191
+ "special": true
192
+ },
193
+ "98": {
194
+ "content": "<|think|>",
195
+ "single_word": false,
196
+ "lstrip": false,
197
+ "rstrip": false,
198
+ "normalized": false,
199
+ "special": true
200
+ },
201
+ "100": {
202
+ "content": "<|channel>",
203
+ "single_word": false,
204
+ "lstrip": false,
205
+ "rstrip": false,
206
+ "normalized": false,
207
+ "special": true
208
+ },
209
+ "101": {
210
+ "content": "<channel|>",
211
+ "single_word": false,
212
+ "lstrip": false,
213
+ "rstrip": false,
214
+ "normalized": false,
215
+ "special": true
216
+ },
217
+ "105": {
218
+ "content": "<|turn>",
219
+ "single_word": false,
220
+ "lstrip": false,
221
+ "rstrip": false,
222
+ "normalized": false,
223
+ "special": true
224
+ },
225
+ "106": {
226
+ "content": "<turn|>",
227
+ "single_word": false,
228
+ "lstrip": false,
229
+ "rstrip": false,
230
+ "normalized": false,
231
+ "special": true
232
+ },
233
+ "255999": {
234
+ "content": "<|image>",
235
+ "single_word": false,
236
+ "lstrip": false,
237
+ "rstrip": false,
238
+ "normalized": false,
239
+ "special": true
240
+ },
241
+ "256000": {
242
+ "content": "<|audio>",
243
+ "single_word": false,
244
+ "lstrip": false,
245
+ "rstrip": false,
246
+ "normalized": false,
247
+ "special": true
248
+ },
249
+ "258880": {
250
+ "content": "<|image|>",
251
+ "single_word": false,
252
+ "lstrip": false,
253
+ "rstrip": false,
254
+ "normalized": false,
255
+ "special": true
256
+ },
257
+ "258881": {
258
+ "content": "<|audio|>",
259
+ "single_word": false,
260
+ "lstrip": false,
261
+ "rstrip": false,
262
+ "normalized": false,
263
+ "special": true
264
+ },
265
+ "258882": {
266
+ "content": "<image|>",
267
+ "single_word": false,
268
+ "lstrip": false,
269
+ "rstrip": false,
270
+ "normalized": false,
271
+ "special": true
272
+ },
273
+ "258883": {
274
+ "content": "<audio|>",
275
+ "single_word": false,
276
+ "lstrip": false,
277
+ "rstrip": false,
278
+ "normalized": false,
279
+ "special": true
280
+ },
281
+ "258884": {
282
+ "content": "<|video|>",
283
+ "single_word": false,
284
+ "lstrip": false,
285
+ "rstrip": false,
286
+ "normalized": false,
287
+ "special": true
288
+ }
289
+ }
290
+ }