IlyasMoutawwakil HF Staff commited on
Commit
bd9472e
·
verified ·
1 Parent(s): 0fd541c

Mirror from katuni4ka/tiny-random-llava-next-video

Browse files
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<image>": 32001,
3
+ "<video>": 32000
4
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{% for message in messages %}{% if message['role'] != 'system' %}{{ message['role'].upper() + ': '}}{% endif %}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'video') %}{{ '<video>\n' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] + ' '}}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ content['text'] + ' '}}{% endgeneration %}{% endfor %}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'ASSISTANT:' }}{% endif %}"
3
+ }
config.json ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/ea/work/my_optimum_intel/optimum-intel/tiny-random-llava-next-video",
3
+ "architectures": [
4
+ "LlavaNextVideoForConditionalGeneration"
5
+ ],
6
+ "ignore_index": -100,
7
+ "image_grid_pinpoints": [
8
+ [
9
+ 32,
10
+ 64
11
+ ],
12
+ [
13
+ 64,
14
+ 32
15
+ ],
16
+ [
17
+ 64,
18
+ 64
19
+ ],
20
+ [
21
+ 96,
22
+ 32
23
+ ],
24
+ [
25
+ 32,
26
+ 96
27
+ ]
28
+ ],
29
+ "image_seq_length": 225,
30
+ "image_token_index": 32001,
31
+ "model_type": "llava_next_video",
32
+ "projector_hidden_act": "gelu",
33
+ "spatial_pool_mode": "average",
34
+ "spatial_pool_stride": 2,
35
+ "text_config": {
36
+ "_attn_implementation_autoset": false,
37
+ "_name_or_path": "HuggingFaceM4/tiny-random-LlamaForCausalLM",
38
+ "add_cross_attention": false,
39
+ "architectures": [
40
+ "LlamaForCausalLM"
41
+ ],
42
+ "attention_bias": false,
43
+ "attention_dropout": 0.0,
44
+ "bad_words_ids": null,
45
+ "begin_suppress_tokens": null,
46
+ "bos_token_id": 0,
47
+ "chunk_size_feed_forward": 0,
48
+ "cross_attention_hidden_size": null,
49
+ "decoder_start_token_id": null,
50
+ "diversity_penalty": 0.0,
51
+ "do_sample": false,
52
+ "early_stopping": false,
53
+ "encoder_no_repeat_ngram_size": 0,
54
+ "eos_token_id": 1,
55
+ "exponential_decay_length_penalty": null,
56
+ "finetuning_task": null,
57
+ "forced_bos_token_id": null,
58
+ "forced_eos_token_id": null,
59
+ "head_dim": 4,
60
+ "hidden_act": "silu",
61
+ "hidden_size": 16,
62
+ "id2label": {
63
+ "0": "LABEL_0",
64
+ "1": "LABEL_1"
65
+ },
66
+ "initializer_range": 0.02,
67
+ "intermediate_size": 64,
68
+ "is_decoder": false,
69
+ "is_encoder_decoder": false,
70
+ "label2id": {
71
+ "LABEL_0": 0,
72
+ "LABEL_1": 1
73
+ },
74
+ "length_penalty": 1.0,
75
+ "max_length": 20,
76
+ "max_position_embeddings": 2048,
77
+ "min_length": 0,
78
+ "mlp_bias": false,
79
+ "model_type": "llama",
80
+ "no_repeat_ngram_size": 0,
81
+ "num_attention_heads": 4,
82
+ "num_beam_groups": 1,
83
+ "num_beams": 1,
84
+ "num_hidden_layers": 2,
85
+ "num_key_value_heads": 4,
86
+ "num_return_sequences": 1,
87
+ "output_attentions": false,
88
+ "output_hidden_states": false,
89
+ "output_scores": false,
90
+ "pad_token_id": 3201,
91
+ "prefix": null,
92
+ "pretraining_tp": 1,
93
+ "problem_type": null,
94
+ "pruned_heads": {},
95
+ "remove_invalid_values": false,
96
+ "repetition_penalty": 1.0,
97
+ "return_dict": true,
98
+ "return_dict_in_generate": false,
99
+ "rms_norm_eps": 1e-06,
100
+ "rope_scaling": null,
101
+ "rope_theta": 10000.0,
102
+ "sep_token_id": null,
103
+ "suppress_tokens": null,
104
+ "task_specific_params": null,
105
+ "temperature": 1.0,
106
+ "tf_legacy_loss": false,
107
+ "tie_encoder_decoder": false,
108
+ "tie_word_embeddings": false,
109
+ "tokenizer_class": null,
110
+ "top_k": 50,
111
+ "top_p": 1.0,
112
+ "torch_dtype": "float32",
113
+ "torchscript": false,
114
+ "typical_p": 1.0,
115
+ "use_bfloat16": false,
116
+ "use_cache": true,
117
+ "vocab_size": 32002
118
+ },
119
+ "tie_word_embeddings": false,
120
+ "torch_dtype": "float32",
121
+ "transformers_version": "4.46.3",
122
+ "use_image_newline_parameter": true,
123
+ "video_seq_length": 49,
124
+ "video_token_index": 32000,
125
+ "vision_config": {
126
+ "_attn_implementation_autoset": false,
127
+ "_name_or_path": "",
128
+ "add_cross_attention": false,
129
+ "architectures": null,
130
+ "attention_dropout": 0.1,
131
+ "bad_words_ids": null,
132
+ "begin_suppress_tokens": null,
133
+ "bos_token_id": null,
134
+ "chunk_size_feed_forward": 0,
135
+ "cross_attention_hidden_size": null,
136
+ "decoder_start_token_id": null,
137
+ "diversity_penalty": 0.0,
138
+ "do_sample": false,
139
+ "dropout": 0.1,
140
+ "early_stopping": false,
141
+ "encoder_no_repeat_ngram_size": 0,
142
+ "eos_token_id": null,
143
+ "exponential_decay_length_penalty": null,
144
+ "finetuning_task": null,
145
+ "forced_bos_token_id": null,
146
+ "forced_eos_token_id": null,
147
+ "hidden_act": "quick_gelu",
148
+ "hidden_size": 32,
149
+ "id2label": {
150
+ "0": "LABEL_0",
151
+ "1": "LABEL_1"
152
+ },
153
+ "image_size": 32,
154
+ "initializer_factor": 1.0,
155
+ "initializer_range": 0.02,
156
+ "intermediate_size": 37,
157
+ "is_decoder": false,
158
+ "is_encoder_decoder": false,
159
+ "label2id": {
160
+ "LABEL_0": 0,
161
+ "LABEL_1": 1
162
+ },
163
+ "layer_norm_eps": 1e-05,
164
+ "length_penalty": 1.0,
165
+ "max_length": 20,
166
+ "min_length": 0,
167
+ "model_type": "clip_vision_model",
168
+ "no_repeat_ngram_size": 0,
169
+ "num_attention_heads": 4,
170
+ "num_beam_groups": 1,
171
+ "num_beams": 1,
172
+ "num_channels": 3,
173
+ "num_hidden_layers": 2,
174
+ "num_return_sequences": 1,
175
+ "output_attentions": false,
176
+ "output_hidden_states": false,
177
+ "output_scores": false,
178
+ "pad_token_id": null,
179
+ "patch_size": 2,
180
+ "prefix": null,
181
+ "problem_type": null,
182
+ "projection_dim": 32,
183
+ "pruned_heads": {},
184
+ "remove_invalid_values": false,
185
+ "repetition_penalty": 1.0,
186
+ "return_dict": true,
187
+ "return_dict_in_generate": false,
188
+ "sep_token_id": null,
189
+ "suppress_tokens": null,
190
+ "task_specific_params": null,
191
+ "temperature": 1.0,
192
+ "tf_legacy_loss": false,
193
+ "tie_encoder_decoder": false,
194
+ "tie_word_embeddings": false,
195
+ "tokenizer_class": null,
196
+ "top_k": 50,
197
+ "top_p": 1.0,
198
+ "torch_dtype": null,
199
+ "torchscript": false,
200
+ "typical_p": 1.0,
201
+ "use_bfloat16": false
202
+ },
203
+ "vision_feature_layer": -2,
204
+ "vision_feature_select_strategy": "default",
205
+ "vocab_size": 32002
206
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 1,
5
+ "pad_token_id": 3201,
6
+ "transformers_version": "4.46.3"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4575b64a8a85f6f66c313be6cfc4ac836d5d4d3f22b4c4675c57bfd2dd76eb1a
3
+ size 4229880
preprocessor_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "aspect_ratio_setting": "anyres",
3
+ "crop_size": {
4
+ "height": 32,
5
+ "width": 32
6
+ },
7
+ "image_grid_pinpoints": [
8
+ [
9
+ 32,
10
+ 64
11
+ ],
12
+ [
13
+ 64,
14
+ 32
15
+ ],
16
+ [
17
+ 64,
18
+ 64
19
+ ],
20
+ [
21
+ 96,
22
+ 32
23
+ ],
24
+ [
25
+ 32,
26
+ 96
27
+ ]
28
+ ],
29
+ "do_center_crop": true,
30
+ "do_convert_rgb": true,
31
+ "do_normalize": true,
32
+ "do_rescale": true,
33
+ "do_resize": true,
34
+ "image_mean": [
35
+ 0.48145466,
36
+ 0.4578275,
37
+ 0.40821073
38
+ ],
39
+ "image_processor_type": "LlavaNextImageProcessor",
40
+ "image_std": [
41
+ 0.26862954,
42
+ 0.26130258,
43
+ 0.27577711
44
+ ],
45
+ "processor_class": "LlavaNextVideoProcessor",
46
+ "resample": 3,
47
+ "rescale_factor": 0.00392156862745098,
48
+ "size": {
49
+ "shortest_edge": 32
50
+ }
51
+ }
processor_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_token": "<image>",
3
+ "video_token": "<video>",
4
+ "num_additional_image_tokens": 1,
5
+ "patch_size": 2,
6
+ "processor_class": "LlavaNextVideoProcessor",
7
+ "vision_feature_select_strategy": "default"
8
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "32000": {
31
+ "content": "<video>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<image>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ }
46
+ },
47
+ "bos_token": "<s>",
48
+ "clean_up_tokenization_spaces": false,
49
+ "eos_token": "</s>",
50
+ "extra_special_tokens": {
51
+ "image_token": "<image>",
52
+ "video_token": "<video>"
53
+ },
54
+ "image_token": "<image>",
55
+ "legacy": false,
56
+ "model_max_length": 4096,
57
+ "pad_token": "<unk>",
58
+ "padding_side": "left",
59
+ "processor_class": "LlavaNextVideoProcessor",
60
+ "sp_model_kwargs": {},
61
+ "spaces_between_special_tokens": false,
62
+ "tokenizer_class": "LlamaTokenizer",
63
+ "unk_token": "<unk>",
64
+ "use_default_system_prompt": false,
65
+ "video_token": "<video>"
66
+ }