hf-transformers-bot HF Staff commited on
Commit
cb5d884
·
verified ·
1 Parent(s): 9c100bb

Update tiny models for SmolVLMVisionTransformer

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ <|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>
2
+ {% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}
config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "SmolVLMVisionTransformer"
4
+ ],
5
+ "attention_dropout": 0.1,
6
+ "dropout": 0.1,
7
+ "dtype": "float32",
8
+ "hidden_act": "gelu_pytorch_tanh",
9
+ "hidden_size": 32,
10
+ "image_size": 16,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 32,
13
+ "layer_norm_eps": 1e-06,
14
+ "model_type": "smolvlm_vision",
15
+ "num_attention_heads": 4,
16
+ "num_channels": 3,
17
+ "num_hidden_layers": 2,
18
+ "patch_size": 4,
19
+ "transformers_version": "5.16.0.dev0"
20
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a7719a1e84f06c5f9d34c114f4d7a94ce24260ebb19adf1059abe8852a82511
3
+ size 63896
preprocessor_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "longest_edge": 16,
4
+ "shortest_edge": 16
5
+ },
6
+ "do_convert_rgb": true,
7
+ "do_image_splitting": true,
8
+ "do_normalize": true,
9
+ "do_pad": true,
10
+ "do_rescale": true,
11
+ "do_resize": true,
12
+ "image_mean": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "image_processor_type": "SmolVLMImageProcessor",
18
+ "image_std": [
19
+ 0.5,
20
+ 0.5,
21
+ 0.5
22
+ ],
23
+ "max_image_size": {
24
+ "longest_edge": 364
25
+ },
26
+ "resample": 1,
27
+ "rescale_factor": 0.00392156862745098,
28
+ "size": {
29
+ "longest_edge": 16,
30
+ "shortest_edge": 16
31
+ }
32
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|im_start|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "end_of_utterance_token": "<end_of_utterance>",
7
+ "eos_token": "<end_of_utterance>",
8
+ "fake_image_token": "<fake_token_around_image>",
9
+ "global_image_token": "<global-img>",
10
+ "image_token": "<image>",
11
+ "is_local": true,
12
+ "legacy": false,
13
+ "local_files_only": false,
14
+ "model_max_length": 16384,
15
+ "model_specific_special_tokens": {
16
+ "end_of_utterance_token": "<end_of_utterance>",
17
+ "fake_image_token": "<fake_token_around_image>",
18
+ "global_image_token": "<global-img>",
19
+ "image_token": "<image>"
20
+ },
21
+ "pad_token": "<|im_end|>",
22
+ "processor_class": "SmolVLMProcessor",
23
+ "tokenizer_class": "TokenizersBackend",
24
+ "truncation_side": "left",
25
+ "unk_token": "<|endoftext|>",
26
+ "vocab_size": 49152
27
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "longest_edge": 16,
4
+ "shortest_edge": 16
5
+ },
6
+ "do_convert_rgb": true,
7
+ "do_normalize": true,
8
+ "do_pad": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "do_sample_frames": false,
12
+ "image_mean": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "image_std": [
18
+ 0.5,
19
+ 0.5,
20
+ 0.5
21
+ ],
22
+ "max_image_size": {
23
+ "longest_edge": 364
24
+ },
25
+ "resample": 1,
26
+ "rescale_factor": 0.00392156862745098,
27
+ "return_metadata": false,
28
+ "size": {
29
+ "longest_edge": 16,
30
+ "shortest_edge": 16
31
+ },
32
+ "video_processor_type": "SmolVLMVideoProcessor"
33
+ }