zecanard commited on
Commit
b3b9d1b
·
verified ·
1 Parent(s): f75563f

Add files using upload-large-folder tool

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
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: https://ai.google.dev/gemma/docs/gemma_4_license
4
+ pipeline_tag: any-to-any
5
+ tags:
6
+ - mlx
7
+ - heretic
8
+ - uncensored
9
+ - decensored
10
+ - abliterated
11
+ - ara
12
+ base_model: llmfan46/gemma-4-E4B-it-ultra-uncensored-heretic
13
+ language: en
14
+ library_name: mlx
15
+ - google/gemma-4-E4B-it
16
+ ---
17
+ # 🦆 zecanard/gemma-4-E4B-it-ultra-uncensored-heretic-MLX-3bit-mixed_3_6
18
+
19
+ [This model](https://huggingface.co/zecanard/gemma-4-E4B-it-ultra-uncensored-heretic-MLX-3bit-mixed_3_6) was converted to MLX from [`llmfan46/gemma-4-E4B-it-ultra-uncensored-heretic`](https://huggingface.co/llmfan46/gemma-4-E4B-it-ultra-uncensored-heretic) using `mlx-vlm` version **0.4.4**.
20
+ Please refer to the [original model card](https://huggingface.co/llmfan46/gemma-4-E4B-it-ultra-uncensored-heretic) for more details.
21
+
22
+ ## 🌟 Quality
23
+
24
+ Mixed-precision quantized vision language model with an effective **5.836 bits per weight**. Combines the smaller size of a 3-bit quant with higher precision where it maters most.
25
+
26
+ `mlx_vlm.convert --quantize --q-group-size 32 --quant-predicate mixed_3_6`
27
+
28
+ ## 🛠️ Customizations
29
+
30
+ This quant is aware of the current date, and also enables thinking (if available). You may disable this behavior by deleting the following line from the chat template, or changing `true` to `false`:
31
+
32
+ `{%- set enable_thinking = true %}`
33
+
34
+ You may also need to adjust your environment’s **Reasoning Section Parsing** to recognize `<|channel>thought` as the **Start String**, and `<channel|>` as the **End String**.
35
+
36
+ ## 🖥️ Use with `mlx`
37
+
38
+ ```bash
39
+ pip install -U mlx-vlm
40
+ ```
41
+
42
+ ```bash
43
+ mlx_vlm.generate --model zecanard/gemma-4-E4B-it-ultra-uncensored-heretic-MLX-3bit-mixed_3_6 --max-tokens 100 --temperature 0 --prompt "Describe this image." --image <path_to_image>
44
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,354 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#- Template customizations by @zecanard. #}
2
+ {%- set enable_thinking = true %}
3
+ {%- set preserve_thinking = true %}
4
+ {%- if strftime_now is defined %}
5
+ {%- set currentDate = strftime_now("%Y-%m-%d %G:%i:%s") %}
6
+ {%- elif not currentDate is defined %}
7
+ {%- set currentDate = "2026-04-18" %}
8
+ {%- endif %}
9
+ {{- "The current date is: " + currentDate + ".\n\n" }}
10
+ {#- Template customizations by @zecanard. #}
11
+ {%- macro format_parameters(properties, required) -%}
12
+ {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
13
+ {%- set ns = namespace(found_first=false) -%}
14
+ {%- for key, value in properties | dictsort -%}
15
+ {%- set add_comma = false -%}
16
+ {%- if key not in standard_keys -%}
17
+ {%- if ns.found_first %},{% endif -%}
18
+ {%- set ns.found_first = true -%}
19
+ {{ key }}:{
20
+ {%- if value['description'] -%}
21
+ description:<|"|>{{ value['description'] }}<|"|>
22
+ {%- set add_comma = true -%}
23
+ {%- endif -%}
24
+ {%- if value['type'] | upper == 'STRING' -%}
25
+ {%- if value['enum'] -%}
26
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
27
+ enum:{{ format_argument(value['enum']) }}
28
+ {%- endif -%}
29
+ {%- elif value['type'] | upper == 'ARRAY' -%}
30
+ {%- if value['items'] is mapping and value['items'] -%}
31
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
32
+ items:{
33
+ {%- set ns_items = namespace(found_first=false) -%}
34
+ {%- for item_key, item_value in value['items'] | dictsort -%}
35
+ {%- if item_value is not none -%}
36
+ {%- if ns_items.found_first %},{% endif -%}
37
+ {%- set ns_items.found_first = true -%}
38
+ {%- if item_key == 'properties' -%}
39
+ properties:{
40
+ {%- if item_value is mapping -%}
41
+ {{- format_parameters(item_value, value['items']['required'] | default([])) -}}
42
+ {%- endif -%}
43
+ }
44
+ {%- elif item_key == 'required' -%}
45
+ required:[
46
+ {%- for req_item in item_value -%}
47
+ <|"|>{{- req_item -}}<|"|>
48
+ {%- if not loop.last %},{% endif -%}
49
+ {%- endfor -%}
50
+ ]
51
+ {%- elif item_key == 'type' -%}
52
+ {%- if item_value is string -%}
53
+ type:{{ format_argument(item_value | upper) }}
54
+ {%- else -%}
55
+ type:{{ format_argument(item_value | map('upper') | list) }}
56
+ {%- endif -%}
57
+ {%- else -%}
58
+ {{ item_key }}:{{ format_argument(item_value) }}
59
+ {%- endif -%}
60
+ {%- endif -%}
61
+ {%- endfor -%}
62
+ }
63
+ {%- endif -%}
64
+ {%- endif -%}
65
+ {%- if value['nullable'] %}
66
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
67
+ nullable:true
68
+ {%- endif -%}
69
+ {%- if value['type'] | upper == 'OBJECT' -%}
70
+ {%- if value['properties'] is defined and value['properties'] is mapping -%}
71
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
72
+ properties:{
73
+ {{- format_parameters(value['properties'], value['required'] | default([])) -}}
74
+ }
75
+ {%- elif value is mapping -%}
76
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
77
+ properties:{
78
+ {{- format_parameters(value, value['required'] | default([])) -}}
79
+ }
80
+ {%- endif -%}
81
+ {%- if value['required'] -%}
82
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
83
+ required:[
84
+ {%- for item in value['required'] | default([]) -%}
85
+ <|"|>{{- item -}}<|"|>
86
+ {%- if not loop.last %},{% endif -%}
87
+ {%- endfor -%}
88
+ ]
89
+ {%- endif -%}
90
+ {%- endif -%}
91
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
92
+ type:<|"|>{{ value['type'] | upper }}<|"|>}
93
+ {%- endif -%}
94
+ {%- endfor -%}
95
+ {%- endmacro -%}
96
+ {%- macro format_function_declaration(tool_data) -%}
97
+ declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
98
+ {%- set params = tool_data['function']['parameters'] -%}
99
+ {%- if params -%}
100
+ ,parameters:{
101
+ {%- if params['properties'] -%}
102
+ properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
103
+ {%- endif -%}
104
+ {%- if params['required'] -%}
105
+ required:[
106
+ {%- for item in params['required'] -%}
107
+ <|"|>{{- item -}}<|"|>
108
+ {{- ',' if not loop.last -}}
109
+ {%- endfor -%}
110
+ ],
111
+ {%- endif -%}
112
+ {%- if params['type'] -%}
113
+ type:<|"|>{{- params['type'] | upper -}}<|"|>}
114
+ {%- endif -%}
115
+ {%- endif -%}
116
+ {%- if 'response' in tool_data['function'] -%}
117
+ {%- set response_declaration = tool_data['function']['response'] -%}
118
+ ,response:{
119
+ {%- if response_declaration['description'] -%}
120
+ description:<|"|>{{- response_declaration['description'] -}}<|"|>,
121
+ {%- endif -%}
122
+ {%- if response_declaration['type'] | upper == 'OBJECT' -%}
123
+ type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
124
+ {%- endif -%}
125
+ {%- endif -%}
126
+ }
127
+ {%- endmacro -%}
128
+ {%- macro format_argument(argument, escape_keys=True) -%}
129
+ {%- if argument is string -%}
130
+ {{- '<|"|>' + argument + '<|"|>' -}}
131
+ {%- elif argument is boolean -%}
132
+ {{- 'true' if argument else 'false' -}}
133
+ {%- elif argument is mapping -%}
134
+ {{- '{' -}}
135
+ {%- set ns = namespace(found_first=false) -%}
136
+ {%- for key, value in argument | dictsort -%}
137
+ {%- if ns.found_first %},{% endif -%}
138
+ {%- set ns.found_first = true -%}
139
+ {%- if escape_keys -%}
140
+ {{- '<|"|>' + key + '<|"|>' -}}
141
+ {%- else -%}
142
+ {{- key -}}
143
+ {%- endif -%}
144
+ :{{- format_argument(value, escape_keys=escape_keys) -}}
145
+ {%- endfor -%}
146
+ {{- '}' -}}
147
+ {%- elif argument is sequence -%}
148
+ {{- '[' -}}
149
+ {%- for item in argument -%}
150
+ {{- format_argument(item, escape_keys=escape_keys) -}}
151
+ {%- if not loop.last %},{% endif -%}
152
+ {%- endfor -%}
153
+ {{- ']' -}}
154
+ {%- else -%}
155
+ {{- argument -}}
156
+ {%- endif -%}
157
+ {%- endmacro -%}
158
+ {%- macro strip_thinking(text) -%}
159
+ {%- set ns = namespace(result='') -%}
160
+ {%- for part in text.split('<channel|>') -%}
161
+ {%- if '<|channel>' in part -%}
162
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
163
+ {%- else -%}
164
+ {%- set ns.result = ns.result + part -%}
165
+ {%- endif -%}
166
+ {%- endfor -%}
167
+ {{- ns.result | trim -}}
168
+ {%- endmacro -%}
169
+
170
+ {%- macro format_tool_response_block(tool_name, response) -%}
171
+ {{- '<|tool_response>' -}}
172
+ {%- if response is mapping -%}
173
+ {{- 'response:' + tool_name + '{' -}}
174
+ {%- for key, value in response | dictsort -%}
175
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
176
+ {%- if not loop.last %},{% endif -%}
177
+ {%- endfor -%}
178
+ {{- '}' -}}
179
+ {%- else -%}
180
+ {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
181
+ {%- endif -%}
182
+ {{- '<tool_response|>' -}}
183
+ {%- endmacro -%}
184
+
185
+ {%- set ns = namespace(prev_message_type=None) -%}
186
+ {%- set loop_messages = messages -%}
187
+ {{- bos_token -}}
188
+ {#- Handle System/Tool Definitions Block -#}
189
+ {%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}
190
+ {{- '<|turn>system\n' -}}
191
+
192
+ {#- Inject Thinking token at the very top of the FIRST system turn -#}
193
+ {%- if enable_thinking is defined and enable_thinking -%}
194
+ {{- '<|think|>\n' -}}
195
+ {%- set ns.prev_message_type = 'think' -%}
196
+ {%- endif -%}
197
+
198
+ {%- if messages[0]['role'] in ['system', 'developer'] -%}
199
+ {{- messages[0]['content'] | trim -}}
200
+ {%- set loop_messages = messages[1:] -%}
201
+ {%- endif -%}
202
+
203
+ {%- if tools -%}
204
+ {%- for tool in tools %}
205
+ {{- '<|tool>' -}}
206
+ {{- format_function_declaration(tool) | trim -}}
207
+ {{- '<tool|>' -}}
208
+ {%- endfor %}
209
+ {%- set ns.prev_message_type = 'tool' -%}
210
+ {%- endif -%}
211
+
212
+ {{- '<turn|>\n' -}}
213
+ {%- endif %}
214
+
215
+ {#- Pre-scan: find last user message index for reasoning guard -#}
216
+ {%- set ns_turn = namespace(last_user_idx=-1) -%}
217
+ {%- for i in range(loop_messages | length) -%}
218
+ {%- if loop_messages[i]['role'] == 'user' -%}
219
+ {%- set ns_turn.last_user_idx = i -%}
220
+ {%- endif -%}
221
+ {%- endfor -%}
222
+
223
+ {#- Loop through messages -#}
224
+ {%- for message in loop_messages -%}
225
+ {%- if message['role'] != 'tool' -%}
226
+ {%- set ns.prev_message_type = None -%}
227
+ {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
228
+ {#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}
229
+ {%- set prev_nt = namespace(role=None, found=false) -%}
230
+ {%- if loop.index0 > 0 -%}
231
+ {%- for j in range(loop.index0 - 1, -1, -1) -%}
232
+ {%- if not prev_nt.found -%}
233
+ {%- if loop_messages[j]['role'] != 'tool' -%}
234
+ {%- set prev_nt.role = loop_messages[j]['role'] -%}
235
+ {%- set prev_nt.found = true -%}
236
+ {%- endif -%}
237
+ {%- endif -%}
238
+ {%- endfor -%}
239
+ {%- endif -%}
240
+ {%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}
241
+ {%- if not continue_same_model_turn -%}
242
+ {{- '<|turn>' + role + '\n' }}
243
+ {%- endif -%}
244
+
245
+ {#- Render reasoning/reasoning_content as thinking channel -#}
246
+ {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
247
+ {%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}
248
+ {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
249
+ {%- endif -%}
250
+
251
+ {%- if message['tool_calls'] -%}
252
+ {%- for tool_call in message['tool_calls'] -%}
253
+ {%- set function = tool_call['function'] -%}
254
+ {{- '<|tool_call>call:' + function['name'] + '{' -}}
255
+ {%- if function['arguments'] is mapping -%}
256
+ {%- set ns_args = namespace(found_first=false) -%}
257
+ {%- for key, value in function['arguments'] | dictsort -%}
258
+ {%- if ns_args.found_first %},{% endif -%}
259
+ {%- set ns_args.found_first = true -%}
260
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
261
+ {%- endfor -%}
262
+ {%- elif function['arguments'] is string -%}
263
+ {{- function['arguments'] -}}
264
+ {%- endif -%}
265
+ {{- '}<tool_call|>' -}}
266
+ {%- endfor -%}
267
+ {%- set ns.prev_message_type = 'tool_call' -%}
268
+ {%- endif -%}
269
+
270
+ {%- set ns_tr_out = namespace(flag=false) -%}
271
+ {%- if message.get('tool_responses') -%}
272
+ {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
273
+ {%- for tool_response in message['tool_responses'] -%}
274
+ {{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}
275
+ {%- set ns_tr_out.flag = true -%}
276
+ {%- set ns.prev_message_type = 'tool_response' -%}
277
+ {%- endfor -%}
278
+ {%- elif message.get('tool_calls') -%}
279
+ {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
280
+ {%- set ns_tool_scan = namespace(stopped=false) -%}
281
+ {%- for k in range(loop.index0 + 1, loop_messages | length) -%}
282
+ {%- if ns_tool_scan.stopped -%}
283
+ {%- elif loop_messages[k]['role'] != 'tool' -%}
284
+ {%- set ns_tool_scan.stopped = true -%}
285
+ {%- else -%}
286
+ {%- set follow = loop_messages[k] -%}
287
+ {#- Resolve tool_call_id to function name -#}
288
+ {%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}
289
+ {%- for tc in message['tool_calls'] -%}
290
+ {%- if tc.get('id') == follow.get('tool_call_id') -%}
291
+ {%- set ns_tname.name = tc['function']['name'] -%}
292
+ {%- endif -%}
293
+ {%- endfor -%}
294
+ {#- Handle content as string or content-parts array -#}
295
+ {%- set tool_body = follow.get('content') -%}
296
+ {%- if tool_body is string -%}
297
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
298
+ {%- elif tool_body is sequence and tool_body is not string -%}
299
+ {%- set ns_txt = namespace(s='') -%}
300
+ {%- for part in tool_body -%}
301
+ {%- if part.get('type') == 'text' -%}
302
+ {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
303
+ {%- endif -%}
304
+ {%- endfor -%}
305
+ {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
306
+ {%- else -%}
307
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
308
+ {%- endif -%}
309
+ {%- set ns_tr_out.flag = true -%}
310
+ {%- set ns.prev_message_type = 'tool_response' -%}
311
+ {%- endif -%}
312
+ {%- endfor -%}
313
+ {%- endif -%}
314
+
315
+ {%- if message['content'] is string -%}
316
+ {%- if role == 'model' -%}
317
+ {{- strip_thinking(message['content']) -}}
318
+ {%- else -%}
319
+ {{- message['content'] | trim -}}
320
+ {%- endif -%}
321
+ {%- elif message['content'] is sequence -%}
322
+ {%- for item in message['content'] -%}
323
+ {%- if item['type'] == 'text' -%}
324
+ {%- if role == 'model' -%}
325
+ {{- strip_thinking(item['text']) -}}
326
+ {%- else -%}
327
+ {{- item['text'] | trim -}}
328
+ {%- endif -%}
329
+ {%- elif item['type'] == 'image' -%}
330
+ {{- '<|image|>' -}}
331
+ {%- set ns.prev_message_type = 'image' -%}
332
+ {%- elif item['type'] == 'audio' -%}
333
+ {{- '<|audio|>' -}}
334
+ {%- set ns.prev_message_type = 'audio' -%}
335
+ {%- elif item['type'] == 'video' -%}
336
+ {{- '<|video|>' -}}
337
+ {%- set ns.prev_message_type = 'video' -%}
338
+ {%- endif -%}
339
+ {%- endfor -%}
340
+ {%- endif -%}
341
+
342
+ {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
343
+ {{- '<|tool_response>' -}}
344
+ {%- elif not (ns_tr_out.flag and not message.get('content')) -%}
345
+ {{- '<turn|>\n' -}}
346
+ {%- endif -%}
347
+ {%- endif -%}
348
+ {%- endfor -%}
349
+
350
+ {%- if add_generation_prompt -%}
351
+ {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
352
+ {{- '<|turn>model\n' -}}
353
+ {%- endif -%}
354
+ {%- endif -%}
config.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 1,
6
+ 106,
7
+ 50
8
+ ],
9
+ "pad_token_id": 0,
10
+ "temperature": 1.0,
11
+ "top_k": 64,
12
+ "top_p": 0.95,
13
+ "transformers_version": "5.5.0"
14
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2456ece39fe87d3a29d7a4f129fa83b45cd5246c2c5400eea9b58c9b9812685f
3
+ size 5366946497
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fddb51b546abf988810d7d6ff0acd3f2f396710bedebe285478a5fe4cf630924
3
+ size 439302953
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
processor_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_seq_length": 750,
3
+ "image_processor": {
4
+ "do_convert_rgb": true,
5
+ "do_normalize": false,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.0,
10
+ 0.0,
11
+ 0.0
12
+ ],
13
+ "image_processor_type": "Gemma4ImageProcessor",
14
+ "image_seq_length": 280,
15
+ "image_std": [
16
+ 1.0,
17
+ 1.0,
18
+ 1.0
19
+ ],
20
+ "max_soft_tokens": 280,
21
+ "patch_size": 16,
22
+ "pooling_kernel_size": 3,
23
+ "resample": 3,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 224,
27
+ "width": 224
28
+ }
29
+ },
30
+ "image_seq_length": 280,
31
+ "processor_class": "Gemma4Processor",
32
+ "feature_extractor": {
33
+ "feature_extractor_type": "Gemma4AudioFeatureExtractor",
34
+ "sampling_rate": 16000,
35
+ "num_mel_filters": 128,
36
+ "fft_length": 512,
37
+ "hop_length": 160,
38
+ "chunk_duration": 8.0,
39
+ "overlap_duration": 1.0
40
+ },
41
+ "audio_ms_per_token": 40
42
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2619fe11b50dbed06ac443c51d757b354d0b62d64baa514404d4e84e6713519
3
+ size 32169780
tokenizer_config.json ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
21
+ "mask_token": "<mask>",
22
+ "max_length": null,
23
+ "model_max_length": 1000000000000000019884624838656,
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_to_multiple_of": null,
45
+ "pad_token": "<pad>",
46
+ "pad_token_type_id": 0,
47
+ "padding_side": "left",
48
+ "processor_class": "Gemma4Processor",
49
+ "response_schema": {
50
+ "properties": {
51
+ "content": {
52
+ "type": "string"
53
+ },
54
+ "role": {
55
+ "const": "assistant"
56
+ },
57
+ "thinking": {
58
+ "type": "string"
59
+ },
60
+ "tool_calls": {
61
+ "items": {
62
+ "properties": {
63
+ "function": {
64
+ "properties": {
65
+ "arguments": {
66
+ "additionalProperties": {},
67
+ "type": "object",
68
+ "x-parser": "gemma4-tool-call"
69
+ },
70
+ "name": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "type": "object",
75
+ "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
76
+ },
77
+ "type": {
78
+ "const": "function"
79
+ }
80
+ },
81
+ "type": "object"
82
+ },
83
+ "type": "array",
84
+ "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
85
+ }
86
+ },
87
+ "type": "object",
88
+ "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
89
+ },
90
+ "soc_token": "<|channel>",
91
+ "sot_token": "<|turn>",
92
+ "stc_token": "<|tool_call>",
93
+ "std_token": "<|tool>",
94
+ "str_token": "<|tool_response>",
95
+ "think_token": "<|think|>",
96
+ "tokenizer_class": "GemmaTokenizer",
97
+ "unk_token": "<unk>"
98
+ }