Ihor commited on
Commit
d2096b6
·
verified ·
1 Parent(s): 0e09598

Upload folder using huggingface_hub

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
calibration_report.json ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_beta": 0.5402383208274841,
3
+ "base_bias": -0.4844930171966553,
4
+ "kept_epoch": 3,
5
+ "train": {
6
+ "uncalibrated": {
7
+ "nll": 0.13590236008167267,
8
+ "brier": 0.03834998607635498,
9
+ "ece": 0.008724160230938638,
10
+ "accuracy": 0.9460732936859131
11
+ },
12
+ "global_scaling": {
13
+ "nll": 0.1319091022014618,
14
+ "brier": 0.036343060433864594,
15
+ "ece": 0.024790527669744766,
16
+ "accuracy": 0.9506661891937256
17
+ },
18
+ "calibrated": {
19
+ "nll": 0.16371336579322815,
20
+ "brier": 0.045359522104263306,
21
+ "ece": 0.05632979728086318,
22
+ "accuracy": 0.9463504552841187
23
+ },
24
+ "beta": {
25
+ "mean": 0.3987804353237152,
26
+ "min": 0.021586544811725616,
27
+ "max": 0.6299230456352234
28
+ },
29
+ "bias": {
30
+ "mean": -0.60589200258255,
31
+ "min": -1.0286215543746948,
32
+ "max": 0.5900660753250122
33
+ },
34
+ "groups": {
35
+ "overconfident": {
36
+ "texts": 810,
37
+ "uncalibrated": {
38
+ "nll": 0.396918922662735,
39
+ "brier": 0.11602238565683365,
40
+ "ece": 0.1158942031665317,
41
+ "accuracy": 0.8361965417861938
42
+ },
43
+ "global_scaling": {
44
+ "nll": 0.2803961932659149,
45
+ "brier": 0.09336278587579727,
46
+ "ece": 0.07126283364916436,
47
+ "accuracy": 0.8470292091369629
48
+ },
49
+ "calibrated": {
50
+ "nll": 0.22382210195064545,
51
+ "brier": 0.07280737161636353,
52
+ "ece": 0.0505468512780157,
53
+ "accuracy": 0.8692417144775391
54
+ }
55
+ },
56
+ "underconfident": {
57
+ "texts": 952,
58
+ "uncalibrated": {
59
+ "nll": 0.18349525332450867,
60
+ "brier": 0.04817432537674904,
61
+ "ece": 0.0770668854550236,
62
+ "accuracy": 0.9513456225395203
63
+ },
64
+ "global_scaling": {
65
+ "nll": 0.21706710755825043,
66
+ "brier": 0.055873360484838486,
67
+ "ece": 0.09890477648015017,
68
+ "accuracy": 0.9416147470474243
69
+ },
70
+ "calibrated": {
71
+ "nll": 0.24962961673736572,
72
+ "brier": 0.06872871518135071,
73
+ "ece": 0.07814065774855061,
74
+ "accuracy": 0.9042116403579712
75
+ }
76
+ },
77
+ "mixed": {
78
+ "texts": 335,
79
+ "uncalibrated": {
80
+ "nll": 0.2900349199771881,
81
+ "brier": 0.0966075211763382,
82
+ "ece": 0.08953729352259154,
83
+ "accuracy": 0.8737332224845886
84
+ },
85
+ "global_scaling": {
86
+ "nll": 0.25439244508743286,
87
+ "brier": 0.08061423152685165,
88
+ "ece": 0.08066619354176002,
89
+ "accuracy": 0.8430566787719727
90
+ },
91
+ "calibrated": {
92
+ "nll": 0.2466566115617752,
93
+ "brier": 0.07597621530294418,
94
+ "ece": 0.049607173441170604,
95
+ "accuracy": 0.8896192908287048
96
+ }
97
+ },
98
+ "normal": {
99
+ "texts": 5655,
100
+ "uncalibrated": {
101
+ "nll": 0.03119591809809208,
102
+ "brier": 0.006655354518443346,
103
+ "ece": 0.024245568390645844,
104
+ "accuracy": 0.985680341720581
105
+ },
106
+ "global_scaling": {
107
+ "nll": 0.05599905923008919,
108
+ "brier": 0.010298365727066994,
109
+ "ece": 0.042321458578928245,
110
+ "accuracy": 0.9956013560295105
111
+ },
112
+ "calibrated": {
113
+ "nll": 0.1182105615735054,
114
+ "brier": 0.028781907632946968,
115
+ "ece": 0.07998285826653084,
116
+ "accuracy": 0.9845244884490967
117
+ }
118
+ }
119
+ },
120
+ "softmax": {
121
+ "texts": 6756,
122
+ "uncalibrated": {
123
+ "nll": 0.60243159532547,
124
+ "brier": 0.25821787118911743,
125
+ "ece": 0.08630393553886592,
126
+ "accuracy": 0.8288928270339966
127
+ },
128
+ "global_scaling": {
129
+ "nll": 0.47443029284477234,
130
+ "brier": 0.23971512913703918,
131
+ "ece": 0.035015895881971036,
132
+ "accuracy": 0.8288928270339966
133
+ },
134
+ "calibrated": {
135
+ "nll": 0.5013883709907532,
136
+ "brier": 0.25799572467803955,
137
+ "ece": 0.08973347695110602,
138
+ "accuracy": 0.8288928270339966
139
+ }
140
+ }
141
+ },
142
+ "held_out": {
143
+ "uncalibrated": {
144
+ "nll": 0.134813591837883,
145
+ "brier": 0.0394577793776989,
146
+ "ece": 0.009385065096777556,
147
+ "accuracy": 0.9442779421806335
148
+ },
149
+ "global_scaling": {
150
+ "nll": 0.1316956728696823,
151
+ "brier": 0.0370788536965847,
152
+ "ece": 0.024935297782987448,
153
+ "accuracy": 0.9489754438400269
154
+ },
155
+ "calibrated": {
156
+ "nll": 0.1662309616804123,
157
+ "brier": 0.046702150255441666,
158
+ "ece": 0.05650961722975578,
159
+ "accuracy": 0.9439539909362793
160
+ },
161
+ "beta": {
162
+ "mean": 0.39366212487220764,
163
+ "min": 0.023016568273305893,
164
+ "max": 0.6071414947509766
165
+ },
166
+ "bias": {
167
+ "mean": -0.5795870423316956,
168
+ "min": -1.0330911874771118,
169
+ "max": 0.5484000444412231
170
+ },
171
+ "groups": {
172
+ "overconfident": {
173
+ "texts": 180,
174
+ "uncalibrated": {
175
+ "nll": 0.5719922184944153,
176
+ "brier": 0.17103661596775055,
177
+ "ece": 0.17139117058701653,
178
+ "accuracy": 0.7580760717391968
179
+ },
180
+ "global_scaling": {
181
+ "nll": 0.401309609413147,
182
+ "brier": 0.1368330717086792,
183
+ "ece": 0.11016014898095755,
184
+ "accuracy": 0.7717157006263733
185
+ },
186
+ "calibrated": {
187
+ "nll": 0.31307777762413025,
188
+ "brier": 0.10509755462408066,
189
+ "ece": 0.07207305132336525,
190
+ "accuracy": 0.8083273768424988
191
+ }
192
+ },
193
+ "underconfident": {
194
+ "texts": 224,
195
+ "uncalibrated": {
196
+ "nll": 0.19197306036949158,
197
+ "brier": 0.05295313894748688,
198
+ "ece": 0.06992532354870229,
199
+ "accuracy": 0.9405063390731812
200
+ },
201
+ "global_scaling": {
202
+ "nll": 0.2224033921957016,
203
+ "brier": 0.0592648983001709,
204
+ "ece": 0.09383183797541672,
205
+ "accuracy": 0.9335442781448364
206
+ },
207
+ "calibrated": {
208
+ "nll": 0.2595052719116211,
209
+ "brier": 0.07272262871265411,
210
+ "ece": 0.07825523673930124,
211
+ "accuracy": 0.8962025046348572
212
+ }
213
+ },
214
+ "mixed": {
215
+ "texts": 97,
216
+ "uncalibrated": {
217
+ "nll": 0.29701313376426697,
218
+ "brier": 0.10088907927274704,
219
+ "ece": 0.10026825751042845,
220
+ "accuracy": 0.8682310581207275
221
+ },
222
+ "global_scaling": {
223
+ "nll": 0.2555745542049408,
224
+ "brier": 0.08258884400129318,
225
+ "ece": 0.08199416873906554,
226
+ "accuracy": 0.8375450968742371
227
+ },
228
+ "calibrated": {
229
+ "nll": 0.255821168422699,
230
+ "brier": 0.08022957295179367,
231
+ "ece": 0.04236628423505007,
232
+ "accuracy": 0.8835740089416504
233
+ }
234
+ },
235
+ "normal": {
236
+ "texts": 1436,
237
+ "uncalibrated": {
238
+ "nll": 0.028472088277339935,
239
+ "brier": 0.006469887215644121,
240
+ "ece": 0.022601176297401007,
241
+ "accuracy": 0.9865714907646179
242
+ },
243
+ "global_scaling": {
244
+ "nll": 0.052316512912511826,
245
+ "brier": 0.009927067905664444,
246
+ "ece": 0.04092645116679347,
247
+ "accuracy": 0.9967336058616638
248
+ },
249
+ "calibrated": {
250
+ "nll": 0.11164623498916626,
251
+ "brier": 0.02739347331225872,
252
+ "ece": 0.0744886720722503,
253
+ "accuracy": 0.9840309619903564
254
+ }
255
+ }
256
+ },
257
+ "softmax": {
258
+ "texts": 1709,
259
+ "uncalibrated": {
260
+ "nll": 0.5652890205383301,
261
+ "brier": 0.25095003843307495,
262
+ "ece": 0.08337326918689637,
263
+ "accuracy": 0.8338209390640259
264
+ },
265
+ "global_scaling": {
266
+ "nll": 0.4503483176231384,
267
+ "brier": 0.23204359412193298,
268
+ "ece": 0.036847078234715565,
269
+ "accuracy": 0.8338209390640259
270
+ },
271
+ "calibrated": {
272
+ "nll": 0.4841042459011078,
273
+ "brier": 0.25139153003692627,
274
+ "ece": 0.08952697261251302,
275
+ "accuracy": 0.8338209390640259
276
+ }
277
+ }
278
+ },
279
+ "args": {
280
+ "model_path": "models/qwen3.8-9b-fast/last",
281
+ "data_path": "data/decision_index_calibration.json",
282
+ "save_path": "models/qwen3.8-9b-fast/last-calibrated",
283
+ "eval_ratio": 0.2,
284
+ "max_examples": 10000,
285
+ "max_length": 2048,
286
+ "batch_size": 8,
287
+ "num_workers": 4,
288
+ "dtype": "bfloat16",
289
+ "hidden_size": 256,
290
+ "beta_max": 3.0,
291
+ "dropout": 0.1,
292
+ "prior_weight": 0.01,
293
+ "use_bias": true,
294
+ "bias_prior_weight": 0.01,
295
+ "skip_long": true,
296
+ "rank_preserving": true,
297
+ "early_stopping": null,
298
+ "objective": "mixed",
299
+ "softmax_weight": 0.5,
300
+ "balance_confidence": true,
301
+ "confidence_threshold": 0.7,
302
+ "num_epochs": 3,
303
+ "calibrator_batch_size": 64,
304
+ "lr": 0.0001,
305
+ "weight_decay": 0.01,
306
+ "patience": 3,
307
+ "seed": 42
308
+ }
309
+ }
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if loop.index0 > ns.last_query_index %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture_type": "decoder-kv",
3
+ "architectures": [
4
+ "GLiClassModel"
5
+ ],
6
+ "calibrator_beta_max": 3.0,
7
+ "calibrator_dropout": 0.1,
8
+ "calibrator_hidden_size": 256,
9
+ "calibrator_objective": "mixed",
10
+ "calibrator_rank_preserving": true,
11
+ "calibrator_use_bias": true,
12
+ "class_token_index": 248077,
13
+ "class_token_pooling": "first",
14
+ "contrastive_loss_coef": 0.0,
15
+ "dropout": 0.3,
16
+ "dtype": "bfloat16",
17
+ "embed_class_token": true,
18
+ "encoder_config": {
19
+ "_name_or_path": "Qwen/Qwen3.5-9B",
20
+ "architectures": [
21
+ "Qwen3_5ForConditionalGeneration"
22
+ ],
23
+ "image_token_id": 248056,
24
+ "model_type": "qwen3_5",
25
+ "text_config": {
26
+ "_name_or_path": "",
27
+ "architectures": null,
28
+ "attention_bias": false,
29
+ "attention_dropout": 0.0,
30
+ "attn_output_gate": true,
31
+ "bos_token_id": null,
32
+ "chunk_size_feed_forward": 0,
33
+ "dtype": "bfloat16",
34
+ "eos_token_id": 248044,
35
+ "full_attention_interval": 4,
36
+ "head_dim": 256,
37
+ "hidden_act": "silu",
38
+ "hidden_size": 4096,
39
+ "id2label": {
40
+ "0": "LABEL_0",
41
+ "1": "LABEL_1"
42
+ },
43
+ "initializer_range": 0.02,
44
+ "intermediate_size": 12288,
45
+ "is_encoder_decoder": false,
46
+ "label2id": {
47
+ "LABEL_0": 0,
48
+ "LABEL_1": 1
49
+ },
50
+ "layer_types": [
51
+ "linear_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "full_attention",
55
+ "linear_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "full_attention",
59
+ "linear_attention",
60
+ "linear_attention",
61
+ "linear_attention",
62
+ "full_attention",
63
+ "linear_attention",
64
+ "linear_attention",
65
+ "linear_attention",
66
+ "full_attention",
67
+ "linear_attention",
68
+ "linear_attention",
69
+ "linear_attention",
70
+ "full_attention",
71
+ "linear_attention",
72
+ "linear_attention",
73
+ "linear_attention",
74
+ "full_attention",
75
+ "linear_attention",
76
+ "linear_attention",
77
+ "linear_attention",
78
+ "full_attention",
79
+ "linear_attention",
80
+ "linear_attention",
81
+ "linear_attention",
82
+ "full_attention"
83
+ ],
84
+ "linear_conv_kernel_dim": 4,
85
+ "linear_key_head_dim": 128,
86
+ "linear_num_key_heads": 16,
87
+ "linear_num_value_heads": 32,
88
+ "linear_value_head_dim": 128,
89
+ "mamba_ssm_dtype": "float32",
90
+ "max_position_embeddings": 262144,
91
+ "mlp_only_layers": [],
92
+ "model_type": "qwen3_5_text",
93
+ "mtp_num_hidden_layers": 1,
94
+ "mtp_use_dedicated_embeddings": false,
95
+ "num_attention_heads": 16,
96
+ "num_hidden_layers": 32,
97
+ "num_key_value_heads": 4,
98
+ "output_attentions": false,
99
+ "output_hidden_states": false,
100
+ "pad_token_id": null,
101
+ "partial_rotary_factor": 0.25,
102
+ "problem_type": null,
103
+ "return_dict": true,
104
+ "rms_norm_eps": 1e-06,
105
+ "rope_parameters": {
106
+ "mrope_interleaved": true,
107
+ "mrope_section": [
108
+ 11,
109
+ 11,
110
+ 10
111
+ ],
112
+ "partial_rotary_factor": 0.25,
113
+ "rope_theta": 10000000,
114
+ "rope_type": "default"
115
+ },
116
+ "tie_word_embeddings": false,
117
+ "use_cache": true,
118
+ "vocab_size": 248080
119
+ },
120
+ "tie_word_embeddings": false,
121
+ "video_token_id": 248057,
122
+ "vision_config": {
123
+ "_name_or_path": "",
124
+ "architectures": null,
125
+ "chunk_size_feed_forward": 0,
126
+ "deepstack_visual_indexes": [],
127
+ "depth": 27,
128
+ "dtype": null,
129
+ "hidden_act": "gelu_pytorch_tanh",
130
+ "hidden_size": 1152,
131
+ "id2label": {
132
+ "0": "LABEL_0",
133
+ "1": "LABEL_1"
134
+ },
135
+ "in_channels": 3,
136
+ "initializer_range": 0.02,
137
+ "intermediate_size": 4304,
138
+ "is_encoder_decoder": false,
139
+ "label2id": {
140
+ "LABEL_0": 0,
141
+ "LABEL_1": 1
142
+ },
143
+ "model_type": "qwen3_5_vision",
144
+ "num_heads": 16,
145
+ "num_position_embeddings": 2304,
146
+ "out_hidden_size": 4096,
147
+ "output_attentions": false,
148
+ "output_hidden_states": false,
149
+ "patch_size": 16,
150
+ "problem_type": null,
151
+ "return_dict": true,
152
+ "rope_parameters": {
153
+ "rope_theta": 10000.0,
154
+ "rope_type": "axial"
155
+ },
156
+ "spatial_merge_size": 2,
157
+ "temporal_patch_size": 2
158
+ },
159
+ "vision_end_token_id": 248054,
160
+ "vision_start_token_id": 248053
161
+ },
162
+ "encoder_layer_id": -1,
163
+ "encoder_model_name": "Qwen/Qwen3.5-9B",
164
+ "eos_token_id": 248046,
165
+ "example_token_index": 248079,
166
+ "extract_text_features": false,
167
+ "focal_loss_alpha": 0.7,
168
+ "focal_loss_gamma": -1,
169
+ "focal_loss_reduction": "none",
170
+ "freeze_media_encoders": true,
171
+ "hidden_size": 4096,
172
+ "ignore_index": -100,
173
+ "initializer_range": 0.03,
174
+ "label_model_config": {
175
+ "_name_or_path": "BAAI/bge-small-en-v1.5",
176
+ "add_cross_attention": false,
177
+ "architectures": [
178
+ "BertModel"
179
+ ],
180
+ "attention_probs_dropout_prob": 0.1,
181
+ "bos_token_id": null,
182
+ "chunk_size_feed_forward": 0,
183
+ "classifier_dropout": null,
184
+ "dtype": "float32",
185
+ "eos_token_id": null,
186
+ "hidden_act": "gelu",
187
+ "hidden_dropout_prob": 0.1,
188
+ "hidden_size": 384,
189
+ "id2label": {
190
+ "0": "LABEL_0"
191
+ },
192
+ "initializer_range": 0.02,
193
+ "intermediate_size": 1536,
194
+ "is_decoder": false,
195
+ "is_encoder_decoder": false,
196
+ "label2id": {
197
+ "LABEL_0": 0
198
+ },
199
+ "layer_norm_eps": 1e-12,
200
+ "max_position_embeddings": 512,
201
+ "model_type": "bert",
202
+ "num_attention_heads": 12,
203
+ "num_hidden_layers": 12,
204
+ "output_attentions": false,
205
+ "output_hidden_states": false,
206
+ "pad_token_id": 0,
207
+ "position_embedding_type": "absolute",
208
+ "problem_type": null,
209
+ "return_dict": true,
210
+ "tie_word_embeddings": true,
211
+ "type_vocab_size": 2,
212
+ "use_cache": true,
213
+ "vocab_size": 30522
214
+ },
215
+ "label_model_name": "BAAI/bge-small-en-v1.5",
216
+ "layer_wise": false,
217
+ "logit_scale_init_value": 2.6592,
218
+ "max_labels_alloc": "dynamic",
219
+ "max_num_classes": 25,
220
+ "model_type": "GLiClass",
221
+ "multimodal": true,
222
+ "normalize_features": false,
223
+ "pad_token_id": 248044,
224
+ "pooling_strategy": "avg",
225
+ "problem_type": "multi_label_classification",
226
+ "projector_hidden_act": "gelu",
227
+ "prompt_first": true,
228
+ "recurrent_bptt_steps": null,
229
+ "recurrent_confidence_coef": 0.0,
230
+ "recurrent_confidence_margin": 0.0,
231
+ "recurrent_confidence_mode": "relative",
232
+ "recurrent_halt_threshold": 0.01,
233
+ "recurrent_improvement_coef": 0.1,
234
+ "recurrent_improvement_margin": 0.05,
235
+ "recurrent_inference": true,
236
+ "recurrent_inference_max_steps": null,
237
+ "recurrent_min_steps": 1,
238
+ "recurrent_read_text": false,
239
+ "recurrent_steps": 3,
240
+ "scorer_attn_dropout": 0.1,
241
+ "scorer_encoder_num_layers": 2,
242
+ "scorer_full_sequence": false,
243
+ "scorer_mlp_hidden_size": 1024,
244
+ "scorer_num_heads": 16,
245
+ "scorer_type": "simple",
246
+ "sep_token_index": 248078,
247
+ "shuffle_labels": true,
248
+ "squeeze_layers": false,
249
+ "text_token_index": 248078,
250
+ "transformers_version": "5.19.0",
251
+ "use_calibrator": true,
252
+ "use_embedding_projection": false,
253
+ "use_lstm": false,
254
+ "use_segment_embeddings": false,
255
+ "vocab_size": 248080
256
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c457f1e8f9c01b5d233eba5858f9985341e49492144982deab3b10e416b961e4
3
+ size 17968000418
processor_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "do_convert_rgb": true,
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "merge_size": 2,
19
+ "patch_size": 16,
20
+ "resample": 3,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "longest_edge": 16777216,
24
+ "shortest_edge": 65536
25
+ },
26
+ "temporal_patch_size": 2
27
+ },
28
+ "processor_class": "Qwen3VLProcessor",
29
+ "video_processor": {
30
+ "do_convert_rgb": true,
31
+ "do_normalize": true,
32
+ "do_rescale": true,
33
+ "do_resize": true,
34
+ "do_sample_frames": true,
35
+ "fps": 2,
36
+ "image_mean": [
37
+ 0.5,
38
+ 0.5,
39
+ 0.5
40
+ ],
41
+ "image_std": [
42
+ 0.5,
43
+ 0.5,
44
+ 0.5
45
+ ],
46
+ "max_frames": 768,
47
+ "max_video_tokens": 768,
48
+ "merge_size": 2,
49
+ "min_frames": 4,
50
+ "patch_size": 16,
51
+ "resample": 3,
52
+ "rescale_factor": 0.00392156862745098,
53
+ "return_metadata": false,
54
+ "size": {
55
+ "longest_edge": 25165824,
56
+ "shortest_edge": 4096
57
+ },
58
+ "temporal_patch_size": 2,
59
+ "video_processor_type": "Qwen3VLVideoProcessor"
60
+ }
61
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04472e9fcd4aea467a49025c27c0469a428bda2f812268fc9b26fea77c016f71
3
+ size 19989897
tokenizer_config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "extra_special_tokens": [
12
+ "<|im_start|>",
13
+ "<|im_end|>",
14
+ "<|object_ref_start|>",
15
+ "<|object_ref_end|>",
16
+ "<|box_start|>",
17
+ "<|box_end|>",
18
+ "<|quad_start|>",
19
+ "<|quad_end|>",
20
+ "<|vision_start|>",
21
+ "<|vision_end|>",
22
+ "<|vision_pad|>",
23
+ "<|image_pad|>",
24
+ "<|video_pad|>"
25
+ ],
26
+ "image_token": "<|image_pad|>",
27
+ "is_local": true,
28
+ "local_files_only": false,
29
+ "merges_file": null,
30
+ "model_max_length": 262144,
31
+ "model_specific_special_tokens": {
32
+ "audio_bos_token": "<|audio_start|>",
33
+ "audio_eos_token": "<|audio_end|>",
34
+ "audio_token": "<|audio_pad|>",
35
+ "image_token": "<|image_pad|>",
36
+ "video_token": "<|video_pad|>",
37
+ "vision_bos_token": "<|vision_start|>",
38
+ "vision_eos_token": "<|vision_end|>"
39
+ },
40
+ "pad_token": "<|endoftext|>",
41
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
42
+ "processor_class": "Qwen3VLProcessor",
43
+ "split_special_tokens": false,
44
+ "tokenizer_class": "Qwen3_5Tokenizer",
45
+ "unk_token": null,
46
+ "video_token": "<|video_pad|>",
47
+ "vision_bos_token": "<|vision_start|>",
48
+ "vision_eos_token": "<|vision_end|>"
49
+ }