Update tiny models for FlavaModel
Browse files- config.json +86 -0
- model.safetensors +3 -0
- preprocessor_config.json +58 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
config.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"FlavaModel"
|
| 4 |
+
],
|
| 5 |
+
"ce_ignore_index": -100,
|
| 6 |
+
"dtype": "float32",
|
| 7 |
+
"global_backprop_contrastive": true,
|
| 8 |
+
"global_contrastive_weight": 1.0,
|
| 9 |
+
"hidden_size": 32,
|
| 10 |
+
"image_codebook_config": {
|
| 11 |
+
"freeze": true,
|
| 12 |
+
"hidden_size": 32,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"input_channels": 3,
|
| 15 |
+
"model_type": "",
|
| 16 |
+
"num_blocks_per_group": 2,
|
| 17 |
+
"num_groups": 2,
|
| 18 |
+
"vocab_size": 99
|
| 19 |
+
},
|
| 20 |
+
"image_config": {
|
| 21 |
+
"attention_probs_dropout_prob": 0.0,
|
| 22 |
+
"hidden_act": "gelu",
|
| 23 |
+
"hidden_dropout_prob": 0.0,
|
| 24 |
+
"hidden_size": 32,
|
| 25 |
+
"image_size": 30,
|
| 26 |
+
"initializer_range": 0.02,
|
| 27 |
+
"intermediate_size": 37,
|
| 28 |
+
"layer_norm_eps": 1e-12,
|
| 29 |
+
"mask_token": true,
|
| 30 |
+
"model_type": "flava_image_model",
|
| 31 |
+
"num_attention_heads": 4,
|
| 32 |
+
"num_channels": 3,
|
| 33 |
+
"num_hidden_layers": 2,
|
| 34 |
+
"patch_size": 2,
|
| 35 |
+
"qkv_bias": true,
|
| 36 |
+
"vocab_size": 99
|
| 37 |
+
},
|
| 38 |
+
"init_codebook": true,
|
| 39 |
+
"initializer_factor": 1.0,
|
| 40 |
+
"initializer_range": 0.02,
|
| 41 |
+
"itm_weight": 1.0,
|
| 42 |
+
"layer_norm_eps": 1e-12,
|
| 43 |
+
"logit_scale_init_value": 2.6592,
|
| 44 |
+
"mim_weight": 1.0,
|
| 45 |
+
"mlm_weight": 1.0,
|
| 46 |
+
"mmm_image_weight": 1.0,
|
| 47 |
+
"mmm_text_weight": 1.0,
|
| 48 |
+
"model_type": "flava",
|
| 49 |
+
"multimodal_config": {
|
| 50 |
+
"attention_probs_dropout_prob": 0.0,
|
| 51 |
+
"ce_ignore_index": -100,
|
| 52 |
+
"hidden_act": "gelu",
|
| 53 |
+
"hidden_dropout_prob": 0.0,
|
| 54 |
+
"hidden_size": 32,
|
| 55 |
+
"initializer_range": 0.02,
|
| 56 |
+
"intermediate_size": 37,
|
| 57 |
+
"layer_norm_eps": 1e-12,
|
| 58 |
+
"model_type": "flava_multimodal_model",
|
| 59 |
+
"num_attention_heads": 4,
|
| 60 |
+
"num_hidden_layers": 2,
|
| 61 |
+
"qkv_bias": true,
|
| 62 |
+
"use_cls_token": true
|
| 63 |
+
},
|
| 64 |
+
"projection_dim": 32,
|
| 65 |
+
"return_loss": true,
|
| 66 |
+
"skip_unmasked_multimodal_encoder": true,
|
| 67 |
+
"text_config": {
|
| 68 |
+
"attention_probs_dropout_prob": 0.0,
|
| 69 |
+
"hidden_act": "gelu",
|
| 70 |
+
"hidden_dropout_prob": 0.0,
|
| 71 |
+
"hidden_size": 32,
|
| 72 |
+
"initializer_range": 0.02,
|
| 73 |
+
"intermediate_size": 37,
|
| 74 |
+
"layer_norm_eps": 1e-12,
|
| 75 |
+
"max_position_embeddings": 512,
|
| 76 |
+
"model_type": "flava_text_model",
|
| 77 |
+
"num_attention_heads": 4,
|
| 78 |
+
"num_hidden_layers": 2,
|
| 79 |
+
"pad_token_id": 0,
|
| 80 |
+
"qkv_bias": true,
|
| 81 |
+
"type_vocab_size": 2,
|
| 82 |
+
"vocab_size": 30522
|
| 83 |
+
},
|
| 84 |
+
"tie_word_embeddings": true,
|
| 85 |
+
"transformers_version": "5.16.0.dev0"
|
| 86 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7f0a55aa8ed252685ceb364b036b27692303cd2b5862f797f04cf8100fcac2a
|
| 3 |
+
size 4211644
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"codebook_crop_size": {
|
| 3 |
+
"height": 112,
|
| 4 |
+
"width": 112
|
| 5 |
+
},
|
| 6 |
+
"codebook_do_center_crop": true,
|
| 7 |
+
"codebook_do_map_pixels": true,
|
| 8 |
+
"codebook_do_normalize": true,
|
| 9 |
+
"codebook_do_rescale": true,
|
| 10 |
+
"codebook_do_resize": true,
|
| 11 |
+
"codebook_image_mean": [
|
| 12 |
+
0.0,
|
| 13 |
+
0.0,
|
| 14 |
+
0.0
|
| 15 |
+
],
|
| 16 |
+
"codebook_image_std": [
|
| 17 |
+
1.0,
|
| 18 |
+
1.0,
|
| 19 |
+
1.0
|
| 20 |
+
],
|
| 21 |
+
"codebook_resample": 1,
|
| 22 |
+
"codebook_rescale_factor": 0.00392156862745098,
|
| 23 |
+
"codebook_size": {
|
| 24 |
+
"height": 112,
|
| 25 |
+
"width": 112
|
| 26 |
+
},
|
| 27 |
+
"crop_size": {
|
| 28 |
+
"height": 224,
|
| 29 |
+
"width": 224
|
| 30 |
+
},
|
| 31 |
+
"do_center_crop": true,
|
| 32 |
+
"do_normalize": true,
|
| 33 |
+
"do_rescale": true,
|
| 34 |
+
"do_resize": true,
|
| 35 |
+
"image_mean": [
|
| 36 |
+
0.48145466,
|
| 37 |
+
0.4578275,
|
| 38 |
+
0.40821073
|
| 39 |
+
],
|
| 40 |
+
"image_processor_type": "FlavaImageProcessor",
|
| 41 |
+
"image_std": [
|
| 42 |
+
0.26862954,
|
| 43 |
+
0.26130258,
|
| 44 |
+
0.27577711
|
| 45 |
+
],
|
| 46 |
+
"input_size_patches": 14,
|
| 47 |
+
"mask_group_min_aspect_ratio": 0.3,
|
| 48 |
+
"mask_group_min_patches": 16,
|
| 49 |
+
"resample": 3,
|
| 50 |
+
"rescale_factor": 0.00392156862745098,
|
| 51 |
+
"return_codebook_pixels": false,
|
| 52 |
+
"return_image_mask": false,
|
| 53 |
+
"size": {
|
| 54 |
+
"height": 224,
|
| 55 |
+
"width": 224
|
| 56 |
+
},
|
| 57 |
+
"total_mask_patches": 75
|
| 58 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": true,
|
| 5 |
+
"is_local": true,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
+
"mask_token": "[MASK]",
|
| 8 |
+
"model_max_length": 512,
|
| 9 |
+
"pad_token": "[PAD]",
|
| 10 |
+
"processor_class": "FlavaProcessor",
|
| 11 |
+
"sep_token": "[SEP]",
|
| 12 |
+
"strip_accents": null,
|
| 13 |
+
"tokenize_chinese_chars": true,
|
| 14 |
+
"tokenizer_class": "BertTokenizer",
|
| 15 |
+
"unk_token": "[UNK]"
|
| 16 |
+
}
|