hf-transformers-bot commited on
Commit
b200b36
·
verified ·
1 Parent(s): 45d9aac

Update tiny models for Lfm2VlModel

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
+ '}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
3
+ '}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
4
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Lfm2VlModel"
4
+ ],
5
+ "downsample_factor": 4,
6
+ "dtype": "float32",
7
+ "image_token_id": 4,
8
+ "model_type": "lfm2_vl",
9
+ "projector_bias": true,
10
+ "projector_hidden_act": "gelu",
11
+ "projector_hidden_size": 32,
12
+ "projector_use_layernorm": true,
13
+ "text_config": {
14
+ "block_auto_adjust_ff_dim": true,
15
+ "block_ffn_dim_multiplier": 1.0,
16
+ "block_multiple_of": 2,
17
+ "bos_token_id": 1,
18
+ "conv_L_cache": 3,
19
+ "conv_bias": false,
20
+ "eos_token_id": 7,
21
+ "full_attn_idxs": [
22
+ 0
23
+ ],
24
+ "hidden_size": 32,
25
+ "initializer_range": 0.02,
26
+ "intermediate_size": 37,
27
+ "layer_types": [
28
+ "full_attention",
29
+ "conv"
30
+ ],
31
+ "max_position_embeddings": 200,
32
+ "model_type": "lfm2",
33
+ "norm_eps": 1e-05,
34
+ "num_attention_heads": 4,
35
+ "num_hidden_layers": 2,
36
+ "num_key_value_heads": 2,
37
+ "pad_token_id": 0,
38
+ "rope_parameters": {
39
+ "rope_theta": 1000000.0,
40
+ "rope_type": "default"
41
+ },
42
+ "tie_word_embeddings": true,
43
+ "use_cache": true,
44
+ "vocab_size": 64400
45
+ },
46
+ "tie_word_embeddings": true,
47
+ "transformers_version": "5.16.0.dev0",
48
+ "vision_config": {
49
+ "attention_dropout": 0.0,
50
+ "hidden_act": "gelu_pytorch_tanh",
51
+ "hidden_size": 32,
52
+ "intermediate_size": 37,
53
+ "layer_norm_eps": 1e-06,
54
+ "model_type": "siglip2_vision_model",
55
+ "num_attention_heads": 2,
56
+ "num_channels": 3,
57
+ "num_hidden_layers": 2,
58
+ "num_patches": 16,
59
+ "patch_size": 4
60
+ }
61
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:599188a1710606d3b8817fa45a30233422882c0cc3d4c882fa971e71c23aeeba
3
+ size 8463612
preprocessor_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_format": "channels_first",
3
+ "default_to_square": true,
4
+ "do_image_splitting": true,
5
+ "do_normalize": true,
6
+ "do_pad": true,
7
+ "do_rescale": true,
8
+ "do_resize": false,
9
+ "downsample_factor": 2,
10
+ "encoder_patch_size": 16,
11
+ "image_mean": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "image_processor_type": "Lfm2VlImageProcessor",
17
+ "image_std": [
18
+ 0.5,
19
+ 0.5,
20
+ 0.5
21
+ ],
22
+ "max_image_tokens": 256,
23
+ "max_num_patches": 1024,
24
+ "max_pixels_tolerance": 2.0,
25
+ "max_tiles": 10,
26
+ "min_image_tokens": 64,
27
+ "min_tiles": 2,
28
+ "patch_size": 16,
29
+ "resample": 3,
30
+ "rescale_factor": 0.00392156862745098,
31
+ "return_row_col_info": true,
32
+ "size": {
33
+ "height": 512,
34
+ "width": 512
35
+ },
36
+ "tile_size": 512,
37
+ "use_thumbnail": true
38
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoProcessor": "processing_lfm2_vl.Lfm2VlProcessor"
4
+ },
5
+ "backend": "tokenizers",
6
+ "bos_token": "<|startoftext|>",
7
+ "clean_up_tokenization_spaces": true,
8
+ "eos_token": "<|im_end|>",
9
+ "image_end_token": "<|image_end|>",
10
+ "image_start_token": "<|image_start|>",
11
+ "image_thumbnail": "<|img_thumbnail|>",
12
+ "image_token": "<image>",
13
+ "is_local": true,
14
+ "legacy": false,
15
+ "local_files_only": false,
16
+ "model_max_length": 1000000000000000019884624838656,
17
+ "model_specific_special_tokens": {
18
+ "image_end_token": "<|image_end|>",
19
+ "image_start_token": "<|image_start|>",
20
+ "image_token": "<image>"
21
+ },
22
+ "pad_token": "<|pad|>",
23
+ "processor_class": "Lfm2VlProcessor",
24
+ "return_token_type_ids": false,
25
+ "sp_model_kwargs": {},
26
+ "spaces_between_special_tokens": false,
27
+ "tokenizer_class": "TokenizersBackend",
28
+ "use_default_system_prompt": false,
29
+ "use_fast": true
30
+ }