gary109 commited on
Commit
acbcf42
·
verified ·
1 Parent(s): 4d8edcd

(Trained with Unsloth)

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
added_tokens.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|box_end|>": 151649,
3
+ "<|box_start|>": 151648,
4
+ "<|endoftext|>": 151643,
5
+ "<|im_end|>": 151645,
6
+ "<|im_start|>": 151644,
7
+ "<|image_pad|>": 151655,
8
+ "<|object_ref_end|>": 151647,
9
+ "<|object_ref_start|>": 151646,
10
+ "<|quad_end|>": 151651,
11
+ "<|quad_start|>": 151650,
12
+ "<|video_pad|>": 151656,
13
+ "<|vision_end|>": 151653,
14
+ "<|vision_pad|>": 151654,
15
+ "<|vision_start|>": 151652
16
+ }
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 %}
config.json ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2VLForConditionalGeneration"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "dtype": "float16",
7
+ "eos_token_id": 151645,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 1536,
10
+ "image_token_id": 151655,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 8960,
13
+ "max_position_embeddings": 32768,
14
+ "max_window_layers": 28,
15
+ "model_type": "qwen2_vl",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 28,
18
+ "num_key_value_heads": 2,
19
+ "pad_token_id": 151654,
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
+ "text_config": {
33
+ "_name_or_path": "unsloth/Qwen2-VL-2B-Instruct",
34
+ "architectures": [
35
+ "Qwen2VLForConditionalGeneration"
36
+ ],
37
+ "attention_dropout": 0.0,
38
+ "dtype": "float16",
39
+ "eos_token_id": 151645,
40
+ "hidden_act": "silu",
41
+ "hidden_size": 1536,
42
+ "image_token_id": null,
43
+ "initializer_range": 0.02,
44
+ "intermediate_size": 8960,
45
+ "layer_types": [
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention",
50
+ "full_attention",
51
+ "full_attention",
52
+ "full_attention",
53
+ "full_attention",
54
+ "full_attention",
55
+ "full_attention",
56
+ "full_attention",
57
+ "full_attention",
58
+ "full_attention",
59
+ "full_attention",
60
+ "full_attention",
61
+ "full_attention",
62
+ "full_attention",
63
+ "full_attention",
64
+ "full_attention",
65
+ "full_attention",
66
+ "full_attention",
67
+ "full_attention",
68
+ "full_attention",
69
+ "full_attention",
70
+ "full_attention",
71
+ "full_attention",
72
+ "full_attention",
73
+ "full_attention"
74
+ ],
75
+ "max_position_embeddings": 32768,
76
+ "max_window_layers": 28,
77
+ "model_type": "qwen2_vl_text",
78
+ "num_attention_heads": 12,
79
+ "num_hidden_layers": 28,
80
+ "num_key_value_heads": 2,
81
+ "pad_token_id": 151654,
82
+ "quantization_config": {
83
+ "_load_in_4bit": true,
84
+ "_load_in_8bit": false,
85
+ "bnb_4bit_compute_dtype": "bfloat16",
86
+ "bnb_4bit_quant_storage": "uint8",
87
+ "bnb_4bit_quant_type": "nf4",
88
+ "bnb_4bit_use_double_quant": true,
89
+ "llm_int8_enable_fp32_cpu_offload": false,
90
+ "llm_int8_has_fp16_weight": false,
91
+ "llm_int8_skip_modules": [
92
+ "lm_head",
93
+ "multi_modal_projector",
94
+ "merger",
95
+ "modality_projection",
96
+ "model.layers.1.mlp",
97
+ "visual.blocks.29.mlp",
98
+ "visual.blocks.21.mlp",
99
+ "visual.blocks.24.attn",
100
+ "visual.blocks.26.mlp",
101
+ "visual.blocks.23.attn",
102
+ "visual.blocks.18.mlp",
103
+ "visual.blocks.19.mlp",
104
+ "visual.blocks.22.attn",
105
+ "visual.blocks.17.mlp",
106
+ "visual.blocks.25.attn",
107
+ "visual.blocks.24.mlp",
108
+ "visual.blocks.26.attn",
109
+ "visual.blocks.29.attn",
110
+ "visual.blocks.21.attn",
111
+ "visual.blocks.22.mlp",
112
+ "visual.blocks.14.mlp",
113
+ "visual.blocks.23.mlp",
114
+ "visual.blocks.14.attn",
115
+ "visual.merger.mlp",
116
+ "visual.blocks.16.mlp",
117
+ "visual.blocks.20.mlp",
118
+ "visual.blocks.25.mlp",
119
+ "visual.blocks.13.mlp",
120
+ "visual.blocks.18.attn",
121
+ "visual.blocks.20.attn",
122
+ "visual.blocks.17.attn",
123
+ "visual.blocks.15.mlp",
124
+ "visual.blocks.27.attn",
125
+ "visual.blocks.28.attn",
126
+ "visual.blocks.12.mlp",
127
+ "visual.blocks.16.attn",
128
+ "visual.blocks.19.attn",
129
+ "visual.blocks.15.attn",
130
+ "visual.blocks.11.attn",
131
+ "visual.blocks.13.attn",
132
+ "visual.blocks.12.attn",
133
+ "visual.blocks.10.mlp",
134
+ "visual.blocks.11.mlp",
135
+ "visual.blocks.10.attn",
136
+ "visual.blocks.9.mlp",
137
+ "visual.blocks.5.attn",
138
+ "visual.blocks.9.attn",
139
+ "visual.blocks.4.attn",
140
+ "visual.blocks.6.mlp",
141
+ "visual.blocks.7.mlp",
142
+ "visual.blocks.1.attn",
143
+ "visual.blocks.6.attn",
144
+ "visual.blocks.7.attn",
145
+ "visual.blocks.5.mlp",
146
+ "visual.blocks.8.attn",
147
+ "visual.blocks.8.mlp",
148
+ "visual.blocks.4.mlp",
149
+ "visual.blocks.3.attn",
150
+ "visual.blocks.3.mlp",
151
+ "visual.blocks.1.mlp",
152
+ "visual.blocks.2.mlp",
153
+ "visual.blocks.2.attn",
154
+ "visual.blocks.0.attn",
155
+ "visual.blocks.0.mlp",
156
+ "visual.blocks.31.mlp"
157
+ ],
158
+ "llm_int8_threshold": 6.0,
159
+ "load_in_4bit": true,
160
+ "load_in_8bit": false,
161
+ "quant_method": "bitsandbytes"
162
+ },
163
+ "rms_norm_eps": 1e-06,
164
+ "rope_scaling": {
165
+ "mrope_section": [
166
+ 16,
167
+ 24,
168
+ 24
169
+ ],
170
+ "rope_type": "default",
171
+ "type": "default"
172
+ },
173
+ "rope_theta": 1000000.0,
174
+ "sliding_window": null,
175
+ "tie_word_embeddings": true,
176
+ "unsloth_fixed": true,
177
+ "use_cache": true,
178
+ "use_sliding_window": false,
179
+ "video_token_id": null,
180
+ "vision_end_token_id": 151653,
181
+ "vision_start_token_id": 151652,
182
+ "vision_token_id": 151654,
183
+ "vocab_size": 151936
184
+ },
185
+ "transformers_version": "4.56.2",
186
+ "unsloth_fixed": true,
187
+ "unsloth_version": "2025.9.11",
188
+ "use_cache": true,
189
+ "use_sliding_window": false,
190
+ "video_token_id": 151656,
191
+ "vision_config": {
192
+ "depth": 32,
193
+ "dtype": "float16",
194
+ "embed_dim": 1280,
195
+ "hidden_act": "quick_gelu",
196
+ "hidden_size": 1536,
197
+ "in_channels": 3,
198
+ "in_chans": 3,
199
+ "initializer_range": 0.02,
200
+ "mlp_ratio": 4,
201
+ "model_type": "qwen2_vl",
202
+ "num_heads": 16,
203
+ "patch_size": 14,
204
+ "spatial_merge_size": 2,
205
+ "spatial_patch_size": 14,
206
+ "temporal_patch_size": 2
207
+ },
208
+ "vision_end_token_id": 151653,
209
+ "vision_start_token_id": 151652,
210
+ "vision_token_id": 151654,
211
+ "vocab_size": 151936
212
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_rescale": true,
11
+ "do_resize": true,
12
+ "image_mean": [
13
+ 0.48145466,
14
+ 0.4578275,
15
+ 0.40821073
16
+ ],
17
+ "image_processor_type": "Qwen2VLImageProcessorFast",
18
+ "image_std": [
19
+ 0.26862954,
20
+ 0.26130258,
21
+ 0.27577711
22
+ ],
23
+ "input_data_format": null,
24
+ "max_pixels": 12845056,
25
+ "merge_size": 2,
26
+ "min_pixels": 3136,
27
+ "patch_size": 14,
28
+ "processor_class": "Qwen2VLProcessor",
29
+ "resample": 3,
30
+ "rescale_factor": 0.00392156862745098,
31
+ "return_tensors": null,
32
+ "size": {
33
+ "longest_edge": 12845056,
34
+ "shortest_edge": 3136
35
+ },
36
+ "temporal_patch_size": 2
37
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|vision_pad|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:091aa7594dc2fcfbfa06b9e3c22a5f0562ac14f30375c13af7309407a0e67b8a
3
+ size 11420371
tokenizer_config.json ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": [
118
+ "<|im_start|>",
119
+ "<|im_end|>",
120
+ "<|object_ref_start|>",
121
+ "<|object_ref_end|>",
122
+ "<|box_start|>",
123
+ "<|box_end|>",
124
+ "<|quad_start|>",
125
+ "<|quad_end|>",
126
+ "<|vision_start|>",
127
+ "<|vision_end|>",
128
+ "<|vision_pad|>",
129
+ "<|image_pad|>",
130
+ "<|video_pad|>"
131
+ ],
132
+ "bos_token": null,
133
+ "clean_up_tokenization_spaces": false,
134
+ "eos_token": "<|im_end|>",
135
+ "errors": "replace",
136
+ "extra_special_tokens": {},
137
+ "model_max_length": 32768,
138
+ "pad_token": "<|vision_pad|>",
139
+ "padding_side": "left",
140
+ "processor_class": "Qwen2VLProcessor",
141
+ "split_special_tokens": false,
142
+ "tokenizer_class": "Qwen2Tokenizer",
143
+ "unk_token": null
144
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "do_center_crop": null,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_pad": null,
10
+ "do_rescale": true,
11
+ "do_resize": true,
12
+ "do_sample_frames": false,
13
+ "fps": null,
14
+ "image_mean": [
15
+ 0.48145466,
16
+ 0.4578275,
17
+ 0.40821073
18
+ ],
19
+ "image_std": [
20
+ 0.26862954,
21
+ 0.26130258,
22
+ 0.27577711
23
+ ],
24
+ "input_data_format": null,
25
+ "max_frames": 768,
26
+ "max_pixels": 12845056,
27
+ "merge_size": 2,
28
+ "min_frames": 4,
29
+ "min_pixels": 3136,
30
+ "num_frames": null,
31
+ "patch_size": 14,
32
+ "processor_class": "Qwen2VLProcessor",
33
+ "resample": 3,
34
+ "rescale_factor": 0.00392156862745098,
35
+ "return_metadata": false,
36
+ "size": {
37
+ "longest_edge": 12845056,
38
+ "shortest_edge": 3136
39
+ },
40
+ "size_divisor": null,
41
+ "temporal_patch_size": 2,
42
+ "video_metadata": null,
43
+ "video_processor_type": "Qwen2VLVideoProcessor"
44
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff