Update tiny models for Blip2ForImageTextRetrieval
Browse files- config.json +81 -0
- model.safetensors +3 -0
- preprocessor_config.json +27 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
config.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Blip2ForImageTextRetrieval"
|
| 4 |
+
],
|
| 5 |
+
"dtype": "float32",
|
| 6 |
+
"image_text_hidden_size": 256,
|
| 7 |
+
"image_token_index": 4,
|
| 8 |
+
"initializer_factor": 1.0,
|
| 9 |
+
"initializer_range": 0.02,
|
| 10 |
+
"is_encoder_decoder": true,
|
| 11 |
+
"model_type": "blip-2",
|
| 12 |
+
"num_query_tokens": 10,
|
| 13 |
+
"qformer_config": {
|
| 14 |
+
"attention_dropout": 0.1,
|
| 15 |
+
"attention_probs_dropout_prob": 0.1,
|
| 16 |
+
"bos_token_id": 0,
|
| 17 |
+
"cross_attention_frequency": 2,
|
| 18 |
+
"dropout": 0.1,
|
| 19 |
+
"encoder_hidden_size": 32,
|
| 20 |
+
"hidden_act": "gelu",
|
| 21 |
+
"hidden_dropout_prob": 0.1,
|
| 22 |
+
"hidden_size": 32,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 37,
|
| 25 |
+
"layer_norm_eps": 1e-12,
|
| 26 |
+
"max_position_embeddings": 512,
|
| 27 |
+
"model_type": "blip_2_qformer",
|
| 28 |
+
"num_attention_heads": 4,
|
| 29 |
+
"num_hidden_layers": 2,
|
| 30 |
+
"pad_token_id": 0,
|
| 31 |
+
"projection_dim": 32,
|
| 32 |
+
"use_qformer_text_input": false,
|
| 33 |
+
"vocab_size": 99
|
| 34 |
+
},
|
| 35 |
+
"text_config": {
|
| 36 |
+
"bos_token_id": 2,
|
| 37 |
+
"classifier_dropout": 0.0,
|
| 38 |
+
"d_ff": 37,
|
| 39 |
+
"d_kv": 8,
|
| 40 |
+
"d_model": 32,
|
| 41 |
+
"decoder_start_token_id": 0,
|
| 42 |
+
"dense_act_fn": "relu",
|
| 43 |
+
"dropout_rate": 0.1,
|
| 44 |
+
"eos_token_id": 2,
|
| 45 |
+
"feed_forward_proj": "relu",
|
| 46 |
+
"initializer_factor": 0.002,
|
| 47 |
+
"is_decoder": false,
|
| 48 |
+
"is_gated_act": false,
|
| 49 |
+
"layer_norm_epsilon": 1e-06,
|
| 50 |
+
"model_type": "t5",
|
| 51 |
+
"num_decoder_layers": 2,
|
| 52 |
+
"num_heads": 4,
|
| 53 |
+
"num_layers": 2,
|
| 54 |
+
"pad_token_id": 1,
|
| 55 |
+
"relative_attention_max_distance": 128,
|
| 56 |
+
"relative_attention_num_buckets": 8,
|
| 57 |
+
"scale_decoder_outputs": true,
|
| 58 |
+
"tie_word_embeddings": true,
|
| 59 |
+
"use_cache": true,
|
| 60 |
+
"vocab_size": 50266
|
| 61 |
+
},
|
| 62 |
+
"transformers_version": "5.16.0.dev0",
|
| 63 |
+
"use_decoder_only_language_model": false,
|
| 64 |
+
"vision_config": {
|
| 65 |
+
"attention_dropout": 0.1,
|
| 66 |
+
"dropout": 0.1,
|
| 67 |
+
"hidden_act": "gelu",
|
| 68 |
+
"hidden_size": 32,
|
| 69 |
+
"image_size": 30,
|
| 70 |
+
"initializer_range": 1e-10,
|
| 71 |
+
"intermediate_size": 37,
|
| 72 |
+
"layer_norm_eps": 1e-06,
|
| 73 |
+
"model_type": "blip_2_vision_model",
|
| 74 |
+
"num_attention_heads": 4,
|
| 75 |
+
"num_channels": 3,
|
| 76 |
+
"num_hidden_layers": 2,
|
| 77 |
+
"patch_size": 2,
|
| 78 |
+
"projection_dim": 32,
|
| 79 |
+
"qkv_bias": true
|
| 80 |
+
}
|
| 81 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b25aa7e42ea74fa552e815045d07020040b4f9a952136ffc39cde9a354714a5
|
| 3 |
+
size 313600
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 30,
|
| 4 |
+
"width": 30
|
| 5 |
+
},
|
| 6 |
+
"do_convert_rgb": true,
|
| 7 |
+
"do_normalize": true,
|
| 8 |
+
"do_rescale": true,
|
| 9 |
+
"do_resize": true,
|
| 10 |
+
"image_mean": [
|
| 11 |
+
0.48145466,
|
| 12 |
+
0.4578275,
|
| 13 |
+
0.40821073
|
| 14 |
+
],
|
| 15 |
+
"image_processor_type": "BlipImageProcessor",
|
| 16 |
+
"image_std": [
|
| 17 |
+
0.26862954,
|
| 18 |
+
0.26130258,
|
| 19 |
+
0.27577711
|
| 20 |
+
],
|
| 21 |
+
"resample": 3,
|
| 22 |
+
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"size": {
|
| 24 |
+
"height": 30,
|
| 25 |
+
"width": 30
|
| 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,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "</s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": true,
|
| 9 |
+
"local_files_only": false,
|
| 10 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 11 |
+
"pad_token": "<pad>",
|
| 12 |
+
"processor_class": "Blip2Processor",
|
| 13 |
+
"tokenizer_class": "TokenizersBackend",
|
| 14 |
+
"unk_token": "</s>"
|
| 15 |
+
}
|