Update tiny models for LlavaOnevisionModel
Browse files- .gitattributes +1 -0
- chat_template.jinja +6 -0
- config.json +90 -0
- model.safetensors +3 -0
- preprocessor_config.json +174 -0
- tokenizer.json +3 -0
- tokenizer_config.json +24 -0
- video_preprocessor_config.json +29 -0
.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 %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
|
| 2 |
+
You are a helpful assistant.<|im_end|>
|
| 3 |
+
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
|
| 4 |
+
' + message['content'] + '<|im_end|>' + '
|
| 5 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 6 |
+
' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlavaOnevisionModel"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"ignore_index": -100,
|
| 7 |
+
"image_grid_pinpoints": [
|
| 8 |
+
[
|
| 9 |
+
16,
|
| 10 |
+
16
|
| 11 |
+
]
|
| 12 |
+
],
|
| 13 |
+
"image_token_index": 1,
|
| 14 |
+
"model_type": "llava_onevision",
|
| 15 |
+
"multimodal_projector_bias": true,
|
| 16 |
+
"projector_hidden_act": "gelu",
|
| 17 |
+
"text_config": {
|
| 18 |
+
"attention_dropout": 0.0,
|
| 19 |
+
"attention_probs_dropout_prob": 0.1,
|
| 20 |
+
"bos_token_id": null,
|
| 21 |
+
"eos_token_id": null,
|
| 22 |
+
"hidden_act": "gelu",
|
| 23 |
+
"hidden_dropout_prob": 0.1,
|
| 24 |
+
"hidden_size": 32,
|
| 25 |
+
"id2label": {
|
| 26 |
+
"0": "LABEL_0",
|
| 27 |
+
"1": "LABEL_1",
|
| 28 |
+
"2": "LABEL_2"
|
| 29 |
+
},
|
| 30 |
+
"initializer_range": 0.02,
|
| 31 |
+
"intermediate_size": 37,
|
| 32 |
+
"is_training": true,
|
| 33 |
+
"label2id": {
|
| 34 |
+
"LABEL_0": 0,
|
| 35 |
+
"LABEL_1": 1,
|
| 36 |
+
"LABEL_2": 2
|
| 37 |
+
},
|
| 38 |
+
"layer_types": [
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention"
|
| 41 |
+
],
|
| 42 |
+
"max_position_embeddings": 580,
|
| 43 |
+
"max_window_layers": 28,
|
| 44 |
+
"model_type": "qwen2",
|
| 45 |
+
"num_attention_heads": 4,
|
| 46 |
+
"num_choices": 4,
|
| 47 |
+
"num_hidden_layers": 2,
|
| 48 |
+
"num_key_value_heads": 4,
|
| 49 |
+
"pad_token_id": 151643,
|
| 50 |
+
"rms_norm_eps": 1e-06,
|
| 51 |
+
"rope_parameters": {
|
| 52 |
+
"rope_theta": 10000.0,
|
| 53 |
+
"rope_type": "default"
|
| 54 |
+
},
|
| 55 |
+
"seq_length": 7,
|
| 56 |
+
"sliding_window": null,
|
| 57 |
+
"tie_word_embeddings": false,
|
| 58 |
+
"type_sequence_label_size": 2,
|
| 59 |
+
"type_vocab_size": 16,
|
| 60 |
+
"use_cache": true,
|
| 61 |
+
"use_input_mask": true,
|
| 62 |
+
"use_labels": true,
|
| 63 |
+
"use_sliding_window": false,
|
| 64 |
+
"use_token_type_ids": false,
|
| 65 |
+
"vocab_size": 151648
|
| 66 |
+
},
|
| 67 |
+
"tie_word_embeddings": false,
|
| 68 |
+
"transformers_version": "5.16.0.dev0",
|
| 69 |
+
"video_token_index": 2,
|
| 70 |
+
"vision_aspect_ratio": "anyres_max_9",
|
| 71 |
+
"vision_config": {
|
| 72 |
+
"attention_dropout": 0.1,
|
| 73 |
+
"dropout": 0.1,
|
| 74 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 75 |
+
"hidden_size": 32,
|
| 76 |
+
"image_size": 16,
|
| 77 |
+
"initializer_range": 0.02,
|
| 78 |
+
"intermediate_size": 37,
|
| 79 |
+
"is_training": true,
|
| 80 |
+
"layer_norm_eps": 1e-06,
|
| 81 |
+
"model_type": "siglip_vision_model",
|
| 82 |
+
"num_attention_heads": 4,
|
| 83 |
+
"num_channels": 3,
|
| 84 |
+
"num_hidden_layers": 2,
|
| 85 |
+
"patch_size": 8,
|
| 86 |
+
"projection_dim": 32
|
| 87 |
+
},
|
| 88 |
+
"vision_feature_layer": -1,
|
| 89 |
+
"vision_feature_select_strategy": "full"
|
| 90 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8cd096c1799768475b0977b3d7a84669cd675f16199266a9a1ec8525eb6018a2
|
| 3 |
+
size 19597980
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 16,
|
| 4 |
+
"width": 16
|
| 5 |
+
},
|
| 6 |
+
"do_convert_rgb": true,
|
| 7 |
+
"do_normalize": true,
|
| 8 |
+
"do_pad": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_grid_pinpoints": [
|
| 12 |
+
[
|
| 13 |
+
384,
|
| 14 |
+
384
|
| 15 |
+
],
|
| 16 |
+
[
|
| 17 |
+
384,
|
| 18 |
+
768
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
384,
|
| 22 |
+
1152
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
384,
|
| 26 |
+
1536
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
384,
|
| 30 |
+
1920
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
384,
|
| 34 |
+
2304
|
| 35 |
+
],
|
| 36 |
+
[
|
| 37 |
+
768,
|
| 38 |
+
384
|
| 39 |
+
],
|
| 40 |
+
[
|
| 41 |
+
768,
|
| 42 |
+
768
|
| 43 |
+
],
|
| 44 |
+
[
|
| 45 |
+
768,
|
| 46 |
+
1152
|
| 47 |
+
],
|
| 48 |
+
[
|
| 49 |
+
768,
|
| 50 |
+
1536
|
| 51 |
+
],
|
| 52 |
+
[
|
| 53 |
+
768,
|
| 54 |
+
1920
|
| 55 |
+
],
|
| 56 |
+
[
|
| 57 |
+
768,
|
| 58 |
+
2304
|
| 59 |
+
],
|
| 60 |
+
[
|
| 61 |
+
1152,
|
| 62 |
+
384
|
| 63 |
+
],
|
| 64 |
+
[
|
| 65 |
+
1152,
|
| 66 |
+
768
|
| 67 |
+
],
|
| 68 |
+
[
|
| 69 |
+
1152,
|
| 70 |
+
1152
|
| 71 |
+
],
|
| 72 |
+
[
|
| 73 |
+
1152,
|
| 74 |
+
1536
|
| 75 |
+
],
|
| 76 |
+
[
|
| 77 |
+
1152,
|
| 78 |
+
1920
|
| 79 |
+
],
|
| 80 |
+
[
|
| 81 |
+
1152,
|
| 82 |
+
2304
|
| 83 |
+
],
|
| 84 |
+
[
|
| 85 |
+
1536,
|
| 86 |
+
384
|
| 87 |
+
],
|
| 88 |
+
[
|
| 89 |
+
1536,
|
| 90 |
+
768
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
1536,
|
| 94 |
+
1152
|
| 95 |
+
],
|
| 96 |
+
[
|
| 97 |
+
1536,
|
| 98 |
+
1536
|
| 99 |
+
],
|
| 100 |
+
[
|
| 101 |
+
1536,
|
| 102 |
+
1920
|
| 103 |
+
],
|
| 104 |
+
[
|
| 105 |
+
1536,
|
| 106 |
+
2304
|
| 107 |
+
],
|
| 108 |
+
[
|
| 109 |
+
1920,
|
| 110 |
+
384
|
| 111 |
+
],
|
| 112 |
+
[
|
| 113 |
+
1920,
|
| 114 |
+
768
|
| 115 |
+
],
|
| 116 |
+
[
|
| 117 |
+
1920,
|
| 118 |
+
1152
|
| 119 |
+
],
|
| 120 |
+
[
|
| 121 |
+
1920,
|
| 122 |
+
1536
|
| 123 |
+
],
|
| 124 |
+
[
|
| 125 |
+
1920,
|
| 126 |
+
1920
|
| 127 |
+
],
|
| 128 |
+
[
|
| 129 |
+
1920,
|
| 130 |
+
2304
|
| 131 |
+
],
|
| 132 |
+
[
|
| 133 |
+
2304,
|
| 134 |
+
384
|
| 135 |
+
],
|
| 136 |
+
[
|
| 137 |
+
2304,
|
| 138 |
+
768
|
| 139 |
+
],
|
| 140 |
+
[
|
| 141 |
+
2304,
|
| 142 |
+
1152
|
| 143 |
+
],
|
| 144 |
+
[
|
| 145 |
+
2304,
|
| 146 |
+
1536
|
| 147 |
+
],
|
| 148 |
+
[
|
| 149 |
+
2304,
|
| 150 |
+
1920
|
| 151 |
+
],
|
| 152 |
+
[
|
| 153 |
+
2304,
|
| 154 |
+
2304
|
| 155 |
+
]
|
| 156 |
+
],
|
| 157 |
+
"image_mean": [
|
| 158 |
+
0.48145466,
|
| 159 |
+
0.4578275,
|
| 160 |
+
0.40821073
|
| 161 |
+
],
|
| 162 |
+
"image_processor_type": "LlavaOnevisionImageProcessor",
|
| 163 |
+
"image_std": [
|
| 164 |
+
0.26862954,
|
| 165 |
+
0.26130258,
|
| 166 |
+
0.27577711
|
| 167 |
+
],
|
| 168 |
+
"resample": 3,
|
| 169 |
+
"rescale_factor": 0.00392156862745098,
|
| 170 |
+
"size": {
|
| 171 |
+
"height": 16,
|
| 172 |
+
"width": 16
|
| 173 |
+
}
|
| 174 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97442526d1f09c62f910a70a42961c752558e420f377f1834243558e1bba51e5
|
| 3 |
+
size 11418798
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>"
|
| 11 |
+
],
|
| 12 |
+
"is_local": true,
|
| 13 |
+
"local_files_only": false,
|
| 14 |
+
"max_length": null,
|
| 15 |
+
"model_max_length": 131072,
|
| 16 |
+
"pad_to_multiple_of": null,
|
| 17 |
+
"pad_token": "<|endoftext|>",
|
| 18 |
+
"pad_token_type_id": 0,
|
| 19 |
+
"padding_side": "right",
|
| 20 |
+
"processor_class": "LlavaOnevisionProcessor",
|
| 21 |
+
"split_special_tokens": false,
|
| 22 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 23 |
+
"unk_token": null
|
| 24 |
+
}
|
video_preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 16,
|
| 4 |
+
"width": 16
|
| 5 |
+
},
|
| 6 |
+
"do_convert_rgb": true,
|
| 7 |
+
"do_normalize": true,
|
| 8 |
+
"do_rescale": true,
|
| 9 |
+
"do_resize": true,
|
| 10 |
+
"do_sample_frames": false,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.48145466,
|
| 13 |
+
0.4578275,
|
| 14 |
+
0.40821073
|
| 15 |
+
],
|
| 16 |
+
"image_std": [
|
| 17 |
+
0.26862954,
|
| 18 |
+
0.26130258,
|
| 19 |
+
0.27577711
|
| 20 |
+
],
|
| 21 |
+
"resample": 3,
|
| 22 |
+
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"return_metadata": false,
|
| 24 |
+
"size": {
|
| 25 |
+
"height": 16,
|
| 26 |
+
"width": 16
|
| 27 |
+
},
|
| 28 |
+
"video_processor_type": "LlavaOnevisionVideoProcessor"
|
| 29 |
+
}
|