hf-transformers-bot commited on
Commit
01ff9f4
·
verified ·
1 Parent(s): f241b94

Update tiny models for LlavaForConditionalGeneration

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ {% 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>
2
+ ' }}{% 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 %}
config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlavaForConditionalGeneration"
4
+ ],
5
+ "dtype": "float32",
6
+ "ignore_index": -100,
7
+ "image_seq_length": 16,
8
+ "image_token_index": 0,
9
+ "model_type": "llava",
10
+ "multimodal_projector_bias": true,
11
+ "projector_hidden_act": "gelu",
12
+ "text_config": {
13
+ "attention_bias": false,
14
+ "attention_dropout": 0.0,
15
+ "attention_probs_dropout_prob": 0.1,
16
+ "bos_token_id": 1,
17
+ "eos_token_id": 2,
18
+ "head_dim": 8,
19
+ "hidden_act": "gelu",
20
+ "hidden_dropout_prob": 0.1,
21
+ "hidden_size": 32,
22
+ "id2label": {
23
+ "0": "LABEL_0",
24
+ "1": "LABEL_1",
25
+ "2": "LABEL_2"
26
+ },
27
+ "initializer_range": 0.02,
28
+ "intermediate_size": 37,
29
+ "is_training": true,
30
+ "label2id": {
31
+ "LABEL_0": 0,
32
+ "LABEL_1": 1,
33
+ "LABEL_2": 2
34
+ },
35
+ "max_position_embeddings": 512,
36
+ "mlp_bias": false,
37
+ "model_type": "llama",
38
+ "num_attention_heads": 4,
39
+ "num_choices": 4,
40
+ "num_hidden_layers": 2,
41
+ "num_key_value_heads": 4,
42
+ "pad_token_id": 32001,
43
+ "pretraining_tp": 1,
44
+ "rms_norm_eps": 1e-06,
45
+ "rope_parameters": {
46
+ "rope_theta": 10000.0,
47
+ "rope_type": "default"
48
+ },
49
+ "seq_length": 7,
50
+ "tie_word_embeddings": false,
51
+ "type_sequence_label_size": 2,
52
+ "type_vocab_size": 16,
53
+ "use_cache": true,
54
+ "use_input_mask": true,
55
+ "use_labels": true,
56
+ "use_token_type_ids": false,
57
+ "vocab_size": 32002
58
+ },
59
+ "tie_word_embeddings": false,
60
+ "transformers_version": "5.16.0.dev0",
61
+ "vision_config": {
62
+ "attention_dropout": 0.1,
63
+ "dropout": 0.1,
64
+ "hidden_act": "quick_gelu",
65
+ "hidden_size": 32,
66
+ "image_size": 8,
67
+ "initializer_factor": 1.0,
68
+ "initializer_range": 0.02,
69
+ "intermediate_size": 37,
70
+ "is_training": true,
71
+ "layer_norm_eps": 1e-05,
72
+ "model_type": "clip_vision_model",
73
+ "num_attention_heads": 4,
74
+ "num_channels": 3,
75
+ "num_hidden_layers": 2,
76
+ "patch_size": 2,
77
+ "projection_dim": 32
78
+ },
79
+ "vision_feature_layer": -1,
80
+ "vision_feature_select_strategy": "default"
81
+ }
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:6cc95f2fa982239f5a88240c2b64f00542022479718dd90735d1a7675cfae525
3
+ size 8328760
preprocessor_config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_rescale": true,
10
+ "do_resize": true,
11
+ "image_mean": [
12
+ 0.48145466,
13
+ 0.4578275,
14
+ 0.40821073
15
+ ],
16
+ "image_processor_type": "CLIPImageProcessor",
17
+ "image_std": [
18
+ 0.26862954,
19
+ 0.26130258,
20
+ 0.27577711
21
+ ],
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 8,
26
+ "shortest_edge": 8
27
+ }
28
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": false,
10
+ "local_files_only": false,
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "model_specific_special_tokens": {
13
+ "image_token": "<image>"
14
+ },
15
+ "pad_token": "<pad>",
16
+ "padding_side": "left",
17
+ "processor_class": "LlavaProcessor",
18
+ "sp_model_kwargs": {},
19
+ "tokenizer_class": "TokenizersBackend",
20
+ "unk_token": "<unk>",
21
+ "use_default_system_prompt": false
22
+ }