hf-transformers-bot commited on
Commit
3e139fe
·
verified ·
1 Parent(s): 6457e81

Update tiny models for HunYuanVLVisionTransformer

Browse files
chat_template.jinja ADDED
@@ -0,0 +1 @@
 
 
1
+ {% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% if messages[0]['content'] is string %}{% set system_message = messages[0]['content'] %}{% else %}{% set system_message = messages[0]['content']['text'] %}{% endif %}<|hy_begin▁of▁sentence|>{{ system_message }}<|hy_place▁holder▁no▁3|>{% else %}{% set loop_messages = messages %}<|hy_begin▁of▁sentence|>{% endif %}{% for message in loop_messages %}{% if message['role'] == 'user' %}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}<|hy_place▁holder▁no▁100|><|hy_place▁holder▁no▁102|><|hy_place▁holder▁no▁101|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}<|hy_User|>{% elif message['role'] == 'assistant' %}{{ message['content'] }}<|hy_Assistant|>{% endif %}{% endfor %}
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "HunYuanVLVisionTransformer"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "dtype": "float32",
7
+ "hidden_act": "silu",
8
+ "hidden_size": 64,
9
+ "img_max_token_num": 4096,
10
+ "intermediate_size": 128,
11
+ "interpolate_mode": "bilinear",
12
+ "max_image_size": 64,
13
+ "max_vit_seq_len": 16,
14
+ "min_image_size": 64,
15
+ "model_type": "hunyuan_vl_vision",
16
+ "num_attention_heads": 4,
17
+ "num_channels": 3,
18
+ "num_hidden_layers": 2,
19
+ "num_key_value_heads": 4,
20
+ "out_hidden_size": 64,
21
+ "patch_size": 16,
22
+ "rms_norm_eps": 1e-05,
23
+ "spatial_merge_size": 1,
24
+ "temporal_patch_size": 1,
25
+ "text_hidden_size": 64,
26
+ "transformers_version": "5.16.0.dev0"
27
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4a4f0d413087e2c6d2ba682b9839a775fdfb4124f264135a5564b3b9eba4fe4
3
+ size 706824
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.48145466,
8
+ 0.4578275,
9
+ 0.40821073
10
+ ],
11
+ "image_processor_type": "HunYuanVLImageProcessor",
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "merge_size": 2,
18
+ "patch_size": 16,
19
+ "resample": 1,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "longest_edge": 16777216,
23
+ "shortest_edge": 262144
24
+ },
25
+ "temporal_patch_size": 1
26
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|hy_begin▁of▁sentence|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|hy_Assistant|>",
6
+ "image_end_token": "<|hy_place▁holder▁no▁101|>",
7
+ "image_start_token": "<|hy_place▁holder▁no▁100|>",
8
+ "image_token": "<|hy_place▁holder▁no▁102|>",
9
+ "is_local": true,
10
+ "local_files_only": false,
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "model_specific_special_tokens": {
13
+ "image_end_token": "<|hy_place▁holder▁no▁101|>",
14
+ "image_start_token": "<|hy_place▁holder▁no▁100|>",
15
+ "image_token": "<|hy_place▁holder▁no▁102|>",
16
+ "video_end_token": "<|hy_place▁holder▁no▁105|>",
17
+ "video_start_token": "<|hy_place▁holder▁no▁104|>",
18
+ "video_token": "<|hy_place▁holder▁no▁665|>"
19
+ },
20
+ "pad_token": "<|hy_▁pad▁|>",
21
+ "processor_class": "HunYuanVLProcessor",
22
+ "tokenizer_class": "TokenizersBackend",
23
+ "video_end_token": "<|hy_place▁holder▁no▁105|>",
24
+ "video_start_token": "<|hy_place▁holder▁no▁104|>",
25
+ "video_token": "<|hy_place▁holder▁no▁665|>"
26
+ }