hf-transformers-bot commited on
Commit
e55a0f8
·
verified ·
1 Parent(s): 424b662

Update tiny models for Qwen2_5OmniThinkerForConditionalGeneration

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
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,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2_5OmniThinkerForConditionalGeneration"
4
+ ],
5
+ "audio_config": {
6
+ "activation_dropout": 0.0,
7
+ "activation_function": "gelu",
8
+ "attention_dropout": 0.0,
9
+ "d_model": 32,
10
+ "dropout": 0.0,
11
+ "encoder_attention_heads": 4,
12
+ "encoder_ffn_dim": 32,
13
+ "encoder_layers": 2,
14
+ "initializer_range": 0.02,
15
+ "max_source_positions": 1500,
16
+ "model_type": "qwen2_5_omni_audio_encoder",
17
+ "n_window": 100,
18
+ "num_mel_bins": 20,
19
+ "output_dim": 32,
20
+ "scale_embedding": false
21
+ },
22
+ "audio_end_token_id": 5,
23
+ "audio_start_token_id": 4,
24
+ "audio_token_index": 1,
25
+ "dtype": "float32",
26
+ "image_token_index": 2,
27
+ "initializer_range": 0.02,
28
+ "model_type": "qwen2_5_omni_thinker",
29
+ "position_id_per_seconds": 25,
30
+ "seconds_per_chunk": 2,
31
+ "text_config": {
32
+ "attention_dropout": 0.0,
33
+ "bos_token_id": null,
34
+ "eos_token_id": null,
35
+ "hidden_act": "silu",
36
+ "hidden_size": 32,
37
+ "initializer_range": 0.02,
38
+ "intermediate_size": 37,
39
+ "layer_types": [
40
+ "full_attention",
41
+ "full_attention"
42
+ ],
43
+ "max_position_embeddings": 1024,
44
+ "max_window_layers": 3,
45
+ "model_type": "qwen2_5_omni_text",
46
+ "num_attention_heads": 4,
47
+ "num_hidden_layers": 2,
48
+ "num_key_value_heads": 2,
49
+ "pad_token_id": 151643,
50
+ "rms_norm_eps": 1e-06,
51
+ "rope_parameters": {
52
+ "mrope_section": [
53
+ 1,
54
+ 1,
55
+ 2
56
+ ],
57
+ "rope_theta": 1000000.0,
58
+ "rope_type": "default",
59
+ "type": "default"
60
+ },
61
+ "sliding_window": null,
62
+ "tie_word_embeddings": false,
63
+ "use_cache": true,
64
+ "use_sliding_window": false,
65
+ "vocab_size": 151665
66
+ },
67
+ "tie_word_embeddings": false,
68
+ "transformers_version": "5.16.0.dev0",
69
+ "user_token_id": 6,
70
+ "video_token_index": 3,
71
+ "vision_config": {
72
+ "depth": 2,
73
+ "embed_dim": 32,
74
+ "fullatt_block_indexes": [
75
+ 0
76
+ ],
77
+ "hidden_act": "quick_gelu",
78
+ "hidden_size": 32,
79
+ "in_channels": 3,
80
+ "initializer_range": 0.02,
81
+ "intermediate_size": 24,
82
+ "mlp_ratio": 4,
83
+ "model_type": "qwen2_5_omni_vision_encoder",
84
+ "num_heads": 4,
85
+ "out_hidden_size": 32,
86
+ "patch_size": 14,
87
+ "spatial_merge_size": 1,
88
+ "temporal_patch_size": 2,
89
+ "window_size": 112
90
+ },
91
+ "vision_end_token_id": 8,
92
+ "vision_start_token_id": 7
93
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "output_attentions": false,
4
+ "output_hidden_states": false,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "5.16.0.dev0",
7
+ "use_cache": true
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc366362f6515f0c9365f874b1262c589d87d3557dedc25910efe3c0f7af2126
3
+ size 39179728
preprocessor_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "return_attention_mask": true,
28
+ "sampling_rate": 16000,
29
+ "temporal_patch_size": 2
30
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ab7a851e5c63d5fafbfdac72e3b4a8d08613f6bbb06ee39036fdf870ef59c93
3
+ size 11421866
tokenizer_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_bos|>",
4
+ "audio_eos_token": "<|audio_eos|>",
5
+ "audio_token": "<|AUDIO|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|IMAGE|>",
12
+ "is_local": true,
13
+ "local_files_only": false,
14
+ "model_max_length": 32768,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_bos|>",
17
+ "audio_eos_token": "<|audio_eos|>",
18
+ "audio_token": "<|AUDIO|>",
19
+ "image_token": "<|IMAGE|>",
20
+ "video_token": "<|VIDEO|>",
21
+ "vision_bos_token": "<|vision_bos|>",
22
+ "vision_eos_token": "<|vision_eos|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "processor_class": "Qwen2_5OmniProcessor",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null,
29
+ "video_token": "<|VIDEO|>",
30
+ "vision_bos_token": "<|vision_bos|>",
31
+ "vision_eos_token": "<|vision_eos|>"
32
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 300,
3
+ "dither": 0.0,
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "do_sample_frames": false,
9
+ "feature_size": 128,
10
+ "hop_length": 160,
11
+ "image_mean": [
12
+ 0.48145466,
13
+ 0.4578275,
14
+ 0.40821073
15
+ ],
16
+ "image_std": [
17
+ 0.26862954,
18
+ 0.26130258,
19
+ 0.27577711
20
+ ],
21
+ "max_frames": 768,
22
+ "merge_size": 2,
23
+ "min_frames": 4,
24
+ "n_fft": 400,
25
+ "n_samples": 4800000,
26
+ "nb_max_frames": 30000,
27
+ "padding_side": "right",
28
+ "padding_value": 0.0,
29
+ "patch_size": 14,
30
+ "resample": 3,
31
+ "rescale_factor": 0.00392156862745098,
32
+ "return_attention_mask": true,
33
+ "return_metadata": false,
34
+ "sampling_rate": 16000,
35
+ "size": {
36
+ "longest_edge": 12845056,
37
+ "shortest_edge": 3136
38
+ },
39
+ "temporal_patch_size": 2,
40
+ "video_processor_type": "Qwen2VLVideoProcessor"
41
+ }