Image-to-Text
Transformers
Safetensors
English
blip-2
text-generation
video-to-text
video-captioning
image-captioning
visual-question-answering
Instructions to use kpyu/eilev-blip2-flan-t5-xl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kpyu/eilev-blip2-flan-t5-xl with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="kpyu/eilev-blip2-flan-t5-xl")# Load model directly from transformers import AutoProcessor, AutoModelForSeq2SeqLM processor = AutoProcessor.from_pretrained("kpyu/eilev-blip2-flan-t5-xl") model = AutoModelForSeq2SeqLM.from_pretrained("kpyu/eilev-blip2-flan-t5-xl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload VideoBlipForConditionalGeneration
Browse files- config.json +86 -0
- generation_config.json +8 -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,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/nfs/turbo/coe-chaijy/kpyu/eilev-checkpoints/eilev-blip2-flan-t5-xl-ego4d//",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"VideoBlipForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"initializer_factor": 1.0,
|
| 7 |
+
"initializer_range": 0.02,
|
| 8 |
+
"is_encoder_decoder": true,
|
| 9 |
+
"model_type": "blip-2",
|
| 10 |
+
"num_query_tokens": 32,
|
| 11 |
+
"qformer_config": {
|
| 12 |
+
"classifier_dropout": null,
|
| 13 |
+
"model_type": "blip_2_qformer"
|
| 14 |
+
},
|
| 15 |
+
"text_config": {
|
| 16 |
+
"architectures": [
|
| 17 |
+
"T5ForConditionalGeneration"
|
| 18 |
+
],
|
| 19 |
+
"bos_token_id": 1,
|
| 20 |
+
"classifier_dropout": 0.0,
|
| 21 |
+
"d_ff": 5120,
|
| 22 |
+
"d_kv": 64,
|
| 23 |
+
"d_model": 2048,
|
| 24 |
+
"decoder_start_token_id": 0,
|
| 25 |
+
"dense_act_fn": "gelu",
|
| 26 |
+
"dropout_rate": 0.1,
|
| 27 |
+
"eos_token_id": 1,
|
| 28 |
+
"feed_forward_proj": "gated-gelu",
|
| 29 |
+
"initializer_factor": 1.0,
|
| 30 |
+
"is_encoder_decoder": true,
|
| 31 |
+
"is_gated_act": true,
|
| 32 |
+
"layer_norm_epsilon": 1e-06,
|
| 33 |
+
"model_type": "t5",
|
| 34 |
+
"n_positions": 512,
|
| 35 |
+
"num_decoder_layers": 24,
|
| 36 |
+
"num_heads": 32,
|
| 37 |
+
"num_layers": 24,
|
| 38 |
+
"output_past": true,
|
| 39 |
+
"pad_token_id": 0,
|
| 40 |
+
"relative_attention_max_distance": 128,
|
| 41 |
+
"relative_attention_num_buckets": 32,
|
| 42 |
+
"task_specific_params": {
|
| 43 |
+
"summarization": {
|
| 44 |
+
"early_stopping": true,
|
| 45 |
+
"length_penalty": 2.0,
|
| 46 |
+
"max_length": 200,
|
| 47 |
+
"min_length": 30,
|
| 48 |
+
"no_repeat_ngram_size": 3,
|
| 49 |
+
"num_beams": 4,
|
| 50 |
+
"prefix": "summarize: "
|
| 51 |
+
},
|
| 52 |
+
"translation_en_to_de": {
|
| 53 |
+
"early_stopping": true,
|
| 54 |
+
"max_length": 300,
|
| 55 |
+
"num_beams": 4,
|
| 56 |
+
"prefix": "translate English to German: "
|
| 57 |
+
},
|
| 58 |
+
"translation_en_to_fr": {
|
| 59 |
+
"early_stopping": true,
|
| 60 |
+
"max_length": 300,
|
| 61 |
+
"num_beams": 4,
|
| 62 |
+
"prefix": "translate English to French: "
|
| 63 |
+
},
|
| 64 |
+
"translation_en_to_ro": {
|
| 65 |
+
"early_stopping": true,
|
| 66 |
+
"max_length": 300,
|
| 67 |
+
"num_beams": 4,
|
| 68 |
+
"prefix": "translate English to Romanian: "
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
"tie_word_embeddings": false,
|
| 72 |
+
"torch_dtype": "float32",
|
| 73 |
+
"vocab_size": 32128
|
| 74 |
+
},
|
| 75 |
+
"tie_word_embeddings": false,
|
| 76 |
+
"torch_dtype": "float32",
|
| 77 |
+
"transformers_version": "4.35.2",
|
| 78 |
+
"use_decoder_only_language_model": false,
|
| 79 |
+
"vision_config": {
|
| 80 |
+
"dropout": 0.0,
|
| 81 |
+
"initializer_factor": 1.0,
|
| 82 |
+
"model_type": "blip_2_vision_model",
|
| 83 |
+
"num_channels": 3,
|
| 84 |
+
"projection_dim": 512
|
| 85 |
+
}
|
| 86 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"decoder_start_token_id": 0,
|
| 5 |
+
"eos_token_id": 1,
|
| 6 |
+
"pad_token_id": 0,
|
| 7 |
+
"transformers_version": "4.35.2"
|
| 8 |
+
}
|
model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a124f8de3561f00b86f8dfc17f67324e097357ca3ed13660f8a192dbb613862
|
| 3 |
+
size 4978004864
|
model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:595ca8cb3f7c24a22343bf7a2047d469624f06b34cd0dab84e42d4ad7e7c1ad3
|
| 3 |
+
size 4983312888
|
model-00003-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efb4139e3b8d4b5e620d3756c0850516f4d72d6d9fa78476e1f4d52c473a01ad
|
| 3 |
+
size 4983337064
|
model-00004-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1ed407a0f17dbe6e345f65feb1a29095ee2e33d6e5096756186aae0fbd8bb58
|
| 3 |
+
size 825299208
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|