hf-transformers-bot commited on
Commit
244c1fd
·
verified ·
1 Parent(s): 63d0850

Update tiny models for HunYuanVLModel

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,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "HunYuanVLModel"
4
+ ],
5
+ "dtype": "float32",
6
+ "im_end_id": 120119,
7
+ "im_newline_id": 120121,
8
+ "im_start_id": 120118,
9
+ "image_token_id": 5,
10
+ "model_type": "hunyuan_vl",
11
+ "text_config": {
12
+ "attention_bias": false,
13
+ "attention_dropout": 0.0,
14
+ "bos_token_id": 120000,
15
+ "eod_token_id": 3,
16
+ "eos_token_id": 120007,
17
+ "head_dim": 16,
18
+ "hidden_act": "silu",
19
+ "hidden_size": 64,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 128,
22
+ "max_position_embeddings": 200,
23
+ "model_type": "hunyuan_vl_text",
24
+ "num_attention_heads": 4,
25
+ "num_hidden_layers": 2,
26
+ "num_key_value_heads": 4,
27
+ "pad_token_id": 120002,
28
+ "pretraining_tp": 1,
29
+ "rms_norm_eps": 1e-05,
30
+ "rope_parameters": {
31
+ "mrope_section": [
32
+ 2,
33
+ 2,
34
+ 2,
35
+ 2
36
+ ],
37
+ "rope_theta": 10000.0,
38
+ "rope_type": "default"
39
+ },
40
+ "sep_token_id": 4,
41
+ "tie_word_embeddings": false,
42
+ "use_cache": true,
43
+ "vocab_size": 120818
44
+ },
45
+ "tie_word_embeddings": false,
46
+ "transformers_version": "5.16.0.dev0",
47
+ "vision_config": {
48
+ "attention_dropout": 0.0,
49
+ "hidden_act": "silu",
50
+ "hidden_size": 64,
51
+ "img_max_token_num": 4096,
52
+ "intermediate_size": 128,
53
+ "interpolate_mode": "bilinear",
54
+ "max_image_size": 64,
55
+ "max_vit_seq_len": 16,
56
+ "min_image_size": 64,
57
+ "model_type": "hunyuan_vl_vision",
58
+ "num_attention_heads": 4,
59
+ "num_channels": 3,
60
+ "num_hidden_layers": 2,
61
+ "num_key_value_heads": 4,
62
+ "out_hidden_size": 64,
63
+ "patch_size": 16,
64
+ "rms_norm_eps": 1e-05,
65
+ "spatial_merge_size": 1,
66
+ "temporal_patch_size": 1,
67
+ "text_hidden_size": 64
68
+ }
69
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f06809197d076b35ffe782491440421608494f22ff3d447d210571379dfe8d00
3
+ size 31969048
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
+ }