anonymousICML commited on
Commit
b0d2ed9
·
verified ·
1 Parent(s): e1449f4

Upload OmniGuard-3B-Fast

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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - zh
5
+ - en
6
+ tags:
7
+ - safety
8
+ - moderation
9
+ - multimodal
10
+ pipeline_tag: text-generation
11
+ ---
12
+
13
+ # OmniGuard-3B-Fast
14
+
15
+ OmniGuard 系列安全审核模型。
16
+
17
+ ## 模型信息
18
+
19
+ - **模型名称**: OmniGuard-3B-Fast
20
+ - **原始模型**: OmniGuard-3B
21
+ - **模型类型**: 多模态安全审核
22
+ - **支持语言**: 中文、英文
23
+
24
+ ## 使用方法
25
+
26
+ ```python
27
+ from transformers import AutoModelForCausalLM, AutoTokenizer
28
+
29
+ model_name = "anonymousICML/OmniGuard-3B-Fast"
30
+ model = AutoModelForCausalLM.from_pretrained(
31
+ model_name,
32
+ torch_dtype="auto",
33
+ device_map="auto",
34
+ attn_implementation="flash_attention_2" # 推荐使用 flash attention
35
+ )
36
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
37
+
38
+ # 使用模型
39
+ messages = [
40
+ {"role": "user", "content": "你的输入"}
41
+ ]
42
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
43
+ inputs = tokenizer([text], return_tensors="pt").to(model.device)
44
+
45
+ outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
46
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
47
+ print(response)
48
+ ```
49
+
50
+ ## 性能
51
+
52
+ - 推荐使用 `flash_attention_2` 以获得最佳性能
53
+ - 支持 GPU 加速推理
54
+ - 建议使用 `torch_dtype="auto"` 自动选择最佳精度
55
+
56
+ ## 许可证
57
+
58
+ Apache-2.0
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|AUDIO|>": 151646,
5
+ "<|IMAGE|>": 151655,
6
+ "<|VIDEO|>": 151656,
7
+ "<|audio_bos|>": 151647,
8
+ "<|audio_eos|>": 151648,
9
+ "<|box_end|>": 151649,
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
+ "<|quad_end|>": 151651,
19
+ "<|quad_start|>": 151650,
20
+ "<|repo_name|>": 151663,
21
+ "<|vision_bos|>": 151652,
22
+ "<|vision_eos|>": 151653,
23
+ "<|vision_pad|>": 151654
24
+ }
chat_template.jinja ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {% set audio_count = namespace(value=0) %}{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ {% endif %}<|im_start|>{{ message['role'] }}
4
+ {% if message['content'] is string %}{{ message['content'] }}<|im_end|>
5
+ {% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_bos|><|IMAGE|><|vision_eos|>{% elif content['type'] == 'audio' or 'audio' in content or 'audio_url' in content %}{% set audio_count.value = audio_count.value + 1 %}{% if add_audio_id %}Audio {{ audio_count.value }}: {% endif %}<|audio_bos|><|AUDIO|><|audio_eos|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_bos|><|VIDEO|><|vision_eos|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>
6
+ {% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
7
+ {% endif %}
config.json ADDED
@@ -0,0 +1,644 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2_5OmniForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "enable_audio_output": false,
7
+ "enable_talker": true,
8
+ "eos_token_id": 151645,
9
+ "hidden_size": 2048,
10
+ "keys_to_ignore_at_inference": [
11
+ "past_key_values",
12
+ "hidden_states",
13
+ "attention_mask"
14
+ ],
15
+ "model_type": "qwen2_5_omni",
16
+ "pad_token_id": 151643,
17
+ "talker_config": {
18
+ "_attn_implementation_autoset": true,
19
+ "_name_or_path": "Qwen2.5-Omni-3B/talker",
20
+ "architectures": [
21
+ "Qwen2OmniTalkerForConditionalGeneration"
22
+ ],
23
+ "attention_dropout": 0.0,
24
+ "audio_end_token_id": 151648,
25
+ "audio_start_token_id": 151647,
26
+ "audio_token_index": 151646,
27
+ "dtype": "bfloat16",
28
+ "embedding_size": 2048,
29
+ "head_dim": 64,
30
+ "hidden_act": "silu",
31
+ "hidden_size": 896,
32
+ "image_token_index": 151655,
33
+ "init_std": 0.02,
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 4864,
36
+ "layer_types": [
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
+ "full_attention",
50
+ "full_attention",
51
+ "full_attention",
52
+ "full_attention",
53
+ "full_attention",
54
+ "full_attention",
55
+ "full_attention",
56
+ "full_attention",
57
+ "full_attention",
58
+ "full_attention",
59
+ "full_attention",
60
+ "full_attention"
61
+ ],
62
+ "max_position_embeddings": 32768,
63
+ "max_window_layers": 28,
64
+ "model_type": "qwen2_5_omni_talker",
65
+ "num_attention_heads": 14,
66
+ "num_hidden_layers": 24,
67
+ "num_key_value_heads": 2,
68
+ "position_id_per_seconds": 25,
69
+ "rms_norm_eps": 1e-06,
70
+ "rope_scaling": {
71
+ "mrope_section": [
72
+ 16,
73
+ 16,
74
+ 0
75
+ ],
76
+ "rope_type": "default",
77
+ "type": "default"
78
+ },
79
+ "rope_theta": 1000000.0,
80
+ "seconds_per_chunk": 2,
81
+ "sliding_window": null,
82
+ "spatial_merge_size": 2,
83
+ "tts_codec_end_token_id": 8294,
84
+ "tts_codec_mask_token_id": 8296,
85
+ "tts_codec_pad_token_id": 8292,
86
+ "tts_codec_start_token_id": 8293,
87
+ "tts_text_end_token_id": 151861,
88
+ "tts_text_pad_token_id": 151859,
89
+ "tts_text_start_token_id": 151860,
90
+ "use_cache": true,
91
+ "use_sliding_window": false,
92
+ "video_token_index": 151656,
93
+ "vision_end_token_id": 151653,
94
+ "vision_start_token_id": 151652,
95
+ "vocab_size": 8448
96
+ },
97
+ "thinker_config": {
98
+ "_attn_implementation_autoset": true,
99
+ "_name_or_path": "Qwen2.5-Omni-3B/thinker",
100
+ "architectures": [
101
+ "Qwen2OmniNaViTThinkerForConditionalGeneration"
102
+ ],
103
+ "audio_config": {
104
+ "_attn_implementation_autoset": true,
105
+ "_name_or_path": "",
106
+ "activation_dropout": 0.0,
107
+ "activation_function": "gelu",
108
+ "add_cross_attention": false,
109
+ "architectures": null,
110
+ "attention_dropout": 0.0,
111
+ "bad_words_ids": null,
112
+ "begin_suppress_tokens": null,
113
+ "bos_token_id": null,
114
+ "chunk_size_feed_forward": 0,
115
+ "cross_attention_hidden_size": null,
116
+ "d_model": 1280,
117
+ "decoder_start_token_id": null,
118
+ "diversity_penalty": 0.0,
119
+ "do_sample": false,
120
+ "dropout": 0.0,
121
+ "dtype": "bfloat16",
122
+ "early_stopping": false,
123
+ "encoder_attention_heads": 20,
124
+ "encoder_ffn_dim": 5120,
125
+ "encoder_layerdrop": 0.0,
126
+ "encoder_layers": 32,
127
+ "encoder_no_repeat_ngram_size": 0,
128
+ "eos_token_id": null,
129
+ "exponential_decay_length_penalty": null,
130
+ "finetuning_task": null,
131
+ "forced_bos_token_id": null,
132
+ "forced_eos_token_id": null,
133
+ "id2label": {
134
+ "0": "LABEL_0",
135
+ "1": "LABEL_1"
136
+ },
137
+ "init_std": 0.02,
138
+ "initializer_range": 0.02,
139
+ "is_decoder": false,
140
+ "is_encoder_decoder": false,
141
+ "label2id": {
142
+ "LABEL_0": 0,
143
+ "LABEL_1": 1
144
+ },
145
+ "length_penalty": 1.0,
146
+ "max_length": 20,
147
+ "max_source_positions": 1500,
148
+ "min_length": 0,
149
+ "model_type": "qwen2_5_omni_audio_encoder",
150
+ "n_window": 100,
151
+ "no_repeat_ngram_size": 0,
152
+ "num_beam_groups": 1,
153
+ "num_beams": 1,
154
+ "num_hidden_layers": 32,
155
+ "num_mel_bins": 128,
156
+ "num_return_sequences": 1,
157
+ "output_attentions": false,
158
+ "output_dim": 2048,
159
+ "output_hidden_states": false,
160
+ "output_scores": false,
161
+ "pad_token_id": 151643,
162
+ "prefix": null,
163
+ "problem_type": null,
164
+ "pruned_heads": {},
165
+ "remove_invalid_values": false,
166
+ "repetition_penalty": 1.0,
167
+ "return_dict": true,
168
+ "return_dict_in_generate": false,
169
+ "scale_embedding": false,
170
+ "sep_token_id": null,
171
+ "suppress_tokens": null,
172
+ "task_specific_params": null,
173
+ "temperature": 1.0,
174
+ "tf_legacy_loss": false,
175
+ "tie_encoder_decoder": false,
176
+ "tie_word_embeddings": true,
177
+ "tokenizer_class": null,
178
+ "top_k": 50,
179
+ "top_p": 1.0,
180
+ "torchscript": false,
181
+ "typical_p": 1.0,
182
+ "use_bfloat16": false
183
+ },
184
+ "audio_end_token_id": 151648,
185
+ "audio_start_token_id": 151647,
186
+ "audio_token_index": 151646,
187
+ "bos_token_id": 151644,
188
+ "dtype": "bfloat16",
189
+ "eos_token_id": 151645,
190
+ "ignore_index": -100,
191
+ "image_token_index": 151655,
192
+ "init_std": 0.02,
193
+ "initializer_range": 0.02,
194
+ "model_type": "qwen2_5_omni_thinker",
195
+ "pad_token_id": 151643,
196
+ "position_id_per_seconds": 25,
197
+ "seconds_per_chunk": 2,
198
+ "text_config": {
199
+ "_name_or_path": "",
200
+ "add_cross_attention": false,
201
+ "architectures": null,
202
+ "attention_dropout": 0.0,
203
+ "bad_words_ids": null,
204
+ "begin_suppress_tokens": null,
205
+ "bos_token_id": null,
206
+ "chunk_size_feed_forward": 0,
207
+ "cross_attention_hidden_size": null,
208
+ "decoder_start_token_id": null,
209
+ "diversity_penalty": 0.0,
210
+ "do_sample": false,
211
+ "dtype": "bfloat16",
212
+ "early_stopping": false,
213
+ "encoder_no_repeat_ngram_size": 0,
214
+ "eos_token_id": null,
215
+ "exponential_decay_length_penalty": null,
216
+ "finetuning_task": null,
217
+ "forced_bos_token_id": null,
218
+ "forced_eos_token_id": null,
219
+ "hidden_act": "silu",
220
+ "hidden_size": 2048,
221
+ "id2label": {
222
+ "0": "LABEL_0",
223
+ "1": "LABEL_1"
224
+ },
225
+ "init_std": 0.02,
226
+ "initializer_range": 0.02,
227
+ "intermediate_size": 11008,
228
+ "is_decoder": false,
229
+ "is_encoder_decoder": false,
230
+ "label2id": {
231
+ "LABEL_0": 0,
232
+ "LABEL_1": 1
233
+ },
234
+ "layer_types": [
235
+ "full_attention",
236
+ "full_attention",
237
+ "full_attention",
238
+ "full_attention",
239
+ "full_attention",
240
+ "full_attention",
241
+ "full_attention",
242
+ "full_attention",
243
+ "full_attention",
244
+ "full_attention",
245
+ "full_attention",
246
+ "full_attention",
247
+ "full_attention",
248
+ "full_attention",
249
+ "full_attention",
250
+ "full_attention",
251
+ "full_attention",
252
+ "full_attention",
253
+ "full_attention",
254
+ "full_attention",
255
+ "full_attention",
256
+ "full_attention",
257
+ "full_attention",
258
+ "full_attention",
259
+ "full_attention",
260
+ "full_attention",
261
+ "full_attention",
262
+ "full_attention",
263
+ "full_attention",
264
+ "full_attention",
265
+ "full_attention",
266
+ "full_attention",
267
+ "full_attention",
268
+ "full_attention",
269
+ "full_attention",
270
+ "full_attention"
271
+ ],
272
+ "length_penalty": 1.0,
273
+ "max_length": 20,
274
+ "max_position_embeddings": 32768,
275
+ "max_window_layers": 70,
276
+ "min_length": 0,
277
+ "model_type": "qwen2_5_omni_text",
278
+ "no_repeat_ngram_size": 0,
279
+ "num_attention_heads": 16,
280
+ "num_beam_groups": 1,
281
+ "num_beams": 1,
282
+ "num_hidden_layers": 36,
283
+ "num_key_value_heads": 2,
284
+ "num_return_sequences": 1,
285
+ "output_attentions": false,
286
+ "output_hidden_states": false,
287
+ "output_scores": false,
288
+ "pad_token_id": 151643,
289
+ "prefix": null,
290
+ "problem_type": null,
291
+ "pruned_heads": {},
292
+ "remove_invalid_values": false,
293
+ "repetition_penalty": 1.0,
294
+ "return_dict": true,
295
+ "return_dict_in_generate": false,
296
+ "rms_norm_eps": 1e-06,
297
+ "rope_scaling": {
298
+ "mrope_section": [
299
+ 16,
300
+ 24,
301
+ 24
302
+ ],
303
+ "rope_type": "default",
304
+ "type": "default"
305
+ },
306
+ "rope_theta": 1000000.0,
307
+ "sep_token_id": null,
308
+ "sliding_window": null,
309
+ "suppress_tokens": null,
310
+ "task_specific_params": null,
311
+ "temperature": 1.0,
312
+ "tf_legacy_loss": false,
313
+ "tie_encoder_decoder": false,
314
+ "tie_word_embeddings": false,
315
+ "tokenizer_class": null,
316
+ "top_k": 50,
317
+ "top_p": 1.0,
318
+ "torchscript": false,
319
+ "typical_p": 1.0,
320
+ "use_bfloat16": false,
321
+ "use_cache": false,
322
+ "use_sliding_window": false,
323
+ "vocab_size": 151936
324
+ },
325
+ "user_token_id": 872,
326
+ "video_token_index": 151656,
327
+ "vision_config": {
328
+ "_attn_implementation_autoset": true,
329
+ "_name_or_path": "",
330
+ "add_cross_attention": false,
331
+ "architectures": null,
332
+ "bad_words_ids": null,
333
+ "begin_suppress_tokens": null,
334
+ "bos_token_id": null,
335
+ "chunk_size_feed_forward": 0,
336
+ "cross_attention_hidden_size": null,
337
+ "decoder_start_token_id": null,
338
+ "depth": 32,
339
+ "diversity_penalty": 0.0,
340
+ "do_sample": false,
341
+ "dtype": "bfloat16",
342
+ "early_stopping": false,
343
+ "embed_dim": 1280,
344
+ "encoder_no_repeat_ngram_size": 0,
345
+ "eos_token_id": null,
346
+ "exponential_decay_length_penalty": null,
347
+ "finetuning_task": null,
348
+ "forced_bos_token_id": null,
349
+ "forced_eos_token_id": null,
350
+ "fullatt_block_indexes": [
351
+ 7,
352
+ 15,
353
+ 23,
354
+ 31
355
+ ],
356
+ "hidden_act": "silu",
357
+ "hidden_size": 1280,
358
+ "id2label": {
359
+ "0": "LABEL_0",
360
+ "1": "LABEL_1"
361
+ },
362
+ "in_channels": 3,
363
+ "in_chans": 3,
364
+ "init_std": 0.02,
365
+ "initializer_range": 0.02,
366
+ "intermediate_size": 3420,
367
+ "is_decoder": false,
368
+ "is_encoder_decoder": false,
369
+ "label2id": {
370
+ "LABEL_0": 0,
371
+ "LABEL_1": 1
372
+ },
373
+ "length_penalty": 1.0,
374
+ "max_length": 20,
375
+ "min_length": 0,
376
+ "model_type": "qwen2_5_omni_vision_encoder",
377
+ "no_repeat_ngram_size": 0,
378
+ "num_beam_groups": 1,
379
+ "num_beams": 1,
380
+ "num_heads": 16,
381
+ "num_return_sequences": 1,
382
+ "out_hidden_size": 2048,
383
+ "output_attentions": false,
384
+ "output_hidden_states": false,
385
+ "output_scores": false,
386
+ "pad_token_id": 151643,
387
+ "patch_size": 14,
388
+ "prefix": null,
389
+ "problem_type": null,
390
+ "pruned_heads": {},
391
+ "remove_invalid_values": false,
392
+ "repetition_penalty": 1.0,
393
+ "return_dict": true,
394
+ "return_dict_in_generate": false,
395
+ "sep_token_id": null,
396
+ "spatial_merge_size": 2,
397
+ "spatial_patch_size": 14,
398
+ "suppress_tokens": null,
399
+ "task_specific_params": null,
400
+ "temperature": 1.0,
401
+ "temporal_patch_size": 2,
402
+ "tf_legacy_loss": false,
403
+ "tie_encoder_decoder": false,
404
+ "tie_word_embeddings": true,
405
+ "tokenizer_class": null,
406
+ "tokens_per_second": 25,
407
+ "top_k": 50,
408
+ "top_p": 1.0,
409
+ "torchscript": false,
410
+ "typical_p": 1.0,
411
+ "use_bfloat16": false,
412
+ "window_size": 112
413
+ },
414
+ "vision_end_token_id": 151653,
415
+ "vision_start_token_id": 151652,
416
+ "vision_token_id": 151654
417
+ },
418
+ "token2wav_config": {
419
+ "_attn_implementation_autoset": true,
420
+ "bigvgan_config": {
421
+ "_attn_implementation_autoset": true,
422
+ "_name_or_path": "",
423
+ "add_cross_attention": false,
424
+ "architectures": null,
425
+ "bad_words_ids": null,
426
+ "begin_suppress_tokens": null,
427
+ "bos_token_id": null,
428
+ "chunk_size_feed_forward": 0,
429
+ "cross_attention_hidden_size": null,
430
+ "decoder_start_token_id": null,
431
+ "diversity_penalty": 0.0,
432
+ "do_sample": false,
433
+ "dtype": null,
434
+ "early_stopping": false,
435
+ "encoder_no_repeat_ngram_size": 0,
436
+ "eos_token_id": null,
437
+ "exponential_decay_length_penalty": null,
438
+ "finetuning_task": null,
439
+ "forced_bos_token_id": null,
440
+ "forced_eos_token_id": null,
441
+ "id2label": {
442
+ "0": "LABEL_0",
443
+ "1": "LABEL_1"
444
+ },
445
+ "is_decoder": false,
446
+ "is_encoder_decoder": false,
447
+ "label2id": {
448
+ "LABEL_0": 0,
449
+ "LABEL_1": 1
450
+ },
451
+ "length_penalty": 1.0,
452
+ "max_length": 20,
453
+ "mel_dim": 80,
454
+ "min_length": 0,
455
+ "model_type": "qwen2_5_omni_bigvgan",
456
+ "no_repeat_ngram_size": 0,
457
+ "num_beam_groups": 1,
458
+ "num_beams": 1,
459
+ "num_return_sequences": 1,
460
+ "output_attentions": false,
461
+ "output_hidden_states": false,
462
+ "output_scores": false,
463
+ "pad_token_id": null,
464
+ "prefix": null,
465
+ "problem_type": null,
466
+ "pruned_heads": {},
467
+ "remove_invalid_values": false,
468
+ "repetition_penalty": 1.0,
469
+ "resblock_dilation_sizes": [
470
+ [
471
+ 1,
472
+ 3,
473
+ 5
474
+ ],
475
+ [
476
+ 1,
477
+ 3,
478
+ 5
479
+ ],
480
+ [
481
+ 1,
482
+ 3,
483
+ 5
484
+ ]
485
+ ],
486
+ "resblock_kernel_sizes": [
487
+ 3,
488
+ 7,
489
+ 11
490
+ ],
491
+ "return_dict": true,
492
+ "return_dict_in_generate": false,
493
+ "sep_token_id": null,
494
+ "suppress_tokens": null,
495
+ "task_specific_params": null,
496
+ "temperature": 1.0,
497
+ "tf_legacy_loss": false,
498
+ "tie_encoder_decoder": false,
499
+ "tie_word_embeddings": true,
500
+ "tokenizer_class": null,
501
+ "top_k": 50,
502
+ "top_p": 1.0,
503
+ "torchscript": false,
504
+ "typical_p": 1.0,
505
+ "upsample_initial_channel": 1536,
506
+ "upsample_kernel_sizes": [
507
+ 11,
508
+ 7,
509
+ 4,
510
+ 4,
511
+ 4,
512
+ 4
513
+ ],
514
+ "upsample_rates": [
515
+ 5,
516
+ 3,
517
+ 2,
518
+ 2,
519
+ 2,
520
+ 2
521
+ ],
522
+ "use_bfloat16": false,
523
+ "use_bias_at_final": false
524
+ },
525
+ "dit_config": {
526
+ "_attn_implementation_autoset": true,
527
+ "_name_or_path": "",
528
+ "add_cross_attention": false,
529
+ "architectures": null,
530
+ "bad_words_ids": null,
531
+ "begin_suppress_tokens": null,
532
+ "block_size": 24,
533
+ "bos_token_id": null,
534
+ "chunk_size_feed_forward": 0,
535
+ "cross_attention_hidden_size": null,
536
+ "decoder_start_token_id": null,
537
+ "depth": 22,
538
+ "dim": 1024,
539
+ "diversity_penalty": 0.0,
540
+ "do_sample": false,
541
+ "dropout": 0.1,
542
+ "dtype": "float32",
543
+ "early_stopping": false,
544
+ "emb_dim": 512,
545
+ "enc_attention_channels": 64,
546
+ "enc_channels": [
547
+ 256,
548
+ 256,
549
+ 256,
550
+ 256,
551
+ 768
552
+ ],
553
+ "enc_dilations": [
554
+ 1,
555
+ 2,
556
+ 3,
557
+ 4,
558
+ 1
559
+ ],
560
+ "enc_dim": 128,
561
+ "enc_emb_dim": 192,
562
+ "enc_global_context": true,
563
+ "enc_kernel_sizes": [
564
+ 5,
565
+ 3,
566
+ 3,
567
+ 3,
568
+ 1
569
+ ],
570
+ "enc_lin_neurons": 192,
571
+ "enc_res2net_scale": 2,
572
+ "enc_se_channels": 64,
573
+ "encoder_no_repeat_ngram_size": 0,
574
+ "eos_token_id": null,
575
+ "exponential_decay_length_penalty": null,
576
+ "ff_mult": 2,
577
+ "finetuning_task": null,
578
+ "forced_bos_token_id": null,
579
+ "forced_eos_token_id": null,
580
+ "head_dim": 64,
581
+ "heads": 16,
582
+ "hidden_size": 1024,
583
+ "id2label": {
584
+ "0": "LABEL_0",
585
+ "1": "LABEL_1"
586
+ },
587
+ "is_decoder": false,
588
+ "is_encoder_decoder": false,
589
+ "label2id": {
590
+ "LABEL_0": 0,
591
+ "LABEL_1": 1
592
+ },
593
+ "length_penalty": 1.0,
594
+ "look_ahead_layers": [
595
+ 10
596
+ ],
597
+ "look_backward_layers": [
598
+ 0,
599
+ 20
600
+ ],
601
+ "max_length": 20,
602
+ "max_position_embeddings": 32768,
603
+ "mel_dim": 80,
604
+ "min_length": 0,
605
+ "model_type": "qwen2_5_omni_dit",
606
+ "no_repeat_ngram_size": 0,
607
+ "num_attention_heads": 16,
608
+ "num_beam_groups": 1,
609
+ "num_beams": 1,
610
+ "num_embeds": 8193,
611
+ "num_hidden_layers": 22,
612
+ "num_return_sequences": 1,
613
+ "output_attentions": false,
614
+ "output_hidden_states": false,
615
+ "output_scores": false,
616
+ "pad_token_id": null,
617
+ "prefix": null,
618
+ "problem_type": null,
619
+ "pruned_heads": {},
620
+ "remove_invalid_values": false,
621
+ "repeats": 2,
622
+ "repetition_penalty": 1.0,
623
+ "return_dict": true,
624
+ "return_dict_in_generate": false,
625
+ "rope_theta": 10000.0,
626
+ "sep_token_id": null,
627
+ "suppress_tokens": null,
628
+ "task_specific_params": null,
629
+ "temperature": 1.0,
630
+ "tf_legacy_loss": false,
631
+ "tie_encoder_decoder": false,
632
+ "tie_word_embeddings": true,
633
+ "tokenizer_class": null,
634
+ "top_k": 50,
635
+ "top_p": 1.0,
636
+ "torchscript": false,
637
+ "typical_p": 1.0,
638
+ "use_bfloat16": false
639
+ },
640
+ "dtype": "bfloat16",
641
+ "model_type": "qwen2_5_omni_token2wav"
642
+ },
643
+ "transformers_version": "4.57.1"
644
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 151645,
5
+ 151643
6
+ ],
7
+ "transformers_version": "4.57.1"
8
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2704aee221d0c1569e4852364c5e63108065a5c6549c2d990220cecb702e773a
3
+ size 4994850880
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:822ac8e6646202507cbbdce51f261ccf700dd08b34ecb295deb4f67d39126ed6
3
+ size 4412251408
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,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 300,
3
+ "dither": 0.0,
4
+ "feature_extractor_type": "WhisperFeatureExtractor",
5
+ "feature_size": 128,
6
+ "hop_length": 160,
7
+ "image_mean": [
8
+ 0.48145466,
9
+ 0.4578275,
10
+ 0.40821073
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.26862954,
15
+ 0.26130258,
16
+ 0.27577711
17
+ ],
18
+ "max_pixels": 12845056,
19
+ "merge_size": 2,
20
+ "min_pixels": 3136,
21
+ "n_fft": 400,
22
+ "n_samples": 4800000,
23
+ "nb_max_frames": 30000,
24
+ "padding_side": "right",
25
+ "padding_value": 0.0,
26
+ "patch_size": 14,
27
+ "processor_class": "Qwen2_5OmniProcessor",
28
+ "return_attention_mask": true,
29
+ "sampling_rate": 16000,
30
+ "temporal_patch_size": 2
31
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|AUDIO|>",
6
+ "<|audio_bos|>",
7
+ "<|audio_eos|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_bos|>",
12
+ "<|vision_eos|>",
13
+ "<|vision_pad|>",
14
+ "<|IMAGE|>",
15
+ "<|VIDEO|>"
16
+ ],
17
+ "audio_bos_token": "<|audio_bos|>",
18
+ "audio_eos_token": "<|audio_eos|>",
19
+ "audio_token": "<|AUDIO|>",
20
+ "eos_token": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "image_token": "<|IMAGE|>",
28
+ "pad_token": {
29
+ "content": "<|endoftext|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ },
35
+ "video_token": "<|VIDEO|>",
36
+ "vision_bos_token": "<|vision_bos|>",
37
+ "vision_eos_token": "<|vision_eos|>"
38
+ }
spk_dict.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a05609b28f5d42b7b748f0f07592545c8f1f6885b9ae8fff64baf56e86b2a18
3
+ size 259544
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8441917e39ae0244e06d704b95b3124795cec478e297f9afac39ba670d7e9d99
3
+ size 11421870
tokenizer_config.json ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "151646": {
29
+ "content": "<|AUDIO|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151647": {
37
+ "content": "<|audio_bos|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151648": {
45
+ "content": "<|audio_eos|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "151649": {
53
+ "content": "<|box_end|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "151650": {
61
+ "content": "<|quad_start|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "151651": {
69
+ "content": "<|quad_end|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "151652": {
77
+ "content": "<|vision_bos|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "151653": {
85
+ "content": "<|vision_eos|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "151654": {
93
+ "content": "<|vision_pad|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "151655": {
101
+ "content": "<|IMAGE|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "151656": {
109
+ "content": "<|VIDEO|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "151657": {
117
+ "content": "<tool_call>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": false
123
+ },
124
+ "151658": {
125
+ "content": "</tool_call>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": false
131
+ },
132
+ "151659": {
133
+ "content": "<|fim_prefix|>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": false
139
+ },
140
+ "151660": {
141
+ "content": "<|fim_middle|>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": false
147
+ },
148
+ "151661": {
149
+ "content": "<|fim_suffix|>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": false
155
+ },
156
+ "151662": {
157
+ "content": "<|fim_pad|>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": false
163
+ },
164
+ "151663": {
165
+ "content": "<|repo_name|>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": false
171
+ },
172
+ "151664": {
173
+ "content": "<|file_sep|>",
174
+ "lstrip": false,
175
+ "normalized": false,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": false
179
+ }
180
+ },
181
+ "additional_special_tokens": [
182
+ "<|im_start|>",
183
+ "<|im_end|>",
184
+ "<|AUDIO|>",
185
+ "<|audio_bos|>",
186
+ "<|audio_eos|>",
187
+ "<|box_end|>",
188
+ "<|quad_start|>",
189
+ "<|quad_end|>",
190
+ "<|vision_bos|>",
191
+ "<|vision_eos|>",
192
+ "<|vision_pad|>",
193
+ "<|IMAGE|>",
194
+ "<|VIDEO|>"
195
+ ],
196
+ "audio_bos_token": "<|audio_bos|>",
197
+ "audio_eos_token": "<|audio_eos|>",
198
+ "audio_token": "<|AUDIO|>",
199
+ "bos_token": null,
200
+ "clean_up_tokenization_spaces": false,
201
+ "eos_token": "<|im_end|>",
202
+ "errors": "replace",
203
+ "extra_special_tokens": {
204
+ "audio_bos_token": "<|audio_bos|>",
205
+ "audio_eos_token": "<|audio_eos|>",
206
+ "audio_token": "<|AUDIO|>",
207
+ "image_token": "<|IMAGE|>",
208
+ "video_token": "<|VIDEO|>",
209
+ "vision_bos_token": "<|vision_bos|>",
210
+ "vision_eos_token": "<|vision_eos|>"
211
+ },
212
+ "image_token": "<|IMAGE|>",
213
+ "model_max_length": 32768,
214
+ "pad_token": "<|endoftext|>",
215
+ "processor_class": "Qwen2_5OmniProcessor",
216
+ "split_special_tokens": false,
217
+ "tokenizer_class": "Qwen2Tokenizer",
218
+ "unk_token": null,
219
+ "video_token": "<|VIDEO|>",
220
+ "vision_bos_token": "<|vision_bos|>",
221
+ "vision_eos_token": "<|vision_eos|>"
222
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff