jakep-allenai commited on
Commit
bb4a8c0
·
verified ·
1 Parent(s): 2ea346c

Upload folder using huggingface_hub

Browse files
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{% 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_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|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}"
3
+ }
config.json CHANGED
@@ -1,14 +1,17 @@
1
  {
2
- "_name_or_path": "/home/ubuntu/.cache/pdelfin/model",
3
  "architectures": [
4
  "Qwen2VLForConditionalGeneration"
5
  ],
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 151643,
8
  "eos_token_id": 151645,
 
 
 
 
 
9
  "hidden_act": "silu",
10
  "hidden_size": 3584,
11
- "image_token_id": 151655,
12
  "initializer_range": 0.02,
13
  "intermediate_size": 18944,
14
  "max_position_embeddings": 32768,
@@ -18,30 +21,32 @@
18
  "num_hidden_layers": 28,
19
  "num_key_value_heads": 4,
20
  "rms_norm_eps": 1e-06,
21
- "rope_scaling": {
22
- "mrope_section": [
23
- 16,
24
- 24,
25
- 24
26
- ],
27
- "rope_type": "default",
28
- "type": "default"
29
- },
30
  "rope_theta": 1000000.0,
31
  "sliding_window": 32768,
32
  "tie_word_embeddings": false,
33
  "torch_dtype": "bfloat16",
34
- "transformers_version": "4.45.0.dev0",
35
  "use_cache": true,
36
  "use_sliding_window": false,
37
- "video_token_id": 151656,
38
  "vision_config": {
 
 
 
 
39
  "in_chans": 3,
40
- "model_type": "qwen2_vl",
41
- "spatial_patch_size": 14
 
 
 
 
 
 
 
 
 
 
 
42
  },
43
- "vision_end_token_id": 151653,
44
- "vision_start_token_id": 151652,
45
- "vision_token_id": 151654,
46
  "vocab_size": 152064
47
  }
 
1
  {
 
2
  "architectures": [
3
  "Qwen2VLForConditionalGeneration"
4
  ],
5
  "attention_dropout": 0.0,
6
  "bos_token_id": 151643,
7
  "eos_token_id": 151645,
8
+ "vision_start_token_id": 151652,
9
+ "vision_end_token_id": 151653,
10
+ "vision_token_id": 151654,
11
+ "image_token_id": 151655,
12
+ "video_token_id": 151656,
13
  "hidden_act": "silu",
14
  "hidden_size": 3584,
 
15
  "initializer_range": 0.02,
16
  "intermediate_size": 18944,
17
  "max_position_embeddings": 32768,
 
21
  "num_hidden_layers": 28,
22
  "num_key_value_heads": 4,
23
  "rms_norm_eps": 1e-06,
 
 
 
 
 
 
 
 
 
24
  "rope_theta": 1000000.0,
25
  "sliding_window": 32768,
26
  "tie_word_embeddings": false,
27
  "torch_dtype": "bfloat16",
28
+ "transformers_version": "4.41.2",
29
  "use_cache": true,
30
  "use_sliding_window": false,
 
31
  "vision_config": {
32
+ "depth": 32,
33
+ "embed_dim": 1280,
34
+ "mlp_ratio": 4,
35
+ "num_heads": 16,
36
  "in_chans": 3,
37
+ "hidden_size": 3584,
38
+ "patch_size": 14,
39
+ "spatial_merge_size": 2,
40
+ "spatial_patch_size": 14,
41
+ "temporal_patch_size": 2
42
+ },
43
+ "rope_scaling": {
44
+ "rope_type": "mrope",
45
+ "mrope_section": [
46
+ 16,
47
+ 24,
48
+ 24
49
+ ]
50
  },
 
 
 
51
  "vocab_size": 152064
52
  }
generation_config.json CHANGED
@@ -1,13 +1,14 @@
1
  {
2
  "bos_token_id": 151643,
 
3
  "do_sample": true,
4
  "eos_token_id": [
5
  151645,
6
  151643
7
  ],
8
- "pad_token_id": 151643,
9
  "temperature": 0.01,
10
- "top_k": 1,
11
  "top_p": 0.001,
12
- "transformers_version": "4.45.0.dev0"
 
13
  }
 
1
  {
2
  "bos_token_id": 151643,
3
+ "pad_token_id": 151643,
4
  "do_sample": true,
5
  "eos_token_id": [
6
  151645,
7
  151643
8
  ],
9
+ "repetition_penalty": 1.0,
10
  "temperature": 0.01,
 
11
  "top_p": 0.001,
12
+ "top_k": 1,
13
+ "transformers_version": "4.37.0"
14
  }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "min_pixels": 3136,
3
+ "max_pixels": 12845056,
4
+ "patch_size": 14,
5
+ "temporal_patch_size": 2,
6
+ "merge_size": 2,
7
+ "image_mean": [
8
+ 0.48145466,
9
+ 0.4578275,
10
+ 0.40821073
11
+ ],
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "image_processor_type": "Qwen2VLImageProcessor",
18
+ "processor_class": "Qwen2VLProcessor"
19
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<|object_ref_start|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151647": {
37
+ "content": "<|object_ref_end|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151648": {
45
+ "content": "<|box_start|>",
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_start|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "151653": {
85
+ "content": "<|vision_end|>",
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_pad|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "151656": {
109
+ "content": "<|video_pad|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ }
116
+ },
117
+ "additional_special_tokens": ["<|im_start|>", "<|im_end|>", "<|object_ref_start|>","<|object_ref_end|>","<|box_start|>","<|box_end|>","<|quad_start|>","<|quad_end|>","<|vision_start|>","<|vision_end|>","<|vision_pad|>","<|image_pad|>","<|video_pad|>"],
118
+ "bos_token": null,
119
+ "chat_template": "{% 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_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|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|im_end|>",
122
+ "padding_side": "left",
123
+ "errors": "replace",
124
+ "model_max_length": 32768,
125
+ "pad_token": "<|endoftext|>",
126
+ "split_special_tokens": false,
127
+ "tokenizer_class": "Qwen2Tokenizer",
128
+ "unk_token": null
129
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff