hf-transformers-bot commited on
Commit
f8f5e52
·
verified ·
1 Parent(s): fe62deb

Update tiny models for InternVLVisionModel

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,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
+ '}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<IMG_CONTEXT>
3
+ ' }}{% elif content['type'] == 'video' %}{{ '<video>
4
+ ' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
6
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "InternVLVisionModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "dtype": "float32",
8
+ "hidden_act": "quick_gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 32,
11
+ "image_size": [
12
+ 64,
13
+ 64
14
+ ],
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 128,
17
+ "layer_norm_eps": 1e-06,
18
+ "layer_scale_init_value": 0.1,
19
+ "model_type": "internvl_vision",
20
+ "norm_type": "layer_norm",
21
+ "num_attention_heads": 4,
22
+ "num_channels": 3,
23
+ "num_hidden_layers": 2,
24
+ "patch_size": [
25
+ 4,
26
+ 4
27
+ ],
28
+ "projection_dropout": 0.0,
29
+ "transformers_version": "5.16.0.dev0",
30
+ "use_absolute_position_embeddings": true,
31
+ "use_mask_token": false,
32
+ "use_mean_pooling": true,
33
+ "use_qk_norm": false
34
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b9758ecf87835c9f969fdfecf6fe402d0619fa5744574ca0c22993de8ee5e05
3
+ size 144048
preprocessor_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": [
4
+ 64,
5
+ 64
6
+ ],
7
+ "width": [
8
+ 64,
9
+ 64
10
+ ]
11
+ },
12
+ "crop_to_patches": false,
13
+ "do_convert_rgb": true,
14
+ "do_normalize": true,
15
+ "do_rescale": true,
16
+ "do_resize": true,
17
+ "image_mean": [
18
+ 0.48145466,
19
+ 0.4578275,
20
+ 0.40821073
21
+ ],
22
+ "image_processor_type": "GotOcr2ImageProcessor",
23
+ "image_std": [
24
+ 0.26862954,
25
+ 0.26130258,
26
+ 0.27577711
27
+ ],
28
+ "max_patches": 12,
29
+ "min_patches": 1,
30
+ "resample": 3,
31
+ "rescale_factor": 0.00392156862745098,
32
+ "size": {
33
+ "height": [
34
+ 64,
35
+ 64
36
+ ],
37
+ "width": [
38
+ 64,
39
+ 64
40
+ ]
41
+ }
42
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd0c8be238c81a5f0450067d9565e16794aef2699df631fcf3dd0c2ac4842b06
3
+ size 11423728
tokenizer_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "context_image_token": "<IMG_CONTEXT>",
7
+ "end_image_token": "</img>",
8
+ "eos_token": "<|im_end|>",
9
+ "errors": "replace",
10
+ "is_local": true,
11
+ "local_files_only": false,
12
+ "model_max_length": 8192,
13
+ "model_specific_special_tokens": {
14
+ "context_image_token": "<IMG_CONTEXT>",
15
+ "end_image_token": "</img>",
16
+ "start_image_token": "<img>",
17
+ "video_token": "<video>"
18
+ },
19
+ "pad_token": "<|endoftext|>",
20
+ "return_token_type_ids": false,
21
+ "split_special_tokens": false,
22
+ "start_image_token": "<img>",
23
+ "tokenizer_class": "Qwen2Tokenizer",
24
+ "unk_token": null,
25
+ "video_token": "<video>"
26
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": [
4
+ 64,
5
+ 64
6
+ ],
7
+ "width": [
8
+ 64,
9
+ 64
10
+ ]
11
+ },
12
+ "do_convert_rgb": true,
13
+ "do_normalize": true,
14
+ "do_rescale": true,
15
+ "do_resize": true,
16
+ "do_sample_frames": false,
17
+ "image_mean": [
18
+ 0.48145466,
19
+ 0.4578275,
20
+ 0.40821073
21
+ ],
22
+ "image_std": [
23
+ 0.26862954,
24
+ 0.26130258,
25
+ 0.27577711
26
+ ],
27
+ "initial_shift": true,
28
+ "resample": 3,
29
+ "rescale_factor": 0.00392156862745098,
30
+ "return_metadata": false,
31
+ "size": {
32
+ "height": [
33
+ 64,
34
+ 64
35
+ ],
36
+ "width": [
37
+ 64,
38
+ 64
39
+ ]
40
+ },
41
+ "video_processor_type": "InternVLVideoProcessor"
42
+ }