hf-transformers-bot commited on
Commit
a3bf3e9
·
verified ·
1 Parent(s): 0474790

Update tiny models for LlavaNextForConditionalGeneration

Browse files
chat_template.jinja ADDED
@@ -0,0 +1 @@
 
 
1
+ {{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}
config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlavaNextForConditionalGeneration"
4
+ ],
5
+ "dtype": "float32",
6
+ "image_grid_pinpoints": [
7
+ [
8
+ 8,
9
+ 8
10
+ ]
11
+ ],
12
+ "image_seq_length": 576,
13
+ "image_token_index": 3,
14
+ "model_type": "llava_next",
15
+ "multimodal_projector_bias": true,
16
+ "pad_token_id": 32001,
17
+ "projector_hidden_act": "gelu",
18
+ "text_config": {
19
+ "attention_bias": false,
20
+ "attention_dropout": 0.0,
21
+ "bos_token_id": 1,
22
+ "eos_token_id": 2,
23
+ "head_dim": 16,
24
+ "hidden_act": "gelu",
25
+ "hidden_size": 32,
26
+ "initializer_range": 0.02,
27
+ "intermediate_size": 32,
28
+ "max_position_embeddings": 512,
29
+ "mlp_bias": false,
30
+ "model_type": "llama",
31
+ "num_attention_heads": 2,
32
+ "num_hidden_layers": 2,
33
+ "num_key_value_heads": 2,
34
+ "pad_token_id": 32001,
35
+ "pretraining_tp": 1,
36
+ "rms_norm_eps": 1e-06,
37
+ "rope_parameters": {
38
+ "rope_theta": 10000.0,
39
+ "rope_type": "default"
40
+ },
41
+ "tie_word_embeddings": false,
42
+ "use_cache": true,
43
+ "vocab_size": 32002
44
+ },
45
+ "tie_word_embeddings": false,
46
+ "transformers_version": "5.16.0.dev0",
47
+ "vision_config": {
48
+ "attention_dropout": 0.0,
49
+ "hidden_act": "gelu",
50
+ "hidden_size": 32,
51
+ "image_size": 8,
52
+ "initializer_factor": 1.0,
53
+ "initializer_range": 0.02,
54
+ "intermediate_size": 32,
55
+ "layer_norm_eps": 1e-05,
56
+ "model_type": "clip_vision_model",
57
+ "num_attention_heads": 2,
58
+ "num_channels": 3,
59
+ "num_hidden_layers": 2,
60
+ "patch_size": 4,
61
+ "projection_dim": 32
62
+ },
63
+ "vision_feature_layer": -1,
64
+ "vision_feature_select_strategy": "default"
65
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 32001,
8
+ "transformers_version": "5.16.0.dev0",
9
+ "use_cache": true
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c83c940302c962c4f2ac42c2f8c60e4a472da64548b29c25a32b86002b2a5861
3
+ size 8325592
preprocessor_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "longest_edge": 8,
4
+ "shortest_edge": 8
5
+ },
6
+ "do_center_crop": true,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_pad": true,
10
+ "do_rescale": true,
11
+ "do_resize": true,
12
+ "image_grid_pinpoints": [
13
+ [
14
+ 336,
15
+ 672
16
+ ],
17
+ [
18
+ 672,
19
+ 336
20
+ ],
21
+ [
22
+ 672,
23
+ 672
24
+ ],
25
+ [
26
+ 1008,
27
+ 336
28
+ ],
29
+ [
30
+ 336,
31
+ 1008
32
+ ]
33
+ ],
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
+ "resample": 3,
46
+ "rescale_factor": 0.00392156862745098,
47
+ "size": {
48
+ "longest_edge": 8,
49
+ "shortest_edge": 8
50
+ }
51
+ }
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
+ "add_prefix_space": null,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "</s>",
7
+ "image_token": "<image>",
8
+ "is_local": true,
9
+ "legacy": true,
10
+ "local_files_only": false,
11
+ "max_length": null,
12
+ "model_max_length": 1000000000000000019884624838656,
13
+ "model_specific_special_tokens": {
14
+ "image_token": "<image>"
15
+ },
16
+ "pad_to_multiple_of": null,
17
+ "pad_token": "<pad>",
18
+ "pad_token_type_id": 0,
19
+ "padding_side": "left",
20
+ "processor_class": "LlavaNextProcessor",
21
+ "sp_model_kwargs": {},
22
+ "spaces_between_special_tokens": false,
23
+ "tokenizer_class": "TokenizersBackend",
24
+ "unk_token": "<unk>",
25
+ "use_default_system_prompt": false
26
+ }