vkimbris commited on
Commit
dabd61c
·
verified ·
1 Parent(s): 715349d

Add new CrossEncoder model

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,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - cross-encoder
5
+ - reranker
6
+ - generated_from_trainer
7
+ - dataset_size:1047
8
+ - loss:MultipleNegativesRankingLoss
9
+ base_model: Qwen/Qwen3-Embedding-0.6B
10
+ pipeline_tag: text-ranking
11
+ library_name: sentence-transformers
12
+ metrics:
13
+ - accuracy
14
+ - accuracy_threshold
15
+ - f1
16
+ - f1_threshold
17
+ - precision
18
+ - recall
19
+ - average_precision
20
+ model-index:
21
+ - name: CrossEncoder based on Qwen/Qwen3-Embedding-0.6B
22
+ results:
23
+ - task:
24
+ type: cross-encoder-classification
25
+ name: Cross Encoder Classification
26
+ dataset:
27
+ name: Unknown
28
+ type: unknown
29
+ metrics:
30
+ - type: accuracy
31
+ value: 0.9389312977099237
32
+ name: Accuracy
33
+ - type: accuracy_threshold
34
+ value: 0.726271390914917
35
+ name: Accuracy Threshold
36
+ - type: f1
37
+ value: 0.9391634980988592
38
+ name: F1
39
+ - type: f1_threshold
40
+ value: 0.726271390914917
41
+ name: F1 Threshold
42
+ - type: precision
43
+ value: 0.9356060606060606
44
+ name: Precision
45
+ - type: recall
46
+ value: 0.9427480916030534
47
+ name: Recall
48
+ - type: average_precision
49
+ value: 0.9508539647615596
50
+ name: Average Precision
51
+ - type: accuracy
52
+ value: 0.9435975609756098
53
+ name: Accuracy
54
+ - type: accuracy_threshold
55
+ value: 0.8168901205062866
56
+ name: Accuracy Threshold
57
+ - type: f1
58
+ value: 0.944693572496263
59
+ name: F1
60
+ - type: f1_threshold
61
+ value: 0.7354934215545654
62
+ name: F1 Threshold
63
+ - type: precision
64
+ value: 0.9266862170087976
65
+ name: Precision
66
+ - type: recall
67
+ value: 0.9634146341463414
68
+ name: Recall
69
+ - type: average_precision
70
+ value: 0.9544295903264528
71
+ name: Average Precision
72
+ ---
73
+
74
+ # CrossEncoder based on Qwen/Qwen3-Embedding-0.6B
75
+
76
+ This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
77
+
78
+ ## Model Details
79
+
80
+ ### Model Description
81
+ - **Model Type:** Cross Encoder
82
+ - **Base model:** [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) <!-- at revision c54f2e6e80b2d7b7de06f51cec4959f6b3e03418 -->
83
+ - **Maximum Sequence Length:** 32768 tokens
84
+ - **Number of Output Labels:** 1 label
85
+ <!-- - **Training Dataset:** Unknown -->
86
+ <!-- - **Language:** Unknown -->
87
+ <!-- - **License:** Unknown -->
88
+
89
+ ### Model Sources
90
+
91
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
92
+ - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
93
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
94
+ - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
95
+
96
+ ## Usage
97
+
98
+ ### Direct Usage (Sentence Transformers)
99
+
100
+ First install the Sentence Transformers library:
101
+
102
+ ```bash
103
+ pip install -U sentence-transformers
104
+ ```
105
+
106
+ Then you can load this model and run inference.
107
+ ```python
108
+ from sentence_transformers import CrossEncoder
109
+
110
+ # Download from the 🤗 Hub
111
+ model = CrossEncoder("vkimbris/qwen3_06b_items_reranker")
112
+ # Get scores for pairs of texts
113
+ pairs = [
114
+ ['Васаби порошок горчичный Премиум Fumiko Resfood 1кг, 10шт/кор, Кихай', 'Васаби Fumiko Premium грейд А, 85% хрена'],
115
+ ['Соус Терияки Genso 1,5n/1,7кг, бшт/кор, Россия', 'Соус Терияки Genso'],
116
+ ['Уксус рисовый Padam Prem Resfood 20л, Россия', 'Уксус рисовый Padam Premium'],
117
+ ['Имбирь маринованный розовый Tabuko Restood 1,5 кг, вес сухого вещ-ва 1кг, 10шт/кор, Китай', 'Имбирь маринованный Tabuko розовый'],
118
+ ["Паста Том Ям 'Genso' пакет (0,400 кг) упак. 24 шт. Тайланд", 'Паста Том Ям Genso'],
119
+ ]
120
+ scores = model.predict(pairs)
121
+ print(scores.shape)
122
+ # (5,)
123
+
124
+ # Or rank different texts based on similarity to a single text
125
+ ranks = model.rank(
126
+ 'Васаби порошок горчичный Премиум Fumiko Resfood 1кг, 10шт/кор, Кихай',
127
+ [
128
+ 'Васаби Fumiko Premium грейд А, 85% хрена',
129
+ 'Соус Терияки Genso',
130
+ 'Уксус рисовый Padam Premium',
131
+ 'Имбирь маринованный Tabuko розовый',
132
+ 'Паста Том Ям Genso',
133
+ ]
134
+ )
135
+ # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
136
+ ```
137
+
138
+ <!--
139
+ ### Direct Usage (Transformers)
140
+
141
+ <details><summary>Click to see the direct usage in Transformers</summary>
142
+
143
+ </details>
144
+ -->
145
+
146
+ <!--
147
+ ### Downstream Usage (Sentence Transformers)
148
+
149
+ You can finetune this model on your own dataset.
150
+
151
+ <details><summary>Click to expand</summary>
152
+
153
+ </details>
154
+ -->
155
+
156
+ <!--
157
+ ### Out-of-Scope Use
158
+
159
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
160
+ -->
161
+
162
+ ## Evaluation
163
+
164
+ ### Metrics
165
+
166
+ #### Cross Encoder Classification
167
+
168
+ * Evaluated with [<code>CrossEncoderClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderClassificationEvaluator)
169
+
170
+ | Metric | Value |
171
+ |:----------------------|:-----------|
172
+ | accuracy | 0.9389 |
173
+ | accuracy_threshold | 0.7263 |
174
+ | f1 | 0.9392 |
175
+ | f1_threshold | 0.7263 |
176
+ | precision | 0.9356 |
177
+ | recall | 0.9427 |
178
+ | **average_precision** | **0.9509** |
179
+
180
+ #### Cross Encoder Classification
181
+
182
+ * Evaluated with [<code>CrossEncoderClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderClassificationEvaluator)
183
+
184
+ | Metric | Value |
185
+ |:----------------------|:-----------|
186
+ | accuracy | 0.9436 |
187
+ | accuracy_threshold | 0.8169 |
188
+ | f1 | 0.9447 |
189
+ | f1_threshold | 0.7355 |
190
+ | precision | 0.9267 |
191
+ | recall | 0.9634 |
192
+ | **average_precision** | **0.9544** |
193
+
194
+ <!--
195
+ ## Bias, Risks and Limitations
196
+
197
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
198
+ -->
199
+
200
+ <!--
201
+ ### Recommendations
202
+
203
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
204
+ -->
205
+
206
+ ## Training Details
207
+
208
+ ### Training Dataset
209
+
210
+ #### Unnamed Dataset
211
+
212
+ * Size: 1,047 training samples
213
+ * Columns: <code>premise</code> and <code>hypothesis</code>
214
+ * Approximate statistics based on the first 1000 samples:
215
+ | | premise | hypothesis |
216
+ |:--------|:------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------|
217
+ | type | string | string |
218
+ | details | <ul><li>min: 11 characters</li><li>mean: 49.72 characters</li><li>max: 107 characters</li></ul> | <ul><li>min: 6 characters</li><li>mean: 27.71 characters</li><li>max: 62 characters</li></ul> |
219
+ * Samples:
220
+ | premise | hypothesis |
221
+ |:---------------------------------------------------------------------------------------|:----------------------------------------------------------------------------|
222
+ | <code>Смесь мучная темпурная 'KANESHIRO' 1кг</code> | <code>Мука темпурная Kaneshiro</code> |
223
+ | <code>Смесь темпурная Kaneshiro Resfood 1xr. 10шт/кор</code> | <code>Мука темпурная Kaneshiro</code> |
224
+ | <code>Имбирь маринованный розовый 'Hansey' 1,4 кг*10 (в.с. КОРОБОК ПО 10 ПАЧЕК)</code> | <code>Имбирь маринованный розовый Hansey, вес сухого вещества 1000 г</code> |
225
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters:
226
+ ```json
227
+ {
228
+ "scale": 10.0,
229
+ "num_negatives": 4,
230
+ "activation_fn": "torch.nn.modules.activation.Sigmoid"
231
+ }
232
+ ```
233
+
234
+ ### Evaluation Dataset
235
+
236
+ #### Unnamed Dataset
237
+
238
+ * Size: 262 evaluation samples
239
+ * Columns: <code>premise</code> and <code>hypothesis</code>
240
+ * Approximate statistics based on the first 262 samples:
241
+ | | premise | hypothesis |
242
+ |:--------|:------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
243
+ | type | string | string |
244
+ | details | <ul><li>min: 14 characters</li><li>mean: 50.15 characters</li><li>max: 111 characters</li></ul> | <ul><li>min: 13 characters</li><li>mean: 26.98 characters</li><li>max: 62 characters</li></ul> |
245
+ * Samples:
246
+ | premise | hypothesis |
247
+ |:----------------------------------------------------------------------------------|:-------------------------------------------------------|
248
+ | <code>Васаби порошок горчичный Премиум Fumiko Resfood 1кг, 10шт/кор, Кихай</code> | <code>Васаби Fumiko Premium грейд А, 85% хрена</code> |
249
+ | <code>Соус Терияки Genso 1,5n/1,7кг, бшт/кор, Россия</code> | <code>Соус Терияки Genso</code> |
250
+ | <code>Уксус рисовый Padam Prem Resfood 20л, Россия</code> | <code>Уксус рисовый Padam Premium</code> |
251
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#multiplenegativesrankingloss) with these parameters:
252
+ ```json
253
+ {
254
+ "scale": 10.0,
255
+ "num_negatives": 4,
256
+ "activation_fn": "torch.nn.modules.activation.Sigmoid"
257
+ }
258
+ ```
259
+
260
+ ### Training Hyperparameters
261
+ #### Non-Default Hyperparameters
262
+
263
+ - `eval_strategy`: steps
264
+ - `per_device_train_batch_size`: 16
265
+ - `per_device_eval_batch_size`: 16
266
+ - `learning_rate`: 2e-05
267
+ - `num_train_epochs`: 15
268
+ - `warmup_ratio`: 0.1
269
+ - `fp16`: True
270
+
271
+ #### All Hyperparameters
272
+ <details><summary>Click to expand</summary>
273
+
274
+ - `overwrite_output_dir`: False
275
+ - `do_predict`: False
276
+ - `eval_strategy`: steps
277
+ - `prediction_loss_only`: True
278
+ - `per_device_train_batch_size`: 16
279
+ - `per_device_eval_batch_size`: 16
280
+ - `per_gpu_train_batch_size`: None
281
+ - `per_gpu_eval_batch_size`: None
282
+ - `gradient_accumulation_steps`: 1
283
+ - `eval_accumulation_steps`: None
284
+ - `torch_empty_cache_steps`: None
285
+ - `learning_rate`: 2e-05
286
+ - `weight_decay`: 0.0
287
+ - `adam_beta1`: 0.9
288
+ - `adam_beta2`: 0.999
289
+ - `adam_epsilon`: 1e-08
290
+ - `max_grad_norm`: 1.0
291
+ - `num_train_epochs`: 15
292
+ - `max_steps`: -1
293
+ - `lr_scheduler_type`: linear
294
+ - `lr_scheduler_kwargs`: {}
295
+ - `warmup_ratio`: 0.1
296
+ - `warmup_steps`: 0
297
+ - `log_level`: passive
298
+ - `log_level_replica`: warning
299
+ - `log_on_each_node`: True
300
+ - `logging_nan_inf_filter`: True
301
+ - `save_safetensors`: True
302
+ - `save_on_each_node`: False
303
+ - `save_only_model`: False
304
+ - `restore_callback_states_from_checkpoint`: False
305
+ - `no_cuda`: False
306
+ - `use_cpu`: False
307
+ - `use_mps_device`: False
308
+ - `seed`: 42
309
+ - `data_seed`: None
310
+ - `jit_mode_eval`: False
311
+ - `bf16`: False
312
+ - `fp16`: True
313
+ - `fp16_opt_level`: O1
314
+ - `half_precision_backend`: auto
315
+ - `bf16_full_eval`: False
316
+ - `fp16_full_eval`: False
317
+ - `tf32`: None
318
+ - `local_rank`: 0
319
+ - `ddp_backend`: None
320
+ - `tpu_num_cores`: None
321
+ - `tpu_metrics_debug`: False
322
+ - `debug`: []
323
+ - `dataloader_drop_last`: False
324
+ - `dataloader_num_workers`: 0
325
+ - `dataloader_prefetch_factor`: None
326
+ - `past_index`: -1
327
+ - `disable_tqdm`: False
328
+ - `remove_unused_columns`: True
329
+ - `label_names`: None
330
+ - `load_best_model_at_end`: False
331
+ - `ignore_data_skip`: False
332
+ - `fsdp`: []
333
+ - `fsdp_min_num_params`: 0
334
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
335
+ - `fsdp_transformer_layer_cls_to_wrap`: None
336
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
337
+ - `parallelism_config`: None
338
+ - `deepspeed`: None
339
+ - `label_smoothing_factor`: 0.0
340
+ - `optim`: adamw_torch_fused
341
+ - `optim_args`: None
342
+ - `adafactor`: False
343
+ - `group_by_length`: False
344
+ - `length_column_name`: length
345
+ - `project`: huggingface
346
+ - `trackio_space_id`: trackio
347
+ - `ddp_find_unused_parameters`: None
348
+ - `ddp_bucket_cap_mb`: None
349
+ - `ddp_broadcast_buffers`: False
350
+ - `dataloader_pin_memory`: True
351
+ - `dataloader_persistent_workers`: False
352
+ - `skip_memory_metrics`: True
353
+ - `use_legacy_prediction_loop`: False
354
+ - `push_to_hub`: False
355
+ - `resume_from_checkpoint`: None
356
+ - `hub_model_id`: None
357
+ - `hub_strategy`: every_save
358
+ - `hub_private_repo`: None
359
+ - `hub_always_push`: False
360
+ - `hub_revision`: None
361
+ - `gradient_checkpointing`: False
362
+ - `gradient_checkpointing_kwargs`: None
363
+ - `include_inputs_for_metrics`: False
364
+ - `include_for_metrics`: []
365
+ - `eval_do_concat_batches`: True
366
+ - `fp16_backend`: auto
367
+ - `push_to_hub_model_id`: None
368
+ - `push_to_hub_organization`: None
369
+ - `mp_parameters`:
370
+ - `auto_find_batch_size`: False
371
+ - `full_determinism`: False
372
+ - `torchdynamo`: None
373
+ - `ray_scope`: last
374
+ - `ddp_timeout`: 1800
375
+ - `torch_compile`: False
376
+ - `torch_compile_backend`: None
377
+ - `torch_compile_mode`: None
378
+ - `include_tokens_per_second`: False
379
+ - `include_num_input_tokens_seen`: no
380
+ - `neftune_noise_alpha`: None
381
+ - `optim_target_modules`: None
382
+ - `batch_eval_metrics`: False
383
+ - `eval_on_start`: False
384
+ - `use_liger_kernel`: False
385
+ - `liger_kernel_config`: None
386
+ - `eval_use_gather_object`: False
387
+ - `average_tokens_across_devices`: True
388
+ - `prompts`: None
389
+ - `batch_sampler`: batch_sampler
390
+ - `multi_dataset_batch_sampler`: proportional
391
+ - `router_mapping`: {}
392
+ - `learning_rate_mapping`: {}
393
+
394
+ </details>
395
+
396
+ ### Training Logs
397
+ | Epoch | Step | Training Loss | Validation Loss | average_precision |
398
+ |:-------:|:----:|:-------------:|:---------------:|:-----------------:|
399
+ | 1.5152 | 100 | 0.4864 | 0.1104 | 0.8944 |
400
+ | 3.0303 | 200 | 0.1238 | 0.0983 | 0.9240 |
401
+ | 4.5455 | 300 | 0.1106 | 0.0934 | 0.9466 |
402
+ | 6.0606 | 400 | 0.1068 | 0.0939 | 0.9378 |
403
+ | 7.5758 | 500 | 0.1135 | 0.1023 | 0.9232 |
404
+ | 9.0909 | 600 | 0.1061 | 0.1187 | 0.9186 |
405
+ | 10.6061 | 700 | 0.1074 | 0.0808 | 0.9445 |
406
+ | 12.1212 | 800 | 0.1039 | 0.1153 | 0.9403 |
407
+ | 13.6364 | 900 | 0.1082 | 0.0900 | 0.9509 |
408
+ | -1 | -1 | - | - | 0.9544 |
409
+
410
+
411
+ ### Framework Versions
412
+ - Python: 3.12.3
413
+ - Sentence Transformers: 5.2.0
414
+ - Transformers: 4.57.3
415
+ - PyTorch: 2.9.1+cu128
416
+ - Accelerate: 1.12.0
417
+ - Datasets: 4.4.2
418
+ - Tokenizers: 0.22.1
419
+
420
+ ## Citation
421
+
422
+ ### BibTeX
423
+
424
+ #### Sentence Transformers
425
+ ```bibtex
426
+ @inproceedings{reimers-2019-sentence-bert,
427
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
428
+ author = "Reimers, Nils and Gurevych, Iryna",
429
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
430
+ month = "11",
431
+ year = "2019",
432
+ publisher = "Association for Computational Linguistics",
433
+ url = "https://arxiv.org/abs/1908.10084",
434
+ }
435
+ ```
436
+
437
+ <!--
438
+ ## Glossary
439
+
440
+ *Clearly define terms in order to be accessible across audiences.*
441
+ -->
442
+
443
+ <!--
444
+ ## Model Card Authors
445
+
446
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
447
+ -->
448
+
449
+ <!--
450
+ ## Model Card Contact
451
+
452
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
453
+ -->
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ForSequenceClassification"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "dtype": "float32",
8
+ "eos_token_id": 151645,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 1024,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_types": [
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention"
49
+ ],
50
+ "max_position_embeddings": 32768,
51
+ "max_window_layers": 28,
52
+ "model_type": "qwen3",
53
+ "num_attention_heads": 16,
54
+ "num_hidden_layers": 28,
55
+ "num_key_value_heads": 8,
56
+ "pad_token_id": 151643,
57
+ "rms_norm_eps": 1e-06,
58
+ "rope_scaling": null,
59
+ "rope_theta": 1000000,
60
+ "sentence_transformers": {
61
+ "activation_fn": "torch.nn.modules.activation.Sigmoid",
62
+ "version": "5.2.0"
63
+ },
64
+ "sliding_window": null,
65
+ "tie_word_embeddings": true,
66
+ "transformers_version": "4.57.3",
67
+ "use_cache": true,
68
+ "use_sliding_window": false,
69
+ "vocab_size": 151669
70
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:daf0fc53592be79d10a3e7a4ec25db80fc7c795048b97e2fff1b7422a595d639
3
+ size 2383145520
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f45684bb3bd50e1eb753e6bc438efc14329c293af236ecd331667b46657a3cc
3
+ size 11423973
tokenizer_config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 32768,
235
+ "pad_token": "<|endoftext|>",
236
+ "split_special_tokens": false,
237
+ "tokenizer_class": "Qwen2Tokenizer",
238
+ "unk_token": null
239
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff