Hammad712 commited on
Commit
5f8ea6c
·
verified ·
1 Parent(s): 0ecaef7

Upload processor

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 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_start|><|image_pad|><|vision_end|>{% 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_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>
6
+ {% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
7
+ {% endif %}
processor_config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.48145466,
10
+ 0.4578275,
11
+ 0.40821073
12
+ ],
13
+ "image_processor_type": "Qwen2VLImageProcessorFast",
14
+ "image_std": [
15
+ 0.26862954,
16
+ 0.26130258,
17
+ 0.27577711
18
+ ],
19
+ "max_pixels": 802816,
20
+ "merge_size": 2,
21
+ "min_pixels": 200704,
22
+ "patch_size": 14,
23
+ "resample": 3,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "longest_edge": 802816,
27
+ "shortest_edge": 200704
28
+ },
29
+ "temporal_patch_size": 2
30
+ },
31
+ "processor_class": "Qwen2VLProcessor",
32
+ "video_processor": {
33
+ "data_format": "channels_first",
34
+ "default_to_square": true,
35
+ "do_convert_rgb": true,
36
+ "do_normalize": true,
37
+ "do_rescale": true,
38
+ "do_resize": true,
39
+ "do_sample_frames": false,
40
+ "image_mean": [
41
+ 0.48145466,
42
+ 0.4578275,
43
+ 0.40821073
44
+ ],
45
+ "image_processor_type": "Qwen2VLImageProcessor",
46
+ "image_std": [
47
+ 0.26862954,
48
+ 0.26130258,
49
+ 0.27577711
50
+ ],
51
+ "max_frames": 768,
52
+ "max_pixels": 802816,
53
+ "merge_size": 2,
54
+ "min_frames": 4,
55
+ "min_pixels": 200704,
56
+ "patch_size": 14,
57
+ "resample": 3,
58
+ "rescale_factor": 0.00392156862745098,
59
+ "return_metadata": false,
60
+ "size": {
61
+ "longest_edge": 12845056,
62
+ "shortest_edge": 3136
63
+ },
64
+ "temporal_patch_size": 2,
65
+ "video_processor_type": "Qwen2VLVideoProcessor"
66
+ }
67
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:312c03cb421e18f41c20c3e35f3302479a3a8f8b1f06779fd900326a0d32c22f
3
+ size 11420534
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "max_pixels": 802816,
25
+ "min_pixels": 200704,
26
+ "model_max_length": 32768,
27
+ "pad_token": "<|endoftext|>",
28
+ "padding_side": "left",
29
+ "processor_class": "Qwen2VLProcessor",
30
+ "split_special_tokens": false,
31
+ "tokenizer_class": "Qwen2Tokenizer",
32
+ "unk_token": null
33
+ }