hf-transformers-bot commited on
Commit
d61830e
·
verified ·
1 Parent(s): 228fca6

Update tiny models for Ovis2ForConditionalGeneration

Browse files
.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,7 @@
 
 
 
 
 
 
 
 
1
+ <|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ {% for message in messages %}{{'<|im_start|>' + message['role'] + '
4
+ '}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>
5
+ ' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
6
+ '}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
7
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Ovis2ForConditionalGeneration"
4
+ ],
5
+ "dtype": "float32",
6
+ "hidden_size": 64,
7
+ "image_token_id": 1,
8
+ "model_type": "ovis2",
9
+ "text_config": {
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": null,
12
+ "eos_token_id": null,
13
+ "hidden_act": "gelu",
14
+ "hidden_size": 64,
15
+ "id2label": {
16
+ "0": "LABEL_0",
17
+ "1": "LABEL_1",
18
+ "2": "LABEL_2"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 54,
22
+ "is_training": true,
23
+ "label2id": {
24
+ "LABEL_0": 0,
25
+ "LABEL_1": 1,
26
+ "LABEL_2": 2
27
+ },
28
+ "layer_types": [
29
+ "full_attention",
30
+ "full_attention"
31
+ ],
32
+ "max_position_embeddings": 580,
33
+ "max_window_layers": 28,
34
+ "model_type": "qwen2",
35
+ "num_attention_heads": 4,
36
+ "num_hidden_layers": 2,
37
+ "num_key_value_heads": 4,
38
+ "pad_token_id": 151643,
39
+ "rms_norm_eps": 1e-06,
40
+ "rope_parameters": {
41
+ "rope_theta": 10000.0,
42
+ "rope_type": "default"
43
+ },
44
+ "seq_length": 7,
45
+ "sliding_window": null,
46
+ "tie_word_embeddings": false,
47
+ "use_cache": true,
48
+ "use_labels": true,
49
+ "use_sliding_window": false,
50
+ "vocab_size": 151671
51
+ },
52
+ "tie_word_embeddings": true,
53
+ "transformers_version": "5.16.0.dev0",
54
+ "vision_config": {
55
+ "attention_dropout": 0.0,
56
+ "hidden_act": "silu",
57
+ "hidden_size": 64,
58
+ "hidden_stride": 2,
59
+ "image_size": 32,
60
+ "initializer_range": 0.02,
61
+ "intermediate_size": 54,
62
+ "mlp_bias": false,
63
+ "model_type": "",
64
+ "num_attention_heads": 4,
65
+ "num_channels": 3,
66
+ "num_hidden_layers": 2,
67
+ "num_visual_indicator_tokens": 5,
68
+ "patch_size": 8,
69
+ "qkv_bias": false,
70
+ "rms_norm_eps": 1e-05,
71
+ "tokenize_function": "softmax",
72
+ "vocab_size": 99
73
+ },
74
+ "visual_indicator_token_ids": [],
75
+ "vocab_size": 151671
76
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "output_attentions": false,
4
+ "output_hidden_states": false,
5
+ "pad_token_id": 151643,
6
+ "transformers_version": "5.16.0.dev0",
7
+ "use_cache": true
8
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5604d1d18984658a6972796af749b6459623b7cc4c4e01766ee5abc5a1d4e310
3
+ size 39442704
preprocessor_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": 32,
4
+ "width": 32
5
+ },
6
+ "crop_to_patches": false,
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": "Ovis2ImageProcessor",
17
+ "image_std": [
18
+ 0.26862954,
19
+ 0.26130258,
20
+ 0.27577711
21
+ ],
22
+ "max_patches": 12,
23
+ "min_patches": 1,
24
+ "resample": 3,
25
+ "rescale_factor": 0.00392156862745098,
26
+ "size": {
27
+ "height": 32,
28
+ "width": 32
29
+ },
30
+ "use_covering_area_grid": true
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d6666d1c488a64e647514459cb18bab3f80ce5b9b30d3c1d5c53bb06401b4c8
3
+ size 11423012
tokenizer_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "<IMG_ATOM>",
10
+ "<IMG_START>",
11
+ "<IMG_GRID>",
12
+ "<IMG_COL>",
13
+ "<IMG_ROW>",
14
+ "<IMG_END>"
15
+ ],
16
+ "is_local": true,
17
+ "local_files_only": false,
18
+ "model_max_length": 32768,
19
+ "pad_token": "<|endoftext|>",
20
+ "processor_class": "Ovis2Processor",
21
+ "return_token_type_ids": false,
22
+ "split_special_tokens": false,
23
+ "tokenizer_class": "Qwen2Tokenizer",
24
+ "unk_token": null
25
+ }