Update tiny models for ColModernVBertForRetrieval
Browse files- chat_template.jinja +2 -0
- config.json +122 -0
- model.safetensors +3 -0
- preprocessor_config.json +27 -0
- tokenizer.json +0 -0
- tokenizer_config.json +26 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<|begin_of_text|>{% 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,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ColModernVBertForRetrieval"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"embedding_dim": 64,
|
| 7 |
+
"initializer_range": 0.02,
|
| 8 |
+
"model_type": "colmodernvbert",
|
| 9 |
+
"transformers_version": "5.16.0.dev0",
|
| 10 |
+
"vlm_config": {
|
| 11 |
+
"classifier_bias": false,
|
| 12 |
+
"classifier_dropout": 0.0,
|
| 13 |
+
"classifier_pooling": "cls",
|
| 14 |
+
"image_token_id": 98,
|
| 15 |
+
"initializer_cutoff_factor": 2.0,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"model_type": "modernvbert",
|
| 18 |
+
"pixel_shuffle_factor": 2,
|
| 19 |
+
"text_config": {
|
| 20 |
+
"_name_or_path": "",
|
| 21 |
+
"architectures": null,
|
| 22 |
+
"attention_bias": false,
|
| 23 |
+
"attention_dropout": 0.0,
|
| 24 |
+
"bos_token_id": 50281,
|
| 25 |
+
"chunk_size_feed_forward": 0,
|
| 26 |
+
"classifier_activation": "gelu",
|
| 27 |
+
"classifier_bias": false,
|
| 28 |
+
"classifier_dropout": 0.1,
|
| 29 |
+
"classifier_pooling": "cls",
|
| 30 |
+
"cls_token_id": 50281,
|
| 31 |
+
"decoder_bias": true,
|
| 32 |
+
"deterministic_flash_attn": false,
|
| 33 |
+
"dtype": null,
|
| 34 |
+
"embedding_dropout": 0.1,
|
| 35 |
+
"eos_token_id": 50282,
|
| 36 |
+
"hidden_activation": "gelu",
|
| 37 |
+
"hidden_size": 32,
|
| 38 |
+
"id2label": {
|
| 39 |
+
"0": "LABEL_0",
|
| 40 |
+
"1": "LABEL_1"
|
| 41 |
+
},
|
| 42 |
+
"initializer_cutoff_factor": 2.0,
|
| 43 |
+
"initializer_range": 0.02,
|
| 44 |
+
"intermediate_size": 64,
|
| 45 |
+
"is_decoder": false,
|
| 46 |
+
"is_encoder_decoder": false,
|
| 47 |
+
"label2id": {
|
| 48 |
+
"LABEL_0": 0,
|
| 49 |
+
"LABEL_1": 1
|
| 50 |
+
},
|
| 51 |
+
"layer_types": [
|
| 52 |
+
"full_attention",
|
| 53 |
+
"sliding_attention"
|
| 54 |
+
],
|
| 55 |
+
"local_attention": 128,
|
| 56 |
+
"max_position_embeddings": 512,
|
| 57 |
+
"mlp_bias": false,
|
| 58 |
+
"mlp_dropout": 0.1,
|
| 59 |
+
"model_type": "modernbert",
|
| 60 |
+
"norm_bias": false,
|
| 61 |
+
"norm_eps": 1e-05,
|
| 62 |
+
"num_attention_heads": 2,
|
| 63 |
+
"num_hidden_layers": 2,
|
| 64 |
+
"output_attentions": false,
|
| 65 |
+
"output_hidden_states": false,
|
| 66 |
+
"pad_token_id": 0,
|
| 67 |
+
"problem_type": null,
|
| 68 |
+
"return_dict": true,
|
| 69 |
+
"rope_parameters": {
|
| 70 |
+
"full_attention": {
|
| 71 |
+
"rope_theta": 160000.0,
|
| 72 |
+
"rope_type": "default"
|
| 73 |
+
},
|
| 74 |
+
"sliding_attention": {
|
| 75 |
+
"rope_theta": 10000.0,
|
| 76 |
+
"rope_type": "default"
|
| 77 |
+
}
|
| 78 |
+
},
|
| 79 |
+
"sep_token_id": 50282,
|
| 80 |
+
"sparse_pred_ignore_index": -100,
|
| 81 |
+
"sparse_prediction": false,
|
| 82 |
+
"tie_word_embeddings": true,
|
| 83 |
+
"type_vocab_size": 2,
|
| 84 |
+
"vocab_size": 99
|
| 85 |
+
},
|
| 86 |
+
"tie_word_embeddings": false,
|
| 87 |
+
"vision_config": {
|
| 88 |
+
"_name_or_path": "",
|
| 89 |
+
"architectures": null,
|
| 90 |
+
"attention_dropout": 0.1,
|
| 91 |
+
"chunk_size_feed_forward": 0,
|
| 92 |
+
"dropout": 0.1,
|
| 93 |
+
"dtype": null,
|
| 94 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 95 |
+
"hidden_size": 64,
|
| 96 |
+
"id2label": {
|
| 97 |
+
"0": "LABEL_0",
|
| 98 |
+
"1": "LABEL_1"
|
| 99 |
+
},
|
| 100 |
+
"image_size": 16,
|
| 101 |
+
"initializer_range": 0.02,
|
| 102 |
+
"intermediate_size": 32,
|
| 103 |
+
"is_encoder_decoder": false,
|
| 104 |
+
"label2id": {
|
| 105 |
+
"LABEL_0": 0,
|
| 106 |
+
"LABEL_1": 1
|
| 107 |
+
},
|
| 108 |
+
"layer_norm_eps": 1e-06,
|
| 109 |
+
"model_type": "siglip_vision_model",
|
| 110 |
+
"num_attention_heads": 4,
|
| 111 |
+
"num_channels": 3,
|
| 112 |
+
"num_hidden_layers": 2,
|
| 113 |
+
"output_attentions": false,
|
| 114 |
+
"output_hidden_states": false,
|
| 115 |
+
"patch_size": 4,
|
| 116 |
+
"problem_type": null,
|
| 117 |
+
"return_dict": true,
|
| 118 |
+
"vision_use_head": false
|
| 119 |
+
},
|
| 120 |
+
"vocab_size": 99
|
| 121 |
+
}
|
| 122 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51d71c8c1139ed2b5c184372e67b30ad3d561a8341dac34ac79b5569f6319540
|
| 3 |
+
size 328336
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_image_splitting": true,
|
| 4 |
+
"do_normalize": true,
|
| 5 |
+
"do_pad": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_processor_type": "Idefics3ImageProcessor",
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"max_image_size": {
|
| 20 |
+
"longest_edge": 512
|
| 21 |
+
},
|
| 22 |
+
"resample": 1,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"longest_edge": 2048
|
| 26 |
+
}
|
| 27 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"extra_special_tokens": [
|
| 6 |
+
"<fake_token_around_image>",
|
| 7 |
+
"<image>",
|
| 8 |
+
"<end_of_utterance>"
|
| 9 |
+
],
|
| 10 |
+
"is_local": true,
|
| 11 |
+
"legacy": false,
|
| 12 |
+
"local_files_only": false,
|
| 13 |
+
"mask_token": "[MASK]",
|
| 14 |
+
"model_input_names": [
|
| 15 |
+
"input_ids",
|
| 16 |
+
"attention_mask",
|
| 17 |
+
"pixel_values",
|
| 18 |
+
"pixel_attention_mask"
|
| 19 |
+
],
|
| 20 |
+
"model_max_length": 8192,
|
| 21 |
+
"pad_token": "[PAD]",
|
| 22 |
+
"processor_class": "ColModernVBertProcessor",
|
| 23 |
+
"sep_token": "[SEP]",
|
| 24 |
+
"tokenizer_class": "TokenizersBackend",
|
| 25 |
+
"unk_token": "[UNK]"
|
| 26 |
+
}
|