Upload 4 files
Browse files- chat_template.json +3 -0
- config.json +63 -200
- processor_config.json +7 -3
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
CHANGED
@@ -1,206 +1,69 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/root/models/LLaVA-NeXT-Video-7B",
|
3 |
-
"architectures": [
|
4 |
-
"LlavaNextVideoForConditionalGeneration"
|
5 |
-
],
|
6 |
-
"ignore_index": -100,
|
7 |
-
"image_grid_pinpoints": [
|
8 |
-
[
|
9 |
-
336,
|
10 |
-
672
|
11 |
-
],
|
12 |
-
[
|
13 |
-
672,
|
14 |
-
336
|
15 |
-
],
|
16 |
-
[
|
17 |
-
672,
|
18 |
-
672
|
19 |
-
],
|
20 |
-
[
|
21 |
-
1008,
|
22 |
-
336
|
23 |
-
],
|
24 |
-
[
|
25 |
-
336,
|
26 |
-
1008
|
27 |
-
]
|
28 |
-
],
|
29 |
-
"image_token_index": 32001,
|
30 |
-
"model_type": "llava_next_video",
|
31 |
-
"projector_hidden_act": "gelu",
|
32 |
-
"spatial_pool_mode": "average",
|
33 |
-
"spatial_pool_out_channels": 1024,
|
34 |
-
"spatial_pool_stride": 2,
|
35 |
-
"text_config": {
|
36 |
-
"_name_or_path": "lmsys/vicuna-7b-v1.5",
|
37 |
-
"add_cross_attention": false,
|
38 |
"architectures": [
|
39 |
-
"
|
40 |
],
|
41 |
-
"
|
42 |
-
"
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
"
|
65 |
-
"
|
66 |
-
"
|
67 |
-
"
|
68 |
-
"
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
"output_hidden_states": false,
|
87 |
-
"output_scores": false,
|
88 |
-
"pad_token_id": 0,
|
89 |
-
"prefix": null,
|
90 |
-
"pretraining_tp": 1,
|
91 |
-
"problem_type": null,
|
92 |
-
"pruned_heads": {},
|
93 |
-
"remove_invalid_values": false,
|
94 |
-
"repetition_penalty": 1.0,
|
95 |
-
"return_dict": true,
|
96 |
-
"return_dict_in_generate": false,
|
97 |
-
"rms_norm_eps": 1e-05,
|
98 |
-
"rope_scaling": {
|
99 |
-
"factor": 2.5,
|
100 |
-
"type": "linear"
|
101 |
},
|
102 |
-
"rope_theta": 10000.0,
|
103 |
-
"sep_token_id": null,
|
104 |
-
"suppress_tokens": null,
|
105 |
-
"task_specific_params": null,
|
106 |
-
"temperature": 1.0,
|
107 |
-
"tf_legacy_loss": false,
|
108 |
-
"tie_encoder_decoder": false,
|
109 |
"tie_word_embeddings": false,
|
110 |
-
"
|
111 |
-
"
|
112 |
-
"
|
113 |
-
"
|
114 |
-
"
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
"use_cache": false,
|
125 |
-
"use_image_newline_parameter": true,
|
126 |
-
"video_token_index": 32000,
|
127 |
-
"vision_config": {
|
128 |
-
"_name_or_path": "",
|
129 |
-
"add_cross_attention": false,
|
130 |
-
"architectures": null,
|
131 |
-
"attention_dropout": 0.0,
|
132 |
-
"bad_words_ids": null,
|
133 |
-
"begin_suppress_tokens": null,
|
134 |
-
"bos_token_id": null,
|
135 |
-
"chunk_size_feed_forward": 0,
|
136 |
-
"cross_attention_hidden_size": null,
|
137 |
-
"decoder_start_token_id": null,
|
138 |
-
"diversity_penalty": 0.0,
|
139 |
-
"do_sample": false,
|
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": 1024,
|
149 |
-
"id2label": {
|
150 |
-
"0": "LABEL_0",
|
151 |
-
"1": "LABEL_1"
|
152 |
-
},
|
153 |
-
"image_size": 336,
|
154 |
-
"initializer_factor": 1.0,
|
155 |
-
"initializer_range": 0.02,
|
156 |
-
"intermediate_size": 4096,
|
157 |
-
"is_decoder": false,
|
158 |
-
"is_encoder_decoder": false,
|
159 |
-
"label2id": {
|
160 |
-
"LABEL_0": 0,
|
161 |
-
"LABEL_1": 1
|
162 |
},
|
163 |
-
"
|
164 |
-
"
|
165 |
-
|
166 |
-
"min_length": 0,
|
167 |
-
"model_type": "clip_vision_model",
|
168 |
-
"no_repeat_ngram_size": 0,
|
169 |
-
"num_attention_heads": 16,
|
170 |
-
"num_beam_groups": 1,
|
171 |
-
"num_beams": 1,
|
172 |
-
"num_channels": 3,
|
173 |
-
"num_hidden_layers": 24,
|
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": 14,
|
180 |
-
"prefix": null,
|
181 |
-
"problem_type": null,
|
182 |
-
"projection_dim": 768,
|
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": true,
|
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 |
-
"vocab_size": 32000
|
203 |
-
},
|
204 |
-
"vision_feature_layer": -2,
|
205 |
-
"vision_feature_select_strategy": "default"
|
206 |
-
}
|
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"architectures": [
|
3 |
+
"LlavaNextVideoForConditionalGeneration"
|
4 |
],
|
5 |
+
"ignore_index": -100,
|
6 |
+
"image_grid_pinpoints": [
|
7 |
+
[
|
8 |
+
336,
|
9 |
+
672
|
10 |
+
],
|
11 |
+
[
|
12 |
+
672,
|
13 |
+
336
|
14 |
+
],
|
15 |
+
[
|
16 |
+
672,
|
17 |
+
672
|
18 |
+
],
|
19 |
+
[
|
20 |
+
1008,
|
21 |
+
336
|
22 |
+
],
|
23 |
+
[
|
24 |
+
336,
|
25 |
+
1008
|
26 |
+
]
|
27 |
+
],
|
28 |
+
"image_token_index": 32001,
|
29 |
+
"model_type": "llava_next_video",
|
30 |
+
"projector_hidden_act": "gelu",
|
31 |
+
"spatial_pool_mode": "average",
|
32 |
+
"spatial_pool_out_channels": 1024,
|
33 |
+
"spatial_pool_stride": 2,
|
34 |
+
"text_config": {
|
35 |
+
"_name_or_path": "lmsys/vicuna-7b-v1.5",
|
36 |
+
"architectures": [
|
37 |
+
"LlamaForCausalLM"
|
38 |
+
],
|
39 |
+
"rope_scaling" : {
|
40 |
+
"factor": 2.5,
|
41 |
+
"type": "linear"
|
42 |
+
},
|
43 |
+
"max_position_embeddings": 4096,
|
44 |
+
"model_type": "llama",
|
45 |
+
"pad_token_id": 0,
|
46 |
+
"rms_norm_eps": 1e-05,
|
47 |
+
"torch_dtype": "float16",
|
48 |
+
"type": "linear",
|
49 |
+
"vocab_size": 32064
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
"tie_word_embeddings": false,
|
52 |
+
"torch_dtype": "bfloat16",
|
53 |
+
"transformers_version": "4.42.0.dev0",
|
54 |
+
"use_image_newline_parameter": true,
|
55 |
+
"video_token_index": 32000,
|
56 |
+
"vision_config": {
|
57 |
+
"hidden_size": 1024,
|
58 |
+
"image_size": 336,
|
59 |
+
"intermediate_size": 4096,
|
60 |
+
"model_type": "clip_vision_model",
|
61 |
+
"num_attention_heads": 16,
|
62 |
+
"num_hidden_layers": 24,
|
63 |
+
"patch_size": 14,
|
64 |
+
"projection_dim": 768,
|
65 |
+
"vocab_size": 32000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
},
|
67 |
+
"vision_feature_layer": -2,
|
68 |
+
"vision_feature_select_strategy": "default"
|
69 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
processor_config.json
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"
|
4 |
-
|
|
|
|
|
|
|
|
|
|
1 |
{
|
2 |
+
"image_token": "<image>",
|
3 |
+
"video_token": "<video>",
|
4 |
+
"num_additional_image_tokens": 1,
|
5 |
+
"patch_size": 14,
|
6 |
+
"processor_class": "LlavaNextVideoProcessor",
|
7 |
+
"vision_feature_select_strategy": "default"
|
8 |
+
}
|