YUGOROU commited on
Commit
8d4f240
·
verified ·
1 Parent(s): 9051c5f

(Trained with Unsloth)

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.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 -%}
config.json ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForConditionalGeneration"
4
+ ],
5
+ "audio_config": null,
6
+ "audio_token_id": 258881,
7
+ "boa_token_id": 256000,
8
+ "boi_token_id": 255999,
9
+ "bos_token_id": 2,
10
+ "torch_dtype": "bfloat16",
11
+ "eoa_token_id": 258883,
12
+ "eoa_token_index": 258883,
13
+ "eoi_token_id": 258882,
14
+ "eos_token_id": 1,
15
+ "image_token_id": 258880,
16
+ "initializer_range": 0.02,
17
+ "model_name": "unsloth/gemma-4-26B-A4B",
18
+ "model_type": "gemma4",
19
+ "pad_token_id": 0,
20
+ "text_config": {
21
+ "attention_bias": false,
22
+ "attention_dropout": 0.0,
23
+ "attention_k_eq_v": true,
24
+ "bos_token_id": 2,
25
+ "torch_dtype": "bfloat16",
26
+ "enable_moe_block": true,
27
+ "eos_token_id": 1,
28
+ "final_logit_softcapping": 30.0,
29
+ "global_head_dim": 512,
30
+ "head_dim": 256,
31
+ "hidden_activation": "gelu_pytorch_tanh",
32
+ "hidden_size": 2816,
33
+ "hidden_size_per_layer_input": 0,
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 2112,
36
+ "layer_types": [
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "sliding_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "full_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "full_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "sliding_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "full_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "sliding_attention",
66
+ "full_attention"
67
+ ],
68
+ "max_position_embeddings": 262144,
69
+ "model_type": "gemma4_text",
70
+ "moe_intermediate_size": 704,
71
+ "num_attention_heads": 16,
72
+ "num_experts": 128,
73
+ "num_global_key_value_heads": 2,
74
+ "num_hidden_layers": 30,
75
+ "num_key_value_heads": 8,
76
+ "num_kv_shared_layers": 0,
77
+ "pad_token_id": 0,
78
+ "rms_norm_eps": 1e-06,
79
+ "rope_parameters": {
80
+ "full_attention": {
81
+ "partial_rotary_factor": 0.25,
82
+ "rope_theta": 1000000.0,
83
+ "rope_type": "proportional"
84
+ },
85
+ "sliding_attention": {
86
+ "rope_theta": 10000.0,
87
+ "rope_type": "default"
88
+ }
89
+ },
90
+ "sliding_window": 1024,
91
+ "tie_word_embeddings": true,
92
+ "top_k_experts": 8,
93
+ "use_bidirectional_attention": "vision",
94
+ "use_cache": true,
95
+ "use_double_wide_mlp": false,
96
+ "vocab_size": 262144,
97
+ "vocab_size_per_layer_input": 262144
98
+ },
99
+ "tie_word_embeddings": true,
100
+ "unsloth_version": "2026.6.1",
101
+ "use_cache": false,
102
+ "video_token_id": 258884,
103
+ "vision_config": {
104
+ "_name_or_path": "",
105
+ "architectures": null,
106
+ "attention_bias": false,
107
+ "attention_dropout": 0.0,
108
+ "chunk_size_feed_forward": 0,
109
+ "default_output_length": 280,
110
+ "torch_dtype": "bfloat16",
111
+ "global_head_dim": 72,
112
+ "head_dim": 72,
113
+ "hidden_activation": "gelu_pytorch_tanh",
114
+ "hidden_size": 1152,
115
+ "id2label": {
116
+ "0": "LABEL_0",
117
+ "1": "LABEL_1"
118
+ },
119
+ "initializer_range": 0.02,
120
+ "intermediate_size": 4304,
121
+ "is_encoder_decoder": false,
122
+ "label2id": {
123
+ "LABEL_0": 0,
124
+ "LABEL_1": 1
125
+ },
126
+ "max_position_embeddings": 131072,
127
+ "model_type": "gemma4_vision",
128
+ "num_attention_heads": 16,
129
+ "num_hidden_layers": 27,
130
+ "num_key_value_heads": 16,
131
+ "output_attentions": false,
132
+ "output_hidden_states": false,
133
+ "patch_size": 16,
134
+ "pooling_kernel_size": 3,
135
+ "position_embedding_size": 10240,
136
+ "problem_type": null,
137
+ "return_dict": true,
138
+ "rms_norm_eps": 1e-06,
139
+ "rope_parameters": {
140
+ "rope_theta": 100.0,
141
+ "rope_type": "default"
142
+ },
143
+ "standardize": true,
144
+ "use_clipped_linears": false
145
+ },
146
+ "vision_soft_tokens_per_image": 280
147
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 1,
6
+ 1
7
+ ],
8
+ "pad_token_id": 0,
9
+ "temperature": 1.0,
10
+ "top_k": 64,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.5.0"
13
+ }
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": "left",
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:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
3
+ size 32169626
tokenizer_config.json ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<eos>",
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
+ "mask_token": "<mask>",
22
+ "model_max_length": 1000000000000000019884624838656,
23
+ "model_specific_special_tokens": {
24
+ "audio_token": "<|audio|>",
25
+ "boa_token": "<|audio>",
26
+ "boi_token": "<|image>",
27
+ "eoa_token": "<audio|>",
28
+ "eoc_token": "<channel|>",
29
+ "eoi_token": "<image|>",
30
+ "eot_token": "<turn|>",
31
+ "escape_token": "<|\"|>",
32
+ "etc_token": "<tool_call|>",
33
+ "etd_token": "<tool|>",
34
+ "etr_token": "<tool_response|>",
35
+ "image_token": "<|image|>",
36
+ "soc_token": "<|channel>",
37
+ "sot_token": "<|turn>",
38
+ "stc_token": "<|tool_call>",
39
+ "std_token": "<|tool>",
40
+ "str_token": "<|tool_response>",
41
+ "think_token": "<|think|>"
42
+ },
43
+ "pad_token": "<pad>",
44
+ "padding_side": "right",
45
+ "processor_class": "Gemma4Processor",
46
+ "soc_token": "<|channel>",
47
+ "sot_token": "<|turn>",
48
+ "stc_token": "<|tool_call>",
49
+ "std_token": "<|tool>",
50
+ "str_token": "<|tool_response>",
51
+ "think_token": "<|think|>",
52
+ "tokenizer_class": "GemmaTokenizer",
53
+ "unk_token": "<unk>",
54
+ "added_tokens_decoder": {
55
+ "0": {
56
+ "content": "<pad>",
57
+ "single_word": false,
58
+ "lstrip": false,
59
+ "rstrip": false,
60
+ "normalized": false,
61
+ "special": true
62
+ },
63
+ "1": {
64
+ "content": "<eos>",
65
+ "single_word": false,
66
+ "lstrip": false,
67
+ "rstrip": false,
68
+ "normalized": false,
69
+ "special": true
70
+ },
71
+ "2": {
72
+ "content": "<bos>",
73
+ "single_word": false,
74
+ "lstrip": false,
75
+ "rstrip": false,
76
+ "normalized": false,
77
+ "special": true
78
+ },
79
+ "3": {
80
+ "content": "<unk>",
81
+ "single_word": false,
82
+ "lstrip": false,
83
+ "rstrip": false,
84
+ "normalized": false,
85
+ "special": true
86
+ },
87
+ "4": {
88
+ "content": "<mask>",
89
+ "single_word": false,
90
+ "lstrip": false,
91
+ "rstrip": false,
92
+ "normalized": false,
93
+ "special": true
94
+ },
95
+ "46": {
96
+ "content": "<|tool>",
97
+ "single_word": false,
98
+ "lstrip": false,
99
+ "rstrip": false,
100
+ "normalized": false,
101
+ "special": true
102
+ },
103
+ "47": {
104
+ "content": "<tool|>",
105
+ "single_word": false,
106
+ "lstrip": false,
107
+ "rstrip": false,
108
+ "normalized": false,
109
+ "special": true
110
+ },
111
+ "48": {
112
+ "content": "<|tool_call>",
113
+ "single_word": false,
114
+ "lstrip": false,
115
+ "rstrip": false,
116
+ "normalized": false,
117
+ "special": true
118
+ },
119
+ "49": {
120
+ "content": "<tool_call|>",
121
+ "single_word": false,
122
+ "lstrip": false,
123
+ "rstrip": false,
124
+ "normalized": false,
125
+ "special": true
126
+ },
127
+ "50": {
128
+ "content": "<|tool_response>",
129
+ "single_word": false,
130
+ "lstrip": false,
131
+ "rstrip": false,
132
+ "normalized": false,
133
+ "special": true
134
+ },
135
+ "51": {
136
+ "content": "<tool_response|>",
137
+ "single_word": false,
138
+ "lstrip": false,
139
+ "rstrip": false,
140
+ "normalized": false,
141
+ "special": true
142
+ },
143
+ "52": {
144
+ "content": "<|\"|>",
145
+ "single_word": false,
146
+ "lstrip": false,
147
+ "rstrip": false,
148
+ "normalized": false,
149
+ "special": true
150
+ },
151
+ "98": {
152
+ "content": "<|think|>",
153
+ "single_word": false,
154
+ "lstrip": false,
155
+ "rstrip": false,
156
+ "normalized": false,
157
+ "special": true
158
+ },
159
+ "100": {
160
+ "content": "<|channel>",
161
+ "single_word": false,
162
+ "lstrip": false,
163
+ "rstrip": false,
164
+ "normalized": false,
165
+ "special": true
166
+ },
167
+ "101": {
168
+ "content": "<channel|>",
169
+ "single_word": false,
170
+ "lstrip": false,
171
+ "rstrip": false,
172
+ "normalized": false,
173
+ "special": true
174
+ },
175
+ "105": {
176
+ "content": "<|turn>",
177
+ "single_word": false,
178
+ "lstrip": false,
179
+ "rstrip": false,
180
+ "normalized": false,
181
+ "special": true
182
+ },
183
+ "106": {
184
+ "content": "<turn|>",
185
+ "single_word": false,
186
+ "lstrip": false,
187
+ "rstrip": false,
188
+ "normalized": false,
189
+ "special": true
190
+ },
191
+ "255999": {
192
+ "content": "<|image>",
193
+ "single_word": false,
194
+ "lstrip": false,
195
+ "rstrip": false,
196
+ "normalized": false,
197
+ "special": true
198
+ },
199
+ "256000": {
200
+ "content": "<|audio>",
201
+ "single_word": false,
202
+ "lstrip": false,
203
+ "rstrip": false,
204
+ "normalized": false,
205
+ "special": true
206
+ },
207
+ "258880": {
208
+ "content": "<|image|>",
209
+ "single_word": false,
210
+ "lstrip": false,
211
+ "rstrip": false,
212
+ "normalized": false,
213
+ "special": true
214
+ },
215
+ "258881": {
216
+ "content": "<|audio|>",
217
+ "single_word": false,
218
+ "lstrip": false,
219
+ "rstrip": false,
220
+ "normalized": false,
221
+ "special": true
222
+ },
223
+ "258882": {
224
+ "content": "<image|>",
225
+ "single_word": false,
226
+ "lstrip": false,
227
+ "rstrip": false,
228
+ "normalized": false,
229
+ "special": true
230
+ },
231
+ "258883": {
232
+ "content": "<audio|>",
233
+ "single_word": false,
234
+ "lstrip": false,
235
+ "rstrip": false,
236
+ "normalized": false,
237
+ "special": true
238
+ },
239
+ "258884": {
240
+ "content": "<|video|>",
241
+ "single_word": false,
242
+ "lstrip": false,
243
+ "rstrip": false,
244
+ "normalized": false,
245
+ "special": true
246
+ }
247
+ },
248
+ "chat_template": "{{ bos_token }}{%- macro strip_thinking(text) -%}\n {%- set ns = namespace(result='') -%}\n {%- for part in text.split('<channel|>') -%}\n {%- if '<|channel>' in part -%}\n {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}\n {%- else -%}\n {%- set ns.result = ns.result + part -%}\n {%- endif -%}\n {%- endfor -%}\n {{- ns.result | trim -}}\n{%- endmacro -%}\n{%- set thinking = enable_thinking is defined and enable_thinking -%}\n{%- set loop_messages = messages -%}\n{%- if messages[0]['role'] in ['system', 'developer'] or thinking -%}\n {{ '<|turn>system\n' }}\n {%- if thinking -%}\n {{ '<|think|>\n' }}\n {%- endif -%}\n {%- if messages[0]['role'] in ['system', 'developer'] -%}\n {{ messages[0]['content'] | trim }}\n {%- set loop_messages = messages[1:] -%}\n {%- endif -%}\n {{ '<turn|>\n' }}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<|turn>' + role + '\n' }}\n {%- if message['content'] is string -%}\n {%- if role == \"model\" -%}\n {{ strip_thinking(message['content']) }}\n {%- else -%}\n {{ message['content'] | trim }}\n {%- endif -%}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'audio' -%}\n {{ '<|audio|>' }}\n {%- elif item['type'] == 'image' -%}\n {{ '<|image|>' }}\n {%- elif item['type'] == 'video' -%}\n {{ '<|video|>' }}\n {%- elif item['type'] == 'text' -%}\n {%- if role == \"model\" -%}\n {{ strip_thinking(item['text']) }}\n {%- else -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '<turn|>\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<|turn>model\n'}}\n {%- if not thinking -%}\n {{ '<|channel>thought\n<channel|>' }}\n {%- endif -%}\n{%- endif -%}\n"
249
+ }