Riddler2024 commited on
Commit
e452fe0
·
verified ·
1 Parent(s): a0e27f3

update preprocessore for supporting vllm

Browse files
config.json CHANGED
@@ -25,7 +25,7 @@
25
  "num_mel_bins": 128,
26
  "output_dim": 2048,
27
  "scale_embedding": false,
28
- "torch_dtype": "float32"
29
  },
30
  "audio_end_token_id": 151648,
31
  "audio_start_token_id": 151647,
@@ -103,12 +103,12 @@
103
  },
104
  "rope_theta": 1000000.0,
105
  "sliding_window": null,
106
- "torch_dtype": "float32",
107
  "use_cache": true,
108
  "use_sliding_window": false,
109
  "vocab_size": 151936
110
  },
111
- "torch_dtype": "float32",
112
  "transformers_version": "4.53.2",
113
  "user_token_id": 872,
114
  "video_token_index": 151656,
@@ -136,7 +136,7 @@
136
  "spatial_patch_size": 14,
137
  "temporal_patch_size": 2,
138
  "tokens_per_second": 25,
139
- "torch_dtype": "float32",
140
  "window_size": 112
141
  },
142
  "vision_end_token_id": 151653,
 
25
  "num_mel_bins": 128,
26
  "output_dim": 2048,
27
  "scale_embedding": false,
28
+ "torch_dtype": "bfloat16"
29
  },
30
  "audio_end_token_id": 151648,
31
  "audio_start_token_id": 151647,
 
103
  },
104
  "rope_theta": 1000000.0,
105
  "sliding_window": null,
106
+ "torch_dtype": "bfloat16",
107
  "use_cache": true,
108
  "use_sliding_window": false,
109
  "vocab_size": 151936
110
  },
111
+ "torch_dtype": "bfloat16",
112
  "transformers_version": "4.53.2",
113
  "user_token_id": 872,
114
  "video_token_index": 151656,
 
136
  "spatial_patch_size": 14,
137
  "temporal_patch_size": 2,
138
  "tokens_per_second": 25,
139
+ "torch_dtype": "bfloat16",
140
  "window_size": 112
141
  },
142
  "vision_end_token_id": 151653,
preprocessor_config.json CHANGED
@@ -15,7 +15,7 @@
15
  0.26130258,
16
  0.27577711
17
  ],
18
- "max_pixels": 12845056,
19
  "merge_size": 2,
20
  "min_pixels": 3136,
21
  "n_fft": 400,
 
15
  0.26130258,
16
  0.27577711
17
  ],
18
+ "max_pixels": 802816,
19
  "merge_size": 2,
20
  "min_pixels": 3136,
21
  "n_fft": 400,
tokenizer_config.json CHANGED
@@ -215,6 +215,7 @@
215
  "processor_class": "ColQwen2_5OmniProcessor",
216
  "split_special_tokens": false,
217
  "tokenizer_class": "Qwen2Tokenizer",
 
218
  "unk_token": null,
219
  "video_token": "<|VIDEO|>",
220
  "vision_bos_token": "<|vision_bos|>",
 
215
  "processor_class": "ColQwen2_5OmniProcessor",
216
  "split_special_tokens": false,
217
  "tokenizer_class": "Qwen2Tokenizer",
218
+ "chat_template": "{% 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\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% 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|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
219
  "unk_token": null,
220
  "video_token": "<|VIDEO|>",
221
  "vision_bos_token": "<|vision_bos|>",