Upload Blip2ForConditionalGeneration
Browse files- config.json +83 -0
- generation_config.json +7 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Blip2ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"image_text_hidden_size": 256,
|
| 6 |
+
"image_token_index": 50265,
|
| 7 |
+
"initializer_factor": 1.0,
|
| 8 |
+
"initializer_range": 0.02,
|
| 9 |
+
"model_type": "blip-2",
|
| 10 |
+
"num_query_tokens": 32,
|
| 11 |
+
"qformer_config": {
|
| 12 |
+
"_attn_implementation_autoset": true,
|
| 13 |
+
"attention_probs_dropout_prob": 0.1,
|
| 14 |
+
"classifier_dropout": null,
|
| 15 |
+
"cross_attention_frequency": 2,
|
| 16 |
+
"encoder_hidden_size": 1408,
|
| 17 |
+
"hidden_act": "gelu",
|
| 18 |
+
"hidden_dropout_prob": 0.1,
|
| 19 |
+
"hidden_size": 768,
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 3072,
|
| 22 |
+
"layer_norm_eps": 1e-12,
|
| 23 |
+
"max_position_embeddings": 512,
|
| 24 |
+
"model_type": "blip_2_qformer",
|
| 25 |
+
"num_attention_heads": 12,
|
| 26 |
+
"num_hidden_layers": 12,
|
| 27 |
+
"position_embedding_type": "absolute",
|
| 28 |
+
"torch_dtype": "float32",
|
| 29 |
+
"use_qformer_text_input": false,
|
| 30 |
+
"vocab_size": 30522
|
| 31 |
+
},
|
| 32 |
+
"text_config": {
|
| 33 |
+
"_name_or_path": "facebook/opt-2.7b",
|
| 34 |
+
"_remove_final_layer_norm": false,
|
| 35 |
+
"activation_dropout": 0.0,
|
| 36 |
+
"activation_function": "relu",
|
| 37 |
+
"architectures": [
|
| 38 |
+
"OPTForCausalLM"
|
| 39 |
+
],
|
| 40 |
+
"attention_dropout": 0.0,
|
| 41 |
+
"do_layer_norm_before": true,
|
| 42 |
+
"dropout": 0.1,
|
| 43 |
+
"enable_bias": true,
|
| 44 |
+
"eos_token_id": 50118,
|
| 45 |
+
"ffn_dim": 10240,
|
| 46 |
+
"hidden_size": 2560,
|
| 47 |
+
"init_std": 0.02,
|
| 48 |
+
"layer_norm_elementwise_affine": true,
|
| 49 |
+
"layerdrop": 0.0,
|
| 50 |
+
"max_position_embeddings": 2048,
|
| 51 |
+
"model_type": "opt",
|
| 52 |
+
"num_attention_heads": 32,
|
| 53 |
+
"num_hidden_layers": 32,
|
| 54 |
+
"prefix": "</s>",
|
| 55 |
+
"torch_dtype": "float32",
|
| 56 |
+
"use_cache": true,
|
| 57 |
+
"vocab_size": 50304,
|
| 58 |
+
"word_embed_proj_dim": 2560
|
| 59 |
+
},
|
| 60 |
+
"torch_dtype": "float32",
|
| 61 |
+
"transformers_version": "4.50.2",
|
| 62 |
+
"use_decoder_only_language_model": true,
|
| 63 |
+
"vision_config": {
|
| 64 |
+
"_attn_implementation_autoset": true,
|
| 65 |
+
"attention_dropout": 0.0,
|
| 66 |
+
"dropout": 0.0,
|
| 67 |
+
"hidden_act": "gelu",
|
| 68 |
+
"hidden_size": 1408,
|
| 69 |
+
"image_size": 224,
|
| 70 |
+
"initializer_factor": 1.0,
|
| 71 |
+
"initializer_range": 1e-10,
|
| 72 |
+
"intermediate_size": 6144,
|
| 73 |
+
"layer_norm_eps": 1e-06,
|
| 74 |
+
"model_type": "blip_2_vision_model",
|
| 75 |
+
"num_attention_heads": 16,
|
| 76 |
+
"num_channels": 3,
|
| 77 |
+
"num_hidden_layers": 39,
|
| 78 |
+
"patch_size": 14,
|
| 79 |
+
"projection_dim": 512,
|
| 80 |
+
"qkv_bias": true,
|
| 81 |
+
"torch_dtype": "float32"
|
| 82 |
+
}
|
| 83 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 2,
|
| 4 |
+
"eos_token_id": 50118,
|
| 5 |
+
"pad_token_id": 1,
|
| 6 |
+
"transformers_version": "4.50.2"
|
| 7 |
+
}
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38aa75f22420ffaa3847f7d24d0868d07f32c02dbbee7f2c1f9b45b2302f0e5d
|
| 3 |
+
size 4987223832
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26158be058c49ebb3a7600e6369a75913f951dd96d211c3df092e3f03cd78165
|
| 3 |
+
size 4982878872
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5afa9d90006d2e4ecd5782b5ad4cb512bd2f0fe6ffffdc93ca854e7c89e807d1
|
| 3 |
+
size 4904215096
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad206eff0b7d28eeab88280f34eeb9b899c2217c8f26f3addec2a11181820e90
|
| 3 |
+
size 104888856
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|