albertvillanova HF Staff commited on
Commit
268e044
·
verified ·
1 Parent(s): 87d4ff4

Upload SmolVLMForConditionalGeneration

Browse files
chat_template.jinja CHANGED
@@ -1,2 +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 %}
 
1
+ <|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'] is string %}{{': ' + message['content']}}{% else %}{% 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 %}{% endif %}<end_of_utterance>
2
  {% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}
config.json CHANGED
@@ -21,7 +21,6 @@
21
  "hidden_size": 16,
22
  "initializer_range": 0.02,
23
  "intermediate_size": 8192,
24
- "layer_types": null,
25
  "max_position_embeddings": 8192,
26
  "mlp_bias": false,
27
  "model_type": "llama",
@@ -120,12 +119,11 @@
120
  "vocab_size": 49280
121
  },
122
  "tie_word_embeddings": false,
123
- "transformers_version": "4.57.3",
124
  "use_cache": false,
125
  "use_reentrant_checkpointing": false,
126
  "vision_config": {
127
  "attention_dropout": 0.0,
128
- "embed_dim": 64,
129
  "hidden_act": "gelu_pytorch_tanh",
130
  "hidden_size": 16,
131
  "image_size": 384,
@@ -136,10 +134,9 @@
136
  "longest_edge": 384
137
  },
138
  "model_type": "smolvlm_vision",
139
- "num_attention_heads": 4,
140
  "num_channels": 3,
141
  "num_hidden_layers": 2,
142
- "num_key_value_heads": 2,
143
  "patch_size": 14,
144
  "size": {
145
  "longest_edge": 1920
 
21
  "hidden_size": 16,
22
  "initializer_range": 0.02,
23
  "intermediate_size": 8192,
 
24
  "max_position_embeddings": 8192,
25
  "mlp_bias": false,
26
  "model_type": "llama",
 
119
  "vocab_size": 49280
120
  },
121
  "tie_word_embeddings": false,
122
+ "transformers_version": "4.56.2",
123
  "use_cache": false,
124
  "use_reentrant_checkpointing": false,
125
  "vision_config": {
126
  "attention_dropout": 0.0,
 
127
  "hidden_act": "gelu_pytorch_tanh",
128
  "hidden_size": 16,
129
  "image_size": 384,
 
134
  "longest_edge": 384
135
  },
136
  "model_type": "smolvlm_vision",
137
+ "num_attention_heads": 2,
138
  "num_channels": 3,
139
  "num_hidden_layers": 2,
 
140
  "patch_size": 14,
141
  "size": {
142
  "longest_edge": 1920
generation_config.json CHANGED
@@ -3,5 +3,5 @@
3
  "bos_token_id": 0,
4
  "eos_token_id": 49279,
5
  "pad_token_id": 2,
6
- "transformers_version": "4.57.3"
7
  }
 
3
  "bos_token_id": 0,
4
  "eos_token_id": 49279,
5
  "pad_token_id": 2,
6
+ "transformers_version": "4.56.2"
7
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:26d2b8159d50722e9e1853640f497d1a27460ad56f482a73f277222d16f379ef
3
  size 10798536
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31a447c9d8c529b4fff16dc9e983a8cfbc1e435b6ed1203a13b094b9431f0193
3
  size 10798536
tokenizer.json CHANGED
@@ -1,7 +1,14 @@
1
  {
2
  "version": "1.0",
3
  "truncation": null,
4
- "padding": null,
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
1
  {
2
  "version": "1.0",
3
  "truncation": null,
4
+ "padding": {
5
+ "strategy": "BatchLongest",
6
+ "direction": "Right",
7
+ "pad_to_multiple_of": null,
8
+ "pad_id": 2,
9
+ "pad_type_id": 0,
10
+ "pad_token": "<|im_end|>"
11
+ },
12
  "added_tokens": [
13
  {
14
  "id": 0,
video_preprocessor_config.json CHANGED
@@ -28,7 +28,6 @@
28
  "longest_edge": 384
29
  },
30
  "num_frames": 64,
31
- "pad_size": null,
32
  "processor_class": "SmolVLMProcessor",
33
  "resample": 1,
34
  "rescale_factor": 0.00392156862745098,
@@ -36,6 +35,7 @@
36
  "size": {
37
  "longest_edge": 1536
38
  },
 
39
  "video_metadata": null,
40
  "video_processor_type": "SmolVLMVideoProcessor",
41
  "video_sampling": {
 
28
  "longest_edge": 384
29
  },
30
  "num_frames": 64,
 
31
  "processor_class": "SmolVLMProcessor",
32
  "resample": 1,
33
  "rescale_factor": 0.00392156862745098,
 
35
  "size": {
36
  "longest_edge": 1536
37
  },
38
+ "size_divisor": null,
39
  "video_metadata": null,
40
  "video_processor_type": "SmolVLMVideoProcessor",
41
  "video_sampling": {