Upload processor
Browse files- chat_template.json +3 -0
- preprocessor_config.json +26 -0
- tokenizer_config.json +1 -1
chat_template.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chat_template": "\n{%- set identifier = 'im' %}\n{% for message in messages %}\n {% if message['role'] == 'stream' %}\n {% set identifier = 'stream' %}\n {% else %}\n {% set identifier = 'im' %}\n {% endif %}\n {{- '<|' + identifier + '_start|>' + message['role'] + '\n' -}}\n {% if message['content'] is string %}\n {{- message['content'] + '<|' + identifier + '_end|>\n' -}}\n {% else %}\n {% for content in message['content'] %}\n {% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}\n {% if 'time' in content %}\n {{- 'Time ' + content['time'] | round(1) | string + 's: ' -}}\n {% endif %}\n\n {{- '<image>\n' -}}\n\n {% elif content['type'] == 'video' or 'video' in content or 'video_url' in content %}\n {% for i in range(content['num_frames']) %}\n {% if 'timestamps' in content %}\n {{- 'Time ' + content['timestamps'][i] | round(1) | string + 's:' -}}\n {% endif %}\n {% if i < content['num_frames'] - 1 %}\n\n {{- '<image>,' -}}\n\n {% else %}\n\n {{- '<image>\n' -}}\n\n {% endif %}\n {% endfor %}\n {% elif content['type'] == 'text' or 'text' in content %}\n {{- content['text'] -}}\n {% endif %}\n {% endfor %}\n {{- '<|' + identifier + '_end|>\n' -}}\n {% endif %}\n{% endfor %}\n{% if add_generation_prompt %}\n {{- '<|im_start|>assistant\n' -}}\n{% endif %}\n"
|
3 |
+
}
|
preprocessor_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoImageProcessor": "DAMO-NLP-SG/SigLIP-NaViT--image_processing_videollama3.Videollama3ImageProcessor"
|
4 |
+
},
|
5 |
+
"do_convert_rgb": null,
|
6 |
+
"do_normalize": true,
|
7 |
+
"do_rescale": true,
|
8 |
+
"do_resize": true,
|
9 |
+
"image_mean": [
|
10 |
+
0.5,
|
11 |
+
0.5,
|
12 |
+
0.5
|
13 |
+
],
|
14 |
+
"image_processor_type": "Videollama3ImageProcessor",
|
15 |
+
"image_std": [
|
16 |
+
0.5,
|
17 |
+
0.5,
|
18 |
+
0.5
|
19 |
+
],
|
20 |
+
"max_tokens": 16384,
|
21 |
+
"min_tokens": 16,
|
22 |
+
"patch_size": 14,
|
23 |
+
"processor_class": "Videollama3Processor",
|
24 |
+
"resample": 3,
|
25 |
+
"rescale_factor": 0.00392156862745098
|
26 |
+
}
|
tokenizer_config.json
CHANGED
@@ -229,7 +229,7 @@
|
|
229 |
"model_max_length": 16384,
|
230 |
"pad_token": "<|endoftext|>",
|
231 |
"padding_side": "right",
|
232 |
-
"processor_class": "
|
233 |
"split_special_tokens": false,
|
234 |
"tokenizer_class": "Qwen2Tokenizer",
|
235 |
"unk_token": null
|
|
|
229 |
"model_max_length": 16384,
|
230 |
"pad_token": "<|endoftext|>",
|
231 |
"padding_side": "right",
|
232 |
+
"processor_class": "Videollama3Processor",
|
233 |
"split_special_tokens": false,
|
234 |
"tokenizer_class": "Qwen2Tokenizer",
|
235 |
"unk_token": null
|