openfree commited on
Commit
6b296ae
·
verified ·
1 Parent(s): 0af0982

upload model weights

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,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ko
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ ---
7
+
8
+ # JGOS-31B-Citizen
9
+
10
+ 전남·광주 통합특별시 시민을 위한 AI 어시스턴트입니다.
chat_template.jinja ADDED
@@ -0,0 +1,355 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set enable_thinking = enable_thinking if enable_thinking is defined else true -%}
2
+ {%- macro format_parameters(properties, required, filter_keys=false) -%}
3
+ {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
4
+ {%- set ns = namespace(found_first=false) -%}
5
+ {%- for key, value in properties | dictsort -%}
6
+ {%- set add_comma = false -%}
7
+ {%- if not filter_keys or key not in standard_keys -%}
8
+ {%- if ns.found_first %},{% endif -%}
9
+ {%- set ns.found_first = true -%}
10
+ {{ key }}:{
11
+ {%- if value['description'] -%}
12
+ description:<|"|>{{ value['description'] }}<|"|>
13
+ {%- set add_comma = true -%}
14
+ {%- endif -%}
15
+ {%- if value['type'] | upper == 'STRING' -%}
16
+ {%- if value['enum'] -%}
17
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
18
+ enum:{{ format_argument(value['enum']) }}
19
+ {%- endif -%}
20
+ {%- elif value['type'] | upper == 'ARRAY' -%}
21
+ {%- if value['items'] is mapping and value['items'] -%}
22
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
23
+ items:{
24
+ {%- set ns_items = namespace(found_first=false) -%}
25
+ {%- for item_key, item_value in value['items'] | dictsort -%}
26
+ {%- if item_value is not none -%}
27
+ {%- if ns_items.found_first %},{% endif -%}
28
+ {%- set ns_items.found_first = true -%}
29
+ {%- if item_key == 'properties' -%}
30
+ properties:{
31
+ {%- if item_value is mapping -%}
32
+ {{- format_parameters(item_value, value['items']['required'] | default([])) -}}
33
+ {%- endif -%}
34
+ }
35
+ {%- elif item_key == 'required' -%}
36
+ required:[
37
+ {%- for req_item in item_value -%}
38
+ <|"|>{{- req_item -}}<|"|>
39
+ {%- if not loop.last %},{% endif -%}
40
+ {%- endfor -%}
41
+ ]
42
+ {%- elif item_key == 'type' -%}
43
+ {%- if item_value is string -%}
44
+ type:{{ format_argument(item_value | upper) }}
45
+ {%- else -%}
46
+ type:{{ format_argument(item_value | map('upper') | list) }}
47
+ {%- endif -%}
48
+ {%- else -%}
49
+ {{ item_key }}:{{ format_argument(item_value) }}
50
+ {%- endif -%}
51
+ {%- endif -%}
52
+ {%- endfor -%}
53
+ }
54
+ {%- endif -%}
55
+ {%- endif -%}
56
+ {%- if value['nullable'] %}
57
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
58
+ nullable:true
59
+ {%- endif -%}
60
+ {%- if value['type'] | upper == 'OBJECT' -%}
61
+ {%- if value['properties'] is defined and value['properties'] is mapping -%}
62
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
63
+ properties:{
64
+ {{- format_parameters(value['properties'], value['required'] | default([])) -}}
65
+ }
66
+ {%- elif value is mapping -%}
67
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
68
+ properties:{
69
+ {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
70
+ }
71
+ {%- endif -%}
72
+ {%- if value['required'] -%}
73
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
74
+ required:[
75
+ {%- for item in value['required'] | default([]) -%}
76
+ <|"|>{{- item -}}<|"|>
77
+ {%- if not loop.last %},{% endif -%}
78
+ {%- endfor -%}
79
+ ]
80
+ {%- endif -%}
81
+ {%- endif -%}
82
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
83
+ type:<|"|>{{ value['type'] | upper }}<|"|>}
84
+ {%- endif -%}
85
+ {%- endfor -%}
86
+ {%- endmacro -%}
87
+ {%- macro format_function_declaration(tool_data) -%}
88
+ declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
89
+ {%- set params = tool_data['function']['parameters'] -%}
90
+ {%- if params -%}
91
+ ,parameters:{
92
+ {%- if params['properties'] -%}
93
+ properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
94
+ {%- endif -%}
95
+ {%- if params['required'] -%}
96
+ required:[
97
+ {%- for item in params['required'] -%}
98
+ <|"|>{{- item -}}<|"|>
99
+ {{- ',' if not loop.last -}}
100
+ {%- endfor -%}
101
+ ],
102
+ {%- endif -%}
103
+ {%- if params['type'] -%}
104
+ type:<|"|>{{- params['type'] | upper -}}<|"|>}
105
+ {%- endif -%}
106
+ {%- endif -%}
107
+ {%- if 'response' in tool_data['function'] -%}
108
+ {%- set response_declaration = tool_data['function']['response'] -%}
109
+ ,response:{
110
+ {%- if response_declaration['description'] -%}
111
+ description:<|"|>{{- response_declaration['description'] -}}<|"|>,
112
+ {%- endif -%}
113
+ {%- if response_declaration['type'] | upper == 'OBJECT' -%}
114
+ type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
115
+ {%- endif -%}
116
+ {%- endif -%}
117
+ }
118
+ {%- endmacro -%}
119
+ {%- macro format_argument(argument, escape_keys=True) -%}
120
+ {%- if argument is string -%}
121
+ {{- '<|"|>' + argument + '<|"|>' -}}
122
+ {%- elif argument is boolean -%}
123
+ {{- 'true' if argument else 'false' -}}
124
+ {%- elif argument is mapping -%}
125
+ {{- '{' -}}
126
+ {%- set ns = namespace(found_first=false) -%}
127
+ {%- for key, value in argument | dictsort -%}
128
+ {%- if ns.found_first %},{% endif -%}
129
+ {%- set ns.found_first = true -%}
130
+ {%- if escape_keys -%}
131
+ {{- '<|"|>' + key + '<|"|>' -}}
132
+ {%- else -%}
133
+ {{- key -}}
134
+ {%- endif -%}
135
+ :{{- format_argument(value, escape_keys=escape_keys) -}}
136
+ {%- endfor -%}
137
+ {{- '}' -}}
138
+ {%- elif argument is sequence -%}
139
+ {{- '[' -}}
140
+ {%- for item in argument -%}
141
+ {{- format_argument(item, escape_keys=escape_keys) -}}
142
+ {%- if not loop.last %},{% endif -%}
143
+ {%- endfor -%}
144
+ {{- ']' -}}
145
+ {%- else -%}
146
+ {{- argument -}}
147
+ {%- endif -%}
148
+ {%- endmacro -%}
149
+ {%- macro strip_thinking(text) -%}
150
+ {%- set ns = namespace(result='') -%}
151
+ {%- for part in text.split('<channel|>') -%}
152
+ {%- if '<|channel>' in part -%}
153
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
154
+ {%- else -%}
155
+ {%- set ns.result = ns.result + part -%}
156
+ {%- endif -%}
157
+ {%- endfor -%}
158
+ {{- ns.result | trim -}}
159
+ {%- endmacro -%}
160
+
161
+ {%- macro format_tool_response_block(tool_name, response) -%}
162
+ {{- '<|tool_response>' -}}
163
+ {%- if response is mapping -%}
164
+ {{- 'response:' + tool_name + '{' -}}
165
+ {%- for key, value in response | dictsort -%}
166
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
167
+ {%- if not loop.last %},{% endif -%}
168
+ {%- endfor -%}
169
+ {{- '}' -}}
170
+ {%- else -%}
171
+ {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
172
+ {%- endif -%}
173
+ {{- '<tool_response|>' -}}
174
+ {%- endmacro -%}
175
+
176
+ {%- set ns = namespace(prev_message_type=None) -%}
177
+ {%- set loop_messages = messages -%}
178
+ {{- bos_token -}}
179
+ {#- Handle System/Tool Definitions Block -#}
180
+ {%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}
181
+ {{- '<|turn>system\n' -}}
182
+ {#- Inject Thinking token at the very top of the FIRST system turn -#}
183
+ {%- if enable_thinking is defined and enable_thinking -%}
184
+ {{- '<|think|>\n' -}}
185
+ {%- set ns.prev_message_type = 'think' -%}
186
+ {%- endif -%}
187
+ {%- if messages[0]['role'] in ['system', 'developer'] -%}
188
+ {%- if messages[0]['content'] is string -%}
189
+ {{- messages[0]['content'] | trim -}}
190
+ {%- elif messages[0]['content'] is sequence -%}
191
+ {%- for item in messages[0]['content'] -%}
192
+ {{- item['text'] | trim + ' '-}}
193
+ {%- endfor -%}
194
+ {%- endif -%}
195
+ {%- set loop_messages = messages[1:] -%}
196
+ {%- endif -%}
197
+ {%- if tools -%}
198
+ {%- for tool in tools %}
199
+ {{- '<|tool>' -}}
200
+ {{- format_function_declaration(tool) | trim -}}
201
+ {{- '<tool|>' -}}
202
+ {%- endfor %}
203
+ {%- set ns.prev_message_type = 'tool' -%}
204
+ {%- endif -%}
205
+ {{- '<turn|>\n' -}}
206
+ {%- endif %}
207
+
208
+ {#- Pre-scan: find last user message index for reasoning guard -#}
209
+ {%- set ns_turn = namespace(last_user_idx=-1) -%}
210
+ {%- for i in range(loop_messages | length) -%}
211
+ {%- if loop_messages[i]['role'] == 'user' -%}
212
+ {%- set ns_turn.last_user_idx = i -%}
213
+ {%- endif -%}
214
+ {%- endfor -%}
215
+
216
+ {#- Loop through messages -#}
217
+ {%- for message in loop_messages -%}
218
+ {%- if message['role'] != 'tool' -%}
219
+ {%- set ns.prev_message_type = None -%}
220
+ {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
221
+ {#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}
222
+ {%- set prev_nt = namespace(role=None, found=false) -%}
223
+ {%- if loop.index0 > 0 -%}
224
+ {%- for j in range(loop.index0 - 1, -1, -1) -%}
225
+ {%- if not prev_nt.found -%}
226
+ {%- if loop_messages[j]['role'] != 'tool' -%}
227
+ {%- set prev_nt.role = loop_messages[j]['role'] -%}
228
+ {%- set prev_nt.found = true -%}
229
+ {%- endif -%}
230
+ {%- endif -%}
231
+ {%- endfor -%}
232
+ {%- endif -%}
233
+ {%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}
234
+ {%- if not continue_same_model_turn -%}
235
+ {{- '<|turn>' + role + '\n' }}
236
+ {%- endif -%}
237
+
238
+ {#- Render reasoning/reasoning_content as thinking channel -#}
239
+ {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
240
+ {%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}
241
+ {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
242
+ {%- endif -%}
243
+
244
+ {%- if message['tool_calls'] -%}
245
+ {%- for tool_call in message['tool_calls'] -%}
246
+ {%- set function = tool_call['function'] -%}
247
+ {{- '<|tool_call>call:' + function['name'] + '{' -}}
248
+ {%- if function['arguments'] is mapping -%}
249
+ {%- set ns_args = namespace(found_first=false) -%}
250
+ {%- for key, value in function['arguments'] | dictsort -%}
251
+ {%- if ns_args.found_first %},{% endif -%}
252
+ {%- set ns_args.found_first = true -%}
253
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
254
+ {%- endfor -%}
255
+ {%- elif function['arguments'] is string -%}
256
+ {{- function['arguments'] -}}
257
+ {%- endif -%}
258
+ {{- '}<tool_call|>' -}}
259
+ {%- endfor -%}
260
+ {%- set ns.prev_message_type = 'tool_call' -%}
261
+ {%- endif -%}
262
+
263
+ {%- set ns_tr_out = namespace(flag=false) -%}
264
+ {%- if message.get('tool_responses') -%}
265
+ {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
266
+ {%- for tool_response in message['tool_responses'] -%}
267
+ {{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}
268
+ {%- set ns_tr_out.flag = true -%}
269
+ {%- set ns.prev_message_type = 'tool_response' -%}
270
+ {%- endfor -%}
271
+ {%- elif message.get('tool_calls') -%}
272
+ {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
273
+ {%- set ns_tool_scan = namespace(stopped=false) -%}
274
+ {%- for k in range(loop.index0 + 1, loop_messages | length) -%}
275
+ {%- if ns_tool_scan.stopped -%}
276
+ {%- elif loop_messages[k]['role'] != 'tool' -%}
277
+ {%- set ns_tool_scan.stopped = true -%}
278
+ {%- else -%}
279
+ {%- set follow = loop_messages[k] -%}
280
+ {#- Resolve tool_call_id to function name -#}
281
+ {%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}
282
+ {%- for tc in message['tool_calls'] -%}
283
+ {%- if tc.get('id') == follow.get('tool_call_id') -%}
284
+ {%- set ns_tname.name = tc['function']['name'] -%}
285
+ {%- endif -%}
286
+ {%- endfor -%}
287
+ {#- Handle content as string or content-parts array -#}
288
+ {%- set tool_body = follow.get('content') -%}
289
+ {%- if tool_body is string -%}
290
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
291
+ {%- elif tool_body is sequence and tool_body is not string -%}
292
+ {%- set ns_txt = namespace(s='') -%}
293
+ {%- for part in tool_body -%}
294
+ {%- if part.get('type') == 'text' -%}
295
+ {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
296
+ {%- endif -%}
297
+ {%- endfor -%}
298
+ {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
299
+ {%- else -%}
300
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
301
+ {%- endif -%}
302
+ {%- set ns_tr_out.flag = true -%}
303
+ {%- set ns.prev_message_type = 'tool_response' -%}
304
+ {%- endif -%}
305
+ {%- endfor -%}
306
+ {%- endif -%}
307
+
308
+ {%- set captured_content -%}
309
+ {%- if message['content'] is string -%}
310
+ {%- if role == 'model' -%}
311
+ {{- strip_thinking(message['content']) -}}
312
+ {%- else -%}
313
+ {{- message['content'] | trim -}}
314
+ {%- endif -%}
315
+ {%- elif message['content'] is sequence -%}
316
+ {%- for item in message['content'] -%}
317
+ {%- if item['type'] == 'text' -%}
318
+ {%- if role == 'model' -%}
319
+ {{- strip_thinking(item['text']) -}}
320
+ {%- else -%}
321
+ {{- item['text'] | trim -}}
322
+ {%- endif -%}
323
+ {%- elif item['type'] == 'image' -%}
324
+ {{- '<|image|>' -}}
325
+ {%- set ns.prev_message_type = 'image' -%}
326
+ {%- elif item['type'] == 'audio' -%}
327
+ {{- '<|audio|>' -}}
328
+ {%- set ns.prev_message_type = 'audio' -%}
329
+ {%- elif item['type'] == 'video' -%}
330
+ {{- '<|video|>' -}}
331
+ {%- set ns.prev_message_type = 'video' -%}
332
+ {%- endif -%}
333
+ {%- endfor -%}
334
+ {%- endif -%}
335
+ {%- endset -%}
336
+
337
+ {{- captured_content -}}
338
+ {%- set has_content = captured_content | trim | length > 0 -%}
339
+
340
+ {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
341
+ {{- '<|tool_response>' -}}
342
+ {%- elif not (ns_tr_out.flag and not has_content) -%}
343
+ {{- '<turn|>\n' -}}
344
+ {%- endif -%}
345
+ {%- endif -%}
346
+ {%- endfor -%}
347
+
348
+ {%- if add_generation_prompt -%}
349
+ {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
350
+ {{- '<|turn>model\n' -}}
351
+ {%- if not enable_thinking | default(false) -%}
352
+ {{- '<|channel>thought\n<channel|>' -}}
353
+ {%- endif -%}
354
+ {%- endif -%}
355
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "dtype": "bfloat16",
11
+ "eoa_token_index": 258883,
12
+ "eoi_token_id": 258882,
13
+ "eos_token_id": 106,
14
+ "image_token_id": 258880,
15
+ "initializer_range": 0.02,
16
+ "model_type": "gemma4",
17
+ "pad_token_id": 0,
18
+ "text_config": {
19
+ "attention_bias": false,
20
+ "attention_dropout": 0.0,
21
+ "attention_k_eq_v": true,
22
+ "bos_token_id": 2,
23
+ "dtype": "bfloat16",
24
+ "enable_moe_block": false,
25
+ "eos_token_id": 1,
26
+ "expert_intermediate_size": null,
27
+ "final_logit_softcapping": 30.0,
28
+ "global_head_dim": 512,
29
+ "head_dim": 256,
30
+ "hidden_activation": "gelu_pytorch_tanh",
31
+ "hidden_size": 5376,
32
+ "hidden_size_per_layer_input": 0,
33
+ "initializer_range": 0.02,
34
+ "intermediate_size": 21504,
35
+ "layer_types": [
36
+ "sliding_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "full_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "sliding_attention",
46
+ "sliding_attention",
47
+ "full_attention",
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "sliding_attention",
52
+ "sliding_attention",
53
+ "full_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "sliding_attention",
58
+ "sliding_attention",
59
+ "full_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "sliding_attention",
64
+ "sliding_attention",
65
+ "full_attention",
66
+ "sliding_attention",
67
+ "sliding_attention",
68
+ "sliding_attention",
69
+ "sliding_attention",
70
+ "sliding_attention",
71
+ "full_attention",
72
+ "sliding_attention",
73
+ "sliding_attention",
74
+ "sliding_attention",
75
+ "sliding_attention",
76
+ "sliding_attention",
77
+ "full_attention",
78
+ "sliding_attention",
79
+ "sliding_attention",
80
+ "sliding_attention",
81
+ "sliding_attention",
82
+ "sliding_attention",
83
+ "full_attention",
84
+ "sliding_attention",
85
+ "sliding_attention",
86
+ "sliding_attention",
87
+ "sliding_attention",
88
+ "sliding_attention",
89
+ "full_attention",
90
+ "sliding_attention",
91
+ "sliding_attention",
92
+ "sliding_attention",
93
+ "sliding_attention",
94
+ "sliding_attention",
95
+ "full_attention"
96
+ ],
97
+ "max_position_embeddings": 262144,
98
+ "model_type": "gemma4_text",
99
+ "moe_intermediate_size": null,
100
+ "num_attention_heads": 32,
101
+ "num_experts": null,
102
+ "num_global_key_value_heads": 4,
103
+ "num_hidden_layers": 60,
104
+ "num_key_value_heads": 16,
105
+ "num_kv_shared_layers": 0,
106
+ "pad_token_id": 0,
107
+ "rms_norm_eps": 1e-06,
108
+ "rope_parameters": {
109
+ "full_attention": {
110
+ "partial_rotary_factor": 0.25,
111
+ "rope_theta": 1000000.0,
112
+ "rope_type": "proportional"
113
+ },
114
+ "sliding_attention": {
115
+ "rope_theta": 10000.0,
116
+ "rope_type": "default"
117
+ }
118
+ },
119
+ "sliding_window": 1024,
120
+ "tie_word_embeddings": true,
121
+ "top_k_experts": null,
122
+ "use_bidirectional_attention": "vision",
123
+ "use_cache": true,
124
+ "use_double_wide_mlp": false,
125
+ "vocab_size": 262144,
126
+ "vocab_size_per_layer_input": 262144
127
+ },
128
+ "tie_word_embeddings": true,
129
+ "transformers_version": "5.5.4",
130
+ "video_token_id": 258884,
131
+ "vision_config": {
132
+ "_name_or_path": "",
133
+ "architectures": null,
134
+ "attention_bias": false,
135
+ "attention_dropout": 0.0,
136
+ "chunk_size_feed_forward": 0,
137
+ "default_output_length": 280,
138
+ "dtype": "bfloat16",
139
+ "global_head_dim": 72,
140
+ "head_dim": 72,
141
+ "hidden_activation": "gelu_pytorch_tanh",
142
+ "hidden_size": 1152,
143
+ "id2label": {
144
+ "0": "LABEL_0",
145
+ "1": "LABEL_1"
146
+ },
147
+ "initializer_range": 0.02,
148
+ "intermediate_size": 4304,
149
+ "is_encoder_decoder": false,
150
+ "label2id": {
151
+ "LABEL_0": 0,
152
+ "LABEL_1": 1
153
+ },
154
+ "max_position_embeddings": 131072,
155
+ "model_type": "gemma4_vision",
156
+ "num_attention_heads": 16,
157
+ "num_hidden_layers": 27,
158
+ "num_key_value_heads": 16,
159
+ "output_attentions": false,
160
+ "output_hidden_states": false,
161
+ "patch_size": 16,
162
+ "pooling_kernel_size": 3,
163
+ "position_embedding_size": 10240,
164
+ "problem_type": null,
165
+ "return_dict": true,
166
+ "rms_norm_eps": 1e-06,
167
+ "rope_parameters": {
168
+ "rope_theta": 100.0,
169
+ "rope_type": "default"
170
+ },
171
+ "standardize": true,
172
+ "use_clipped_linears": false
173
+ },
174
+ "vision_soft_tokens_per_image": 280
175
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 106,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "5.5.4",
7
+ "use_cache": false
8
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c023c95c4c1e8a0ff69dcd5f6774b4656f7b7751e7a3bd2965d334694f3e4f33
3
+ size 49923154850
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84b7fff64714b09ba13891010d0880dce0c3ca9970e13f0e6876cad4b24bdb55
3
+ size 12623183414
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,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dither": 0.0,
3
+ "feature_extractor_type": "Gemma4AudioFeatureExtractor",
4
+ "feature_size": 128,
5
+ "fft_length": 512,
6
+ "fft_overdrive": false,
7
+ "frame_length": 320,
8
+ "hop_length": 160,
9
+ "input_scale_factor": 1.0,
10
+ "max_frequency": 8000.0,
11
+ "mel_floor": 0.001,
12
+ "min_frequency": 0.0,
13
+ "padding_side": "right",
14
+ "padding_value": 0.0,
15
+ "per_bin_mean": null,
16
+ "per_bin_stddev": null,
17
+ "preemphasis": 0.0,
18
+ "preemphasis_htk_flavor": true,
19
+ "return_attention_mask": true,
20
+ "sampling_rate": 16000
21
+ }
processor_config.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_std": [
37
+ 1.0,
38
+ 1.0,
39
+ 1.0
40
+ ],
41
+ "max_soft_tokens": 280,
42
+ "patch_size": 16,
43
+ "pooling_kernel_size": 3,
44
+ "resample": 3,
45
+ "rescale_factor": 0.00392156862745098
46
+ },
47
+ "image_seq_length": 280,
48
+ "processor_class": "Gemma4Processor",
49
+ "video_processor": {
50
+ "do_convert_rgb": true,
51
+ "do_normalize": true,
52
+ "do_rescale": true,
53
+ "do_resize": true,
54
+ "do_sample_frames": true,
55
+ "image_mean": [
56
+ 0.0,
57
+ 0.0,
58
+ 0.0
59
+ ],
60
+ "image_std": [
61
+ 1.0,
62
+ 1.0,
63
+ 1.0
64
+ ],
65
+ "max_soft_tokens": 70,
66
+ "num_frames": 32,
67
+ "patch_size": 16,
68
+ "pooling_kernel_size": 3,
69
+ "resample": 3,
70
+ "rescale_factor": 0.00392156862745098,
71
+ "return_metadata": false,
72
+ "video_processor_type": "Gemma4VideoProcessor"
73
+ }
74
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d84efaa7efd10a17dd1d85d92456585541d6e6c9ef37eb78b8eb753442905f5
3
+ size 32169725
tokenizer_config.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "local_files_only": false,
22
+ "mask_token": "<mask>",
23
+ "max_length": 2048,
24
+ "model_max_length": 1000000000000000019884624838656,
25
+ "model_specific_special_tokens": {
26
+ "audio_token": "<|audio|>",
27
+ "boa_token": "<|audio>",
28
+ "boi_token": "<|image>",
29
+ "eoa_token": "<audio|>",
30
+ "eoc_token": "<channel|>",
31
+ "eoi_token": "<image|>",
32
+ "eot_token": "<turn|>",
33
+ "escape_token": "<|\"|>",
34
+ "etc_token": "<tool_call|>",
35
+ "etd_token": "<tool|>",
36
+ "etr_token": "<tool_response|>",
37
+ "image_token": "<|image|>",
38
+ "soc_token": "<|channel>",
39
+ "sot_token": "<|turn>",
40
+ "stc_token": "<|tool_call>",
41
+ "std_token": "<|tool>",
42
+ "str_token": "<|tool_response>",
43
+ "think_token": "<|think|>"
44
+ },
45
+ "pad_token": "<pad>",
46
+ "padding_side": "left",
47
+ "processor_class": "Gemma4Processor",
48
+ "response_schema": {
49
+ "properties": {
50
+ "content": {
51
+ "type": "string"
52
+ },
53
+ "role": {
54
+ "const": "assistant"
55
+ },
56
+ "thinking": {
57
+ "type": "string"
58
+ },
59
+ "tool_calls": {
60
+ "items": {
61
+ "properties": {
62
+ "function": {
63
+ "properties": {
64
+ "arguments": {
65
+ "additionalProperties": {},
66
+ "type": "object",
67
+ "x-parser": "gemma4-tool-call"
68
+ },
69
+ "name": {
70
+ "type": "string"
71
+ }
72
+ },
73
+ "type": "object",
74
+ "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
75
+ },
76
+ "type": {
77
+ "const": "function"
78
+ }
79
+ },
80
+ "type": "object"
81
+ },
82
+ "type": "array",
83
+ "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
84
+ }
85
+ },
86
+ "type": "object",
87
+ "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<content>(?:(?!\\<\\|tool_call\\>)(?!\\<turn\\|\\>).)+)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?:\\<turn\\|\\>)?"
88
+ },
89
+ "soc_token": "<|channel>",
90
+ "sot_token": "<|turn>",
91
+ "stc_token": "<|tool_call>",
92
+ "std_token": "<|tool>",
93
+ "str_token": "<|tool_response>",
94
+ "stride": 0,
95
+ "think_token": "<|think|>",
96
+ "tokenizer_class": "GemmaTokenizer",
97
+ "truncation_side": "right",
98
+ "truncation_strategy": "longest_first",
99
+ "unk_token": "<unk>"
100
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "do_sample_frames": true,
7
+ "image_mean": [
8
+ 0.0,
9
+ 0.0,
10
+ 0.0
11
+ ],
12
+ "image_std": [
13
+ 1.0,
14
+ 1.0,
15
+ 1.0
16
+ ],
17
+ "max_soft_tokens": 70,
18
+ "num_frames": 32,
19
+ "patch_size": 16,
20
+ "pooling_kernel_size": 3,
21
+ "resample": 3,
22
+ "rescale_factor": 0.00392156862745098,
23
+ "return_metadata": false,
24
+ "video_processor_type": "Gemma4VideoProcessor"
25
+ }