SurgeFF commited on
Commit
12b9625
·
verified ·
1 Parent(s): 74d78ce

original Aria v17 LoRA adapter under adapter/

Browse files
adapter/adapter_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Gemma4UnifiedForConditionalGeneration",
7
+ "parent_library": "transformers.models.gemma4_unified.modeling_gemma4_unified",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/gemma-4-12b-it",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0.0,
26
+ "lora_ga_config": null,
27
+ "megatron_config": null,
28
+ "megatron_core": "megatron.core",
29
+ "modules_to_save": null,
30
+ "monteclora_config": null,
31
+ "peft_type": "LORA",
32
+ "peft_version": "0.20.0",
33
+ "qalora_group_size": 16,
34
+ "r": 32,
35
+ "rank_pattern": {},
36
+ "revision": null,
37
+ "target_modules": [
38
+ "lm_head",
39
+ "gate_proj",
40
+ "q_proj",
41
+ "up_proj",
42
+ "k_proj",
43
+ "o_proj",
44
+ "embed_tokens",
45
+ "v_proj",
46
+ "down_proj"
47
+ ],
48
+ "target_parameters": null,
49
+ "task_type": "CAUSAL_LM",
50
+ "trainable_token_indices": null,
51
+ "use_bdlora": null,
52
+ "use_dora": false,
53
+ "use_qalora": false,
54
+ "use_rslora": false,
55
+ "velora_config": null
56
+ }
adapter/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b8910c240acbe689dc9c8b04f6a681a7dc25068a27a9d2df7805c02566f3911
3
+ size 4619273272
adapter/chat_template.jinja ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- macro format_parameters(properties, required, filter_keys=false) -%}
2
+ {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
3
+ {%- set ns = namespace(found_first=false) -%}
4
+ {%- for key, value in properties | dictsort -%}
5
+ {%- set add_comma = false -%}
6
+ {%- if not filter_keys or key not in standard_keys -%}
7
+ {%- if ns.found_first %},{% endif -%}
8
+ {%- set ns.found_first = true -%}
9
+ {{ key }}:{
10
+ {%- if value['description'] -%}
11
+ description:<|"|>{{ value['description'] }}<|"|>
12
+ {%- set add_comma = true -%}
13
+ {%- endif -%}
14
+ {%- if value['type'] | upper == 'STRING' -%}
15
+ {%- if value['enum'] -%}
16
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
17
+ enum:{{ format_argument(value['enum']) }}
18
+ {%- endif -%}
19
+ {%- elif value['type'] | upper == 'ARRAY' -%}
20
+ {%- if value['items'] is mapping and value['items'] -%}
21
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
22
+ items:{
23
+ {%- set ns_items = namespace(found_first=false) -%}
24
+ {%- for item_key, item_value in value['items'] | dictsort -%}
25
+ {%- if item_value is not none -%}
26
+ {%- if ns_items.found_first %},{% endif -%}
27
+ {%- set ns_items.found_first = true -%}
28
+ {%- if item_key == 'properties' -%}
29
+ properties:{
30
+ {%- if item_value is mapping -%}
31
+ {{- format_parameters(item_value, value['items']['required'] | default([])) -}}
32
+ {%- endif -%}
33
+ }
34
+ {%- elif item_key == 'required' -%}
35
+ required:[
36
+ {%- for req_item in item_value -%}
37
+ <|"|>{{- req_item -}}<|"|>
38
+ {%- if not loop.last %},{% endif -%}
39
+ {%- endfor -%}
40
+ ]
41
+ {%- elif item_key == 'type' -%}
42
+ {%- if item_value is string -%}
43
+ type:{{ format_argument(item_value | upper) }}
44
+ {%- else -%}
45
+ type:{{ format_argument(item_value | map('upper') | list) }}
46
+ {%- endif -%}
47
+ {%- else -%}
48
+ {{ item_key }}:{{ format_argument(item_value) }}
49
+ {%- endif -%}
50
+ {%- endif -%}
51
+ {%- endfor -%}
52
+ }
53
+ {%- endif -%}
54
+ {%- endif -%}
55
+ {%- if value['nullable'] %}
56
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
57
+ nullable:true
58
+ {%- endif -%}
59
+ {%- if value['type'] | upper == 'OBJECT' -%}
60
+ {%- if value['properties'] is defined and value['properties'] is mapping -%}
61
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
62
+ properties:{
63
+ {{- format_parameters(value['properties'], value['required'] | default([])) -}}
64
+ }
65
+ {%- elif value is mapping -%}
66
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
67
+ properties:{
68
+ {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
69
+ }
70
+ {%- endif -%}
71
+ {%- if value['required'] -%}
72
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
73
+ required:[
74
+ {%- for item in value['required'] | default([]) -%}
75
+ <|"|>{{- item -}}<|"|>
76
+ {%- if not loop.last %},{% endif -%}
77
+ {%- endfor -%}
78
+ ]
79
+ {%- endif -%}
80
+ {%- endif -%}
81
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
82
+ type:<|"|>{{ value['type'] | upper }}<|"|>}
83
+ {%- endif -%}
84
+ {%- endfor -%}
85
+ {%- endmacro -%}
86
+ {%- macro format_function_declaration(tool_data) -%}
87
+ declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
88
+ {%- set params = tool_data['function']['parameters'] -%}
89
+ {%- if params -%}
90
+ ,parameters:{
91
+ {%- if params['properties'] -%}
92
+ properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
93
+ {%- endif -%}
94
+ {%- if params['required'] -%}
95
+ required:[
96
+ {%- for item in params['required'] -%}
97
+ <|"|>{{- item -}}<|"|>
98
+ {{- ',' if not loop.last -}}
99
+ {%- endfor -%}
100
+ ],
101
+ {%- endif -%}
102
+ {%- if params['type'] -%}
103
+ type:<|"|>{{- params['type'] | upper -}}<|"|>}
104
+ {%- endif -%}
105
+ {%- endif -%}
106
+ {%- if 'response' in tool_data['function'] -%}
107
+ {%- set response_declaration = tool_data['function']['response'] -%}
108
+ ,response:{
109
+ {%- if response_declaration['description'] -%}
110
+ description:<|"|>{{- response_declaration['description'] -}}<|"|>,
111
+ {%- endif -%}
112
+ {%- if response_declaration['type'] | upper == 'OBJECT' -%}
113
+ type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
114
+ {%- endif -%}
115
+ {%- endif -%}
116
+ }
117
+ {%- endmacro -%}
118
+ {%- macro format_argument(argument, escape_keys=True) -%}
119
+ {%- if argument is none -%}
120
+ {{- 'null' -}}
121
+ {%- elif argument is string -%}
122
+ {{- '<|"|>' + argument + '<|"|>' -}}
123
+ {%- elif argument is boolean -%}
124
+ {{- 'true' if argument else 'false' -}}
125
+ {%- elif argument is mapping -%}
126
+ {{- '{' -}}
127
+ {%- set ns = namespace(found_first=false) -%}
128
+ {%- for key, value in argument | dictsort -%}
129
+ {%- if ns.found_first %},{% endif -%}
130
+ {%- set ns.found_first = true -%}
131
+ {%- if escape_keys -%}
132
+ {{- '<|"|>' + key + '<|"|>' -}}
133
+ {%- else -%}
134
+ {{- key -}}
135
+ {%- endif -%}
136
+ :{{- format_argument(value, escape_keys=escape_keys) -}}
137
+ {%- endfor -%}
138
+ {{- '}' -}}
139
+ {%- elif argument is sequence -%}
140
+ {{- '[' -}}
141
+ {%- for item in argument -%}
142
+ {{- format_argument(item, escape_keys=escape_keys) -}}
143
+ {%- if not loop.last %},{% endif -%}
144
+ {%- endfor -%}
145
+ {{- ']' -}}
146
+ {%- else -%}
147
+ {{- argument -}}
148
+ {%- endif -%}
149
+ {%- endmacro -%}
150
+ {%- macro strip_thinking(text) -%}
151
+ {%- set ns = namespace(result='') -%}
152
+ {%- for part in text.split('<channel|>') -%}
153
+ {%- if '<|channel>' in part -%}
154
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
155
+ {%- else -%}
156
+ {%- set ns.result = ns.result + part -%}
157
+ {%- endif -%}
158
+ {%- endfor -%}
159
+ {{- ns.result | trim -}}
160
+ {%- endmacro -%}
161
+
162
+ {%- macro format_tool_response_block(tool_name, response) -%}
163
+ {{- '<|tool_response>' -}}
164
+ {%- if response is mapping -%}
165
+ {{- 'response:' + tool_name + '{' -}}
166
+ {%- for key, value in response | dictsort -%}
167
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
168
+ {%- if not loop.last %},{% endif -%}
169
+ {%- endfor -%}
170
+ {{- '}' -}}
171
+ {%- else -%}
172
+ {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
173
+ {%- endif -%}
174
+ {{- '<tool_response|>' -}}
175
+ {%- endmacro -%}
176
+
177
+ {#- ===== SETUP ===== -#}
178
+ {%- set ns = namespace(prev_message_type=None, prev_non_tool_role=None) -%}
179
+ {%- set loop_messages = messages -%}
180
+ {%- set enable_thinking = enable_thinking | default(false) -%}
181
+ {%- set preserve_thinking = preserve_thinking | default(false) -%}
182
+ {{- bos_token -}}
183
+ {#- Handle System/Tool Definitions Block -#}
184
+ {%- if enable_thinking or tools or (messages and messages[0]['role'] in ['system', 'developer']) -%}
185
+ {{- '<|turn>system\n' -}}
186
+ {#- Inject Thinking token at the very top of the FIRST system turn -#}
187
+ {%- if enable_thinking -%}
188
+ {{- '<|think|>\n' -}}
189
+ {%- set ns.prev_message_type = 'think' -%}
190
+ {%- endif -%}
191
+ {%- if messages and messages[0]['role'] in ['system', 'developer'] -%}
192
+ {%- if messages[0]['content'] is string -%}
193
+ {{- messages[0]['content'] | trim -}}
194
+ {%- elif messages[0]['content'] is sequence -%}
195
+ {%- for item in messages[0]['content'] -%}
196
+ {{- item['text'] | trim + ' '-}}
197
+ {%- endfor -%}
198
+ {%- endif -%}
199
+ {%- set loop_messages = messages[1:] -%}
200
+ {%- endif -%}
201
+ {%- if tools -%}
202
+ {%- for tool in tools %}
203
+ {{- '<|tool>' -}}
204
+ {{- format_function_declaration(tool) | trim -}}
205
+ {{- '<tool|>' -}}
206
+ {%- endfor %}
207
+ {%- set ns.prev_message_type = 'tool' -%}
208
+ {%- endif -%}
209
+ {{- '<turn|>\n' -}}
210
+ {%- endif %}
211
+
212
+ {#- Pre-scan: find last user message index for reasoning guard -#}
213
+ {%- set ns_turn = namespace(last_user_idx=-1) -%}
214
+ {%- for i in range(loop_messages | length) -%}
215
+ {%- if loop_messages[i]['role'] == 'user' -%}
216
+ {%- set ns_turn.last_user_idx = i -%}
217
+ {%- endif -%}
218
+ {%- endfor -%}
219
+
220
+ {#- Loop through messages -#}
221
+ {%- for message in loop_messages -%}
222
+ {%- if message['role'] != 'tool' -%}
223
+ {%- set ns.prev_message_type = None -%}
224
+ {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
225
+ {#- Detect continuation using tracked state — O(1) instead of O(n) backward scan -#}
226
+ {%- set continue_same_model_turn = (role == 'model' and ns.prev_non_tool_role == 'assistant') -%}
227
+ {%- if not continue_same_model_turn -%}
228
+ {{- '<|turn>' + role + '\n' }}
229
+
230
+ {%- endif -%}
231
+
232
+ {#- Render reasoning/reasoning_content as thinking channel -#}
233
+ {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
234
+ {%- set thinking_gate = (loop.index0 > ns_turn.last_user_idx) or (preserve_thinking and message.get('tool_calls')) -%}
235
+ {%- if thinking_text and thinking_gate -%}
236
+ {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
237
+ {%- endif -%}
238
+
239
+ {%- if message.get('tool_calls') -%}
240
+ {%- for tool_call in message.get('tool_calls') -%}
241
+ {%- set function = tool_call['function'] -%}
242
+ {{- '<|tool_call>call:' + function['name'] + '{' -}}
243
+ {%- if function['arguments'] is mapping -%}
244
+ {%- set ns_args = namespace(found_first=false) -%}
245
+ {%- for key, value in function['arguments'] | dictsort -%}
246
+ {%- if ns_args.found_first %},{% endif -%}
247
+ {%- set ns_args.found_first = true -%}
248
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
249
+ {%- endfor -%}
250
+ {%- elif function['arguments'] is none -%}
251
+ {%- elif function['arguments'] is string -%}
252
+ {#- Pre-serialized args (e.g. an OpenAI JSON string). We cannot JSON-parse
253
+ portably in-template, so render non-fatally instead of erroring. Strip an
254
+ outer {...} so it composes with the DSL braces rather than double-wrapping.
255
+ Prefer passing arguments as a mapping for exact Gemma DSL. -#}
256
+ {%- set argstr = function['arguments'] | trim -%}
257
+ {%- if argstr[:1] == '{' and argstr[-1:] == '}' -%}
258
+ {{- argstr[1:-1] -}}
259
+ {%- else -%}
260
+ {{- function['arguments'] -}}
261
+ {%- endif -%}
262
+ {%- endif -%}
263
+ {{- '}<tool_call|>' -}}
264
+ {%- endfor -%}
265
+ {%- set ns.prev_message_type = 'tool_call' -%}
266
+ {%- endif -%}
267
+
268
+ {%- set ns_tr_out = namespace(flag=false) -%}
269
+ {%- if message.get('tool_responses') -%}
270
+ {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
271
+ {%- for tool_response in message.get('tool_responses') -%}
272
+ {{- format_tool_response_block(tool_response['name'] | default('unknown', true), tool_response['response']) -}}
273
+ {%- set ns_tr_out.flag = true -%}
274
+ {%- set ns.prev_message_type = 'tool_response' -%}
275
+ {%- endfor -%}
276
+ {%- elif message.get('tool_calls') -%}
277
+ {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
278
+ {%- set ns_tool_scan = namespace(stopped=false) -%}
279
+ {%- for k in range(loop.index0 + 1, loop_messages | length) -%}
280
+ {%- if ns_tool_scan.stopped -%}
281
+ {%- elif loop_messages[k]['role'] != 'tool' -%}
282
+ {%- set ns_tool_scan.stopped = true -%}
283
+ {%- else -%}
284
+ {%- set follow = loop_messages[k] -%}
285
+ {#- Resolve tool_call_id to function name -#}
286
+ {%- set ns_tname = namespace(name=follow.get('name') or 'unknown') -%}
287
+ {%- for tc in message.get('tool_calls') -%}
288
+ {%- if tc.get('id') == follow.get('tool_call_id') -%}
289
+ {%- set ns_tname.name = tc['function']['name'] -%}
290
+ {%- endif -%}
291
+ {%- endfor -%}
292
+ {#- Handle content as string or content-parts array -#}
293
+ {%- set tool_body = follow.get('content') -%}
294
+ {%- if tool_body is string -%}
295
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
296
+ {%- elif tool_body is sequence and tool_body is not string -%}
297
+ {%- set ns_txt = namespace(s='') -%}
298
+ {%- for part in tool_body -%}
299
+ {%- if part.get('type') == 'text' -%}
300
+ {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
301
+ {%- endif -%}
302
+ {%- endfor -%}
303
+ {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
304
+ {%- for part in tool_body -%}
305
+ {%- if part.get('type') in ['image', 'image_url'] -%}
306
+ {{- '<|image|>' -}}
307
+ {%- elif part.get('type') in ['audio', 'input_audio'] -%}
308
+ {{- '<|audio|>' -}}
309
+ {%- elif part.get('type') == 'video' -%}
310
+ {{- '<|video|>' -}}
311
+ {%- endif -%}
312
+ {%- endfor -%}
313
+ {%- else -%}
314
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
315
+ {%- endif -%}
316
+ {%- set ns_tr_out.flag = true -%}
317
+ {%- set ns.prev_message_type = 'tool_response' -%}
318
+ {%- endif -%}
319
+ {%- endfor -%}
320
+ {%- endif -%}
321
+
322
+ {%- set captured_content -%}
323
+ {%- if message.get('content') is string -%}
324
+ {%- if role == 'model' -%}
325
+ {{- strip_thinking(message['content']) -}}
326
+ {%- else -%}
327
+ {{- message['content'] | trim -}}
328
+ {%- endif -%}
329
+ {%- elif message.get('content') is sequence -%}
330
+ {%- for item in message['content'] -%}
331
+ {%- if item.get('type') == 'text' -%}
332
+ {%- if role == 'model' -%}
333
+ {{- strip_thinking(item['text']) -}}
334
+ {%- else -%}
335
+ {{- item['text'] | trim -}}
336
+ {%- endif -%}
337
+ {%- elif item.get('type') in ['image', 'image_url'] -%}
338
+ {{- '<|image|>' -}}
339
+ {%- elif item.get('type') in ['audio', 'input_audio'] -%}
340
+ {{- '<|audio|>' -}}
341
+ {%- elif item.get('type') == 'video' -%}
342
+ {{- '<|video|>' -}}
343
+ {%- endif -%}
344
+ {%- endfor -%}
345
+ {%- endif -%}
346
+ {%- endset -%}
347
+
348
+ {{- captured_content -}}
349
+ {%- set has_content = captured_content | trim | length > 0 -%}
350
+
351
+ {#- Forward-scan: find next non-tool message role for continuation detection -#}
352
+ {%- set next_nt = namespace(role=None, found=false) -%}
353
+ {%- for j in range(loop.index0 + 1, loop_messages | length) -%}
354
+ {%- if not next_nt.found -%}
355
+ {%- if loop_messages[j]['role'] != 'tool' -%}
356
+ {%- set next_nt.role = loop_messages[j]['role'] -%}
357
+ {%- set next_nt.found = true -%}
358
+ {%- endif -%}
359
+ {%- endif -%}
360
+ {%- endfor -%}
361
+
362
+ {%- set continues_into_next = (
363
+ role == 'model'
364
+ and next_nt.role == 'assistant'
365
+ and (not message.get('tool_calls') or ns_tr_out.flag)
366
+ ) -%}
367
+
368
+ {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
369
+ {{- '<|tool_response>' -}}
370
+ {%- elif continues_into_next -%}
371
+ {%- elif not (ns_tr_out.flag and not has_content and not next_nt.found) -%}
372
+ {{- '<turn|>\n' -}}
373
+ {%- endif -%}
374
+
375
+ {#- Track previous non-tool role for next iteration (avoids O(n) backward scan) -#}
376
+ {%- set ns.prev_non_tool_role = message['role'] -%}
377
+ {%- endif -%}
378
+ {%- endfor -%}
379
+
380
+ {%- if add_generation_prompt -%}
381
+ {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
382
+ {{- '<|turn>model\n' -}}
383
+ {%- if not enable_thinking -%}
384
+ {{- '<|channel>thought\n<channel|>' -}}
385
+ {%- endif -%}
386
+ {%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
387
+ {{- '<|channel>thought\n' -}}
388
+ {%- endif -%}
389
+ {%- endif -%}
adapter/processor_config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_ms_per_token": 40,
3
+ "audio_seq_length": 750,
4
+ "feature_extractor": {
5
+ "audio_samples_per_token": 640,
6
+ "feature_extractor_type": "Gemma4UnifiedAudioFeatureExtractor",
7
+ "feature_size": 640,
8
+ "padding_side": "right",
9
+ "padding_value": 0.0,
10
+ "return_attention_mask": true,
11
+ "sampling_rate": 16000
12
+ },
13
+ "image_processor": {
14
+ "do_convert_rgb": true,
15
+ "do_normalize": false,
16
+ "do_rescale": true,
17
+ "do_resize": true,
18
+ "image_mean": [
19
+ 0.0,
20
+ 0.0,
21
+ 0.0
22
+ ],
23
+ "image_processor_type": "Gemma4UnifiedImageProcessor",
24
+ "image_std": [
25
+ 1.0,
26
+ 1.0,
27
+ 1.0
28
+ ],
29
+ "max_soft_tokens": 280,
30
+ "patch_size": 16,
31
+ "pooling_kernel_size": 3,
32
+ "resample": 3,
33
+ "rescale_factor": 0.00392156862745098
34
+ },
35
+ "image_seq_length": 280,
36
+ "processor_class": "Gemma4UnifiedProcessor",
37
+ "video_processor": {
38
+ "do_convert_rgb": true,
39
+ "do_normalize": true,
40
+ "do_rescale": true,
41
+ "do_resize": true,
42
+ "do_sample_frames": true,
43
+ "image_mean": [
44
+ 0.0,
45
+ 0.0,
46
+ 0.0
47
+ ],
48
+ "image_std": [
49
+ 1.0,
50
+ 1.0,
51
+ 1.0
52
+ ],
53
+ "max_soft_tokens": 70,
54
+ "num_frames": 32,
55
+ "patch_size": 16,
56
+ "pooling_kernel_size": 3,
57
+ "resample": 3,
58
+ "rescale_factor": 0.00392156862745098,
59
+ "return_metadata": false,
60
+ "video_processor_type": "Gemma4UnifiedVideoProcessor"
61
+ }
62
+ }
adapter/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:435198dd84a7fa659300af3e5c30918fb6acaaf3365d6398b67ab87d1eb36288
3
+ size 32169880
adapter/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": "Gemma4UnifiedProcessor",
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
+ }
adapter/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a419b67f1726f6648054d5f6b07a7a6658c3d6376bce61ebccfd4006b5dff4aa
3
+ size 5777