sarang-shrivastava nielsr HF staff commited on
Commit
8c66032
0 Parent(s):

Duplicate from Salesforce/blip2-flan-t5-xl

Browse files

Co-authored-by: Niels Rogge <[email protected]>

.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - vision
6
+ - image-to-text
7
+ - image-captioning
8
+ - visual-question-answering
9
+ pipeline_tag: image-to-text
10
+ inference: false
11
+ duplicated_from: Salesforce/blip2-flan-t5-xl
12
+ ---
13
+
14
+ # BLIP-2, Flan T5-xl, pre-trained only
15
+
16
+ BLIP-2 model, leveraging [Flan T5-xl](https://huggingface.co/google/flan-t5-xl) (a large language model).
17
+ It was introduced in the paper [BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models](https://arxiv.org/abs/2301.12597) by Li et al. and first released in [this repository](https://github.com/salesforce/LAVIS/tree/main/projects/blip2).
18
+
19
+ Disclaimer: The team releasing BLIP-2 did not write a model card for this model so this model card has been written by the Hugging Face team.
20
+
21
+ ## Model description
22
+
23
+ BLIP-2 consists of 3 models: a CLIP-like image encoder, a Querying Transformer (Q-Former) and a large language model.
24
+
25
+ The authors initialize the weights of the image encoder and large language model from pre-trained checkpoints and keep them frozen
26
+ while training the Querying Transformer, which is a BERT-like Transformer encoder that maps a set of "query tokens" to query embeddings,
27
+ which bridge the gap between the embedding space of the image encoder and the large language model.
28
+
29
+ The goal for the model is simply to predict the next text token, giving the query embeddings and the previous text.
30
+
31
+ <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/blip2_architecture.jpg"
32
+ alt="drawing" width="600"/>
33
+
34
+ This allows the model to be used for tasks like:
35
+
36
+ - image captioning
37
+ - visual question answering (VQA)
38
+ - chat-like conversations by feeding the image and the previous conversation as prompt to the model
39
+
40
+ ## Direct Use and Downstream Use
41
+
42
+ You can use the raw model for conditional text generation given an image and optional text. See the [model hub](https://huggingface.co/models?search=Salesforce/blip) to look for
43
+ fine-tuned versions on a task that interests you.
44
+
45
+ ## Bias, Risks, Limitations, and Ethical Considerations
46
+
47
+ BLIP2-FlanT5 uses off-the-shelf Flan-T5 as the language model. It inherits the same risks and limitations from [Flan-T5](https://arxiv.org/pdf/2210.11416.pdf):
48
+
49
+ > Language models, including Flan-T5, can potentially be used for language generation in a harmful way, according to Rae et al. (2021). Flan-T5 should not be used directly in any application, without a prior assessment of safety and fairness concerns specific to the application.
50
+
51
+ BLIP2 is fine-tuned on image-text datasets (e.g. [LAION](https://laion.ai/blog/laion-400-open-dataset/) ) collected from the internet. As a result the model itself is potentially vulnerable to generating equivalently inappropriate content or replicating inherent biases in the underlying data.
52
+
53
+ BLIP2 has not been tested in real world applications. It should not be directly deployed in any applications. Researchers should first carefully assess the safety and fairness of the model in relation to the specific context they’re being deployed within.
54
+
55
+ ### How to use
56
+
57
+ For code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/blip-2#transformers.Blip2ForConditionalGeneration.forward.example).
58
+
59
+ #### Running the model on CPU
60
+
61
+ <details>
62
+ <summary> Click to expand </summary>
63
+
64
+ ```python
65
+ import requests
66
+ from PIL import Image
67
+ from transformers import BlipProcessor, Blip2ForConditionalGeneration
68
+
69
+ processor = BlipProcessor.from_pretrained("Salesforce/blip2-flan-t5-xl")
70
+ model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xl")
71
+
72
+ img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
73
+ raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
74
+
75
+ question = "how many dogs are in the picture?"
76
+ inputs = processor(raw_image, question, return_tensors="pt")
77
+
78
+ out = model.generate(**inputs)
79
+ print(processor.decode(out[0], skip_special_tokens=True))
80
+ ```
81
+ </details>
82
+
83
+ #### Running the model on GPU
84
+
85
+ ##### In full precision
86
+
87
+ <details>
88
+ <summary> Click to expand </summary>
89
+
90
+ ```python
91
+ # pip install accelerate
92
+ import requests
93
+ from PIL import Image
94
+ from transformers import Blip2Processor, Blip2ForConditionalGeneration
95
+
96
+ processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xl")
97
+ model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xl", device_map="auto")
98
+
99
+ img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
100
+ raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
101
+
102
+ question = "how many dogs are in the picture?"
103
+ inputs = processor(raw_image, question, return_tensors="pt").to("cuda")
104
+
105
+ out = model.generate(**inputs)
106
+ print(processor.decode(out[0], skip_special_tokens=True))
107
+ ```
108
+ </details>
109
+
110
+ ##### In half precision (`float16`)
111
+
112
+ <details>
113
+ <summary> Click to expand </summary>
114
+
115
+ ```python
116
+ # pip install accelerate
117
+ import torch
118
+ import requests
119
+ from PIL import Image
120
+ from transformers import Blip2Processor, Blip2ForConditionalGeneration
121
+
122
+ processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xl")
123
+ model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xl", torch_dtype=torch.float16, device_map="auto")
124
+
125
+ img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
126
+ raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
127
+
128
+ question = "how many dogs are in the picture?"
129
+ inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16)
130
+
131
+ out = model.generate(**inputs)
132
+ print(processor.decode(out[0], skip_special_tokens=True))
133
+ ```
134
+ </details>
135
+
136
+ ##### In 8-bit precision (`int8`)
137
+
138
+ <details>
139
+ <summary> Click to expand </summary>
140
+
141
+ ```python
142
+ # pip install accelerate bitsandbytes
143
+ import torch
144
+ import requests
145
+ from PIL import Image
146
+ from transformers import Blip2Processor, Blip2ForConditionalGeneration
147
+
148
+ processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xl")
149
+ model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xl", load_in_8bit=True, device_map="auto")
150
+
151
+ img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
152
+ raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
153
+
154
+ question = "how many dogs are in the picture?"
155
+ inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16)
156
+
157
+ out = model.generate(**inputs)
158
+ print(processor.decode(out[0], skip_special_tokens=True))
159
+ ```
160
+ </details>
config.json ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_commit_hash": null,
3
+ "architectures": [
4
+ "Blip2ForConditionalGeneration"
5
+ ],
6
+ "initializer_factor": 1.0,
7
+ "initializer_range": 0.02,
8
+ "model_type": "blip-2",
9
+ "num_query_tokens": 32,
10
+ "qformer_config": {
11
+ "_name_or_path": "",
12
+ "add_cross_attention": false,
13
+ "architectures": null,
14
+ "attention_probs_dropout_prob": 0.1,
15
+ "bad_words_ids": null,
16
+ "begin_suppress_tokens": null,
17
+ "bos_token_id": null,
18
+ "chunk_size_feed_forward": 0,
19
+ "classifier_dropout": null,
20
+ "cross_attention_frequency": 2,
21
+ "cross_attention_hidden_size": null,
22
+ "decoder_start_token_id": null,
23
+ "diversity_penalty": 0.0,
24
+ "do_sample": false,
25
+ "early_stopping": false,
26
+ "encoder_hidden_size": 1408,
27
+ "encoder_no_repeat_ngram_size": 0,
28
+ "eos_token_id": null,
29
+ "exponential_decay_length_penalty": null,
30
+ "finetuning_task": null,
31
+ "forced_bos_token_id": null,
32
+ "forced_eos_token_id": null,
33
+ "hidden_act": "gelu",
34
+ "hidden_dropout_prob": 0.1,
35
+ "hidden_size": 768,
36
+ "id2label": {
37
+ "0": "LABEL_0",
38
+ "1": "LABEL_1"
39
+ },
40
+ "initializer_range": 0.02,
41
+ "intermediate_size": 3072,
42
+ "is_decoder": false,
43
+ "is_encoder_decoder": false,
44
+ "label2id": {
45
+ "LABEL_0": 0,
46
+ "LABEL_1": 1
47
+ },
48
+ "layer_norm_eps": 1e-12,
49
+ "length_penalty": 1.0,
50
+ "max_length": 20,
51
+ "max_position_embeddings": 512,
52
+ "min_length": 0,
53
+ "model_type": "blip_2_qformer",
54
+ "no_repeat_ngram_size": 0,
55
+ "num_attention_heads": 12,
56
+ "num_beam_groups": 1,
57
+ "num_beams": 1,
58
+ "num_hidden_layers": 12,
59
+ "num_return_sequences": 1,
60
+ "output_attentions": false,
61
+ "output_hidden_states": false,
62
+ "output_scores": false,
63
+ "pad_token_id": 0,
64
+ "position_embedding_type": "absolute",
65
+ "prefix": null,
66
+ "problem_type": null,
67
+ "pruned_heads": {},
68
+ "remove_invalid_values": false,
69
+ "repetition_penalty": 1.0,
70
+ "return_dict": true,
71
+ "return_dict_in_generate": false,
72
+ "sep_token_id": null,
73
+ "suppress_tokens": null,
74
+ "task_specific_params": null,
75
+ "temperature": 1.0,
76
+ "tf_legacy_loss": false,
77
+ "tie_encoder_decoder": false,
78
+ "tie_word_embeddings": true,
79
+ "tokenizer_class": null,
80
+ "top_k": 50,
81
+ "top_p": 1.0,
82
+ "torch_dtype": null,
83
+ "torchscript": false,
84
+ "transformers_version": "4.27.0.dev0",
85
+ "typical_p": 1.0,
86
+ "use_bfloat16": false,
87
+ "vocab_size": 30522
88
+ },
89
+ "text_config": {
90
+ "_name_or_path": "",
91
+ "add_cross_attention": false,
92
+ "architectures": [
93
+ "T5ForConditionalGeneration"
94
+ ],
95
+ "bad_words_ids": null,
96
+ "begin_suppress_tokens": null,
97
+ "bos_token_id": 1,
98
+ "chunk_size_feed_forward": 0,
99
+ "cross_attention_hidden_size": null,
100
+ "d_ff": 5120,
101
+ "d_kv": 64,
102
+ "d_model": 2048,
103
+ "decoder_start_token_id": 0,
104
+ "dense_act_fn": "gelu",
105
+ "diversity_penalty": 0.0,
106
+ "do_sample": false,
107
+ "dropout_rate": 0.1,
108
+ "early_stopping": false,
109
+ "encoder_no_repeat_ngram_size": 0,
110
+ "eos_token_id": 1,
111
+ "exponential_decay_length_penalty": null,
112
+ "feed_forward_proj": "gated-gelu",
113
+ "finetuning_task": null,
114
+ "forced_bos_token_id": null,
115
+ "forced_eos_token_id": null,
116
+ "id2label": {
117
+ "0": "LABEL_0",
118
+ "1": "LABEL_1"
119
+ },
120
+ "initializer_factor": 1.0,
121
+ "is_decoder": false,
122
+ "is_encoder_decoder": true,
123
+ "is_gated_act": true,
124
+ "label2id": {
125
+ "LABEL_0": 0,
126
+ "LABEL_1": 1
127
+ },
128
+ "layer_norm_epsilon": 1e-06,
129
+ "length_penalty": 1.0,
130
+ "max_length": 20,
131
+ "min_length": 0,
132
+ "model_type": "t5",
133
+ "n_positions": 512,
134
+ "no_repeat_ngram_size": 0,
135
+ "num_beam_groups": 1,
136
+ "num_beams": 1,
137
+ "num_decoder_layers": 24,
138
+ "num_heads": 32,
139
+ "num_layers": 24,
140
+ "num_return_sequences": 1,
141
+ "output_attentions": false,
142
+ "output_hidden_states": false,
143
+ "output_past": true,
144
+ "output_scores": false,
145
+ "pad_token_id": 0,
146
+ "prefix": null,
147
+ "problem_type": null,
148
+ "pruned_heads": {},
149
+ "relative_attention_max_distance": 128,
150
+ "relative_attention_num_buckets": 32,
151
+ "remove_invalid_values": false,
152
+ "repetition_penalty": 1.0,
153
+ "return_dict": true,
154
+ "return_dict_in_generate": false,
155
+ "sep_token_id": null,
156
+ "suppress_tokens": null,
157
+ "task_specific_params": {
158
+ "summarization": {
159
+ "early_stopping": true,
160
+ "length_penalty": 2.0,
161
+ "max_length": 200,
162
+ "min_length": 30,
163
+ "no_repeat_ngram_size": 3,
164
+ "num_beams": 4,
165
+ "prefix": "summarize: "
166
+ },
167
+ "translation_en_to_de": {
168
+ "early_stopping": true,
169
+ "max_length": 300,
170
+ "num_beams": 4,
171
+ "prefix": "translate English to German: "
172
+ },
173
+ "translation_en_to_fr": {
174
+ "early_stopping": true,
175
+ "max_length": 300,
176
+ "num_beams": 4,
177
+ "prefix": "translate English to French: "
178
+ },
179
+ "translation_en_to_ro": {
180
+ "early_stopping": true,
181
+ "max_length": 300,
182
+ "num_beams": 4,
183
+ "prefix": "translate English to Romanian: "
184
+ }
185
+ },
186
+ "temperature": 1.0,
187
+ "tf_legacy_loss": false,
188
+ "tie_encoder_decoder": false,
189
+ "tie_word_embeddings": false,
190
+ "tokenizer_class": null,
191
+ "top_k": 50,
192
+ "top_p": 1.0,
193
+ "torch_dtype": "float32",
194
+ "torchscript": false,
195
+ "transformers_version": "4.27.0.dev0",
196
+ "typical_p": 1.0,
197
+ "use_bfloat16": false,
198
+ "use_cache": true,
199
+ "vocab_size": 32128
200
+ },
201
+ "torch_dtype": "float32",
202
+ "transformers_version": null,
203
+ "use_decoder_only_language_model": false,
204
+ "vision_config": {
205
+ "_name_or_path": "",
206
+ "add_cross_attention": false,
207
+ "architectures": null,
208
+ "attention_dropout": 0.0,
209
+ "bad_words_ids": null,
210
+ "begin_suppress_tokens": null,
211
+ "bos_token_id": null,
212
+ "chunk_size_feed_forward": 0,
213
+ "cross_attention_hidden_size": null,
214
+ "decoder_start_token_id": null,
215
+ "diversity_penalty": 0.0,
216
+ "do_sample": false,
217
+ "dropout": 0.0,
218
+ "early_stopping": false,
219
+ "encoder_no_repeat_ngram_size": 0,
220
+ "eos_token_id": null,
221
+ "exponential_decay_length_penalty": null,
222
+ "finetuning_task": null,
223
+ "forced_bos_token_id": null,
224
+ "forced_eos_token_id": null,
225
+ "hidden_act": "gelu",
226
+ "hidden_size": 1408,
227
+ "id2label": {
228
+ "0": "LABEL_0",
229
+ "1": "LABEL_1"
230
+ },
231
+ "image_size": 224,
232
+ "initializer_factor": 1.0,
233
+ "initializer_range": 1e-10,
234
+ "intermediate_size": 6144,
235
+ "is_decoder": false,
236
+ "is_encoder_decoder": false,
237
+ "label2id": {
238
+ "LABEL_0": 0,
239
+ "LABEL_1": 1
240
+ },
241
+ "layer_norm_eps": 1e-05,
242
+ "length_penalty": 1.0,
243
+ "max_length": 20,
244
+ "min_length": 0,
245
+ "model_type": "blip_2_vision_model",
246
+ "no_repeat_ngram_size": 0,
247
+ "num_attention_heads": 16,
248
+ "num_beam_groups": 1,
249
+ "num_beams": 1,
250
+ "num_channels": 3,
251
+ "num_hidden_layers": 39,
252
+ "num_return_sequences": 1,
253
+ "output_attentions": false,
254
+ "output_hidden_states": false,
255
+ "output_scores": false,
256
+ "pad_token_id": null,
257
+ "patch_size": 14,
258
+ "prefix": null,
259
+ "problem_type": null,
260
+ "projection_dim": 512,
261
+ "pruned_heads": {},
262
+ "qkv_bias": true,
263
+ "remove_invalid_values": false,
264
+ "repetition_penalty": 1.0,
265
+ "return_dict": true,
266
+ "return_dict_in_generate": false,
267
+ "sep_token_id": null,
268
+ "suppress_tokens": null,
269
+ "task_specific_params": null,
270
+ "temperature": 1.0,
271
+ "tf_legacy_loss": false,
272
+ "tie_encoder_decoder": false,
273
+ "tie_word_embeddings": true,
274
+ "tokenizer_class": null,
275
+ "top_k": 50,
276
+ "top_p": 1.0,
277
+ "torch_dtype": null,
278
+ "torchscript": false,
279
+ "transformers_version": "4.27.0.dev0",
280
+ "typical_p": 1.0,
281
+ "use_bfloat16": false
282
+ }
283
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.48145466,
8
+ 0.4578275,
9
+ 0.40821073
10
+ ],
11
+ "image_processor_type": "BlipImageProcessor",
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "processor_class": "Blip2Processor",
18
+ "resample": 3,
19
+ "rescale_factor": 0.00392156862745098,
20
+ "size": {
21
+ "height": 224,
22
+ "width": 224
23
+ }
24
+ }
pytorch_model-00001-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78da3eebf4732877fd22b73dc2ed57dae30c466d5a44b7c329de376fa4c79a88
3
+ size 9441403325
pytorch_model-00002-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afef3d90827b19571700dc3cf3ce403b34ae35cbc2137d0b772660af4115d804
3
+ size 6328861892
pytorch_model.bin.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<extra_id_0>",
4
+ "<extra_id_1>",
5
+ "<extra_id_2>",
6
+ "<extra_id_3>",
7
+ "<extra_id_4>",
8
+ "<extra_id_5>",
9
+ "<extra_id_6>",
10
+ "<extra_id_7>",
11
+ "<extra_id_8>",
12
+ "<extra_id_9>",
13
+ "<extra_id_10>",
14
+ "<extra_id_11>",
15
+ "<extra_id_12>",
16
+ "<extra_id_13>",
17
+ "<extra_id_14>",
18
+ "<extra_id_15>",
19
+ "<extra_id_16>",
20
+ "<extra_id_17>",
21
+ "<extra_id_18>",
22
+ "<extra_id_19>",
23
+ "<extra_id_20>",
24
+ "<extra_id_21>",
25
+ "<extra_id_22>",
26
+ "<extra_id_23>",
27
+ "<extra_id_24>",
28
+ "<extra_id_25>",
29
+ "<extra_id_26>",
30
+ "<extra_id_27>",
31
+ "<extra_id_28>",
32
+ "<extra_id_29>",
33
+ "<extra_id_30>",
34
+ "<extra_id_31>",
35
+ "<extra_id_32>",
36
+ "<extra_id_33>",
37
+ "<extra_id_34>",
38
+ "<extra_id_35>",
39
+ "<extra_id_36>",
40
+ "<extra_id_37>",
41
+ "<extra_id_38>",
42
+ "<extra_id_39>",
43
+ "<extra_id_40>",
44
+ "<extra_id_41>",
45
+ "<extra_id_42>",
46
+ "<extra_id_43>",
47
+ "<extra_id_44>",
48
+ "<extra_id_45>",
49
+ "<extra_id_46>",
50
+ "<extra_id_47>",
51
+ "<extra_id_48>",
52
+ "<extra_id_49>",
53
+ "<extra_id_50>",
54
+ "<extra_id_51>",
55
+ "<extra_id_52>",
56
+ "<extra_id_53>",
57
+ "<extra_id_54>",
58
+ "<extra_id_55>",
59
+ "<extra_id_56>",
60
+ "<extra_id_57>",
61
+ "<extra_id_58>",
62
+ "<extra_id_59>",
63
+ "<extra_id_60>",
64
+ "<extra_id_61>",
65
+ "<extra_id_62>",
66
+ "<extra_id_63>",
67
+ "<extra_id_64>",
68
+ "<extra_id_65>",
69
+ "<extra_id_66>",
70
+ "<extra_id_67>",
71
+ "<extra_id_68>",
72
+ "<extra_id_69>",
73
+ "<extra_id_70>",
74
+ "<extra_id_71>",
75
+ "<extra_id_72>",
76
+ "<extra_id_73>",
77
+ "<extra_id_74>",
78
+ "<extra_id_75>",
79
+ "<extra_id_76>",
80
+ "<extra_id_77>",
81
+ "<extra_id_78>",
82
+ "<extra_id_79>",
83
+ "<extra_id_80>",
84
+ "<extra_id_81>",
85
+ "<extra_id_82>",
86
+ "<extra_id_83>",
87
+ "<extra_id_84>",
88
+ "<extra_id_85>",
89
+ "<extra_id_86>",
90
+ "<extra_id_87>",
91
+ "<extra_id_88>",
92
+ "<extra_id_89>",
93
+ "<extra_id_90>",
94
+ "<extra_id_91>",
95
+ "<extra_id_92>",
96
+ "<extra_id_93>",
97
+ "<extra_id_94>",
98
+ "<extra_id_95>",
99
+ "<extra_id_96>",
100
+ "<extra_id_97>",
101
+ "<extra_id_98>",
102
+ "<extra_id_99>"
103
+ ],
104
+ "eos_token": "</s>",
105
+ "pad_token": "<pad>",
106
+ "unk_token": "<unk>"
107
+ }
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d60acb128cf7b7f2536e8f38a5b18a05535c9e14c7a355904270e15b0945ea86
3
+ size 791656
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<extra_id_0>",
4
+ "<extra_id_1>",
5
+ "<extra_id_2>",
6
+ "<extra_id_3>",
7
+ "<extra_id_4>",
8
+ "<extra_id_5>",
9
+ "<extra_id_6>",
10
+ "<extra_id_7>",
11
+ "<extra_id_8>",
12
+ "<extra_id_9>",
13
+ "<extra_id_10>",
14
+ "<extra_id_11>",
15
+ "<extra_id_12>",
16
+ "<extra_id_13>",
17
+ "<extra_id_14>",
18
+ "<extra_id_15>",
19
+ "<extra_id_16>",
20
+ "<extra_id_17>",
21
+ "<extra_id_18>",
22
+ "<extra_id_19>",
23
+ "<extra_id_20>",
24
+ "<extra_id_21>",
25
+ "<extra_id_22>",
26
+ "<extra_id_23>",
27
+ "<extra_id_24>",
28
+ "<extra_id_25>",
29
+ "<extra_id_26>",
30
+ "<extra_id_27>",
31
+ "<extra_id_28>",
32
+ "<extra_id_29>",
33
+ "<extra_id_30>",
34
+ "<extra_id_31>",
35
+ "<extra_id_32>",
36
+ "<extra_id_33>",
37
+ "<extra_id_34>",
38
+ "<extra_id_35>",
39
+ "<extra_id_36>",
40
+ "<extra_id_37>",
41
+ "<extra_id_38>",
42
+ "<extra_id_39>",
43
+ "<extra_id_40>",
44
+ "<extra_id_41>",
45
+ "<extra_id_42>",
46
+ "<extra_id_43>",
47
+ "<extra_id_44>",
48
+ "<extra_id_45>",
49
+ "<extra_id_46>",
50
+ "<extra_id_47>",
51
+ "<extra_id_48>",
52
+ "<extra_id_49>",
53
+ "<extra_id_50>",
54
+ "<extra_id_51>",
55
+ "<extra_id_52>",
56
+ "<extra_id_53>",
57
+ "<extra_id_54>",
58
+ "<extra_id_55>",
59
+ "<extra_id_56>",
60
+ "<extra_id_57>",
61
+ "<extra_id_58>",
62
+ "<extra_id_59>",
63
+ "<extra_id_60>",
64
+ "<extra_id_61>",
65
+ "<extra_id_62>",
66
+ "<extra_id_63>",
67
+ "<extra_id_64>",
68
+ "<extra_id_65>",
69
+ "<extra_id_66>",
70
+ "<extra_id_67>",
71
+ "<extra_id_68>",
72
+ "<extra_id_69>",
73
+ "<extra_id_70>",
74
+ "<extra_id_71>",
75
+ "<extra_id_72>",
76
+ "<extra_id_73>",
77
+ "<extra_id_74>",
78
+ "<extra_id_75>",
79
+ "<extra_id_76>",
80
+ "<extra_id_77>",
81
+ "<extra_id_78>",
82
+ "<extra_id_79>",
83
+ "<extra_id_80>",
84
+ "<extra_id_81>",
85
+ "<extra_id_82>",
86
+ "<extra_id_83>",
87
+ "<extra_id_84>",
88
+ "<extra_id_85>",
89
+ "<extra_id_86>",
90
+ "<extra_id_87>",
91
+ "<extra_id_88>",
92
+ "<extra_id_89>",
93
+ "<extra_id_90>",
94
+ "<extra_id_91>",
95
+ "<extra_id_92>",
96
+ "<extra_id_93>",
97
+ "<extra_id_94>",
98
+ "<extra_id_95>",
99
+ "<extra_id_96>",
100
+ "<extra_id_97>",
101
+ "<extra_id_98>",
102
+ "<extra_id_99>"
103
+ ],
104
+ "eos_token": "</s>",
105
+ "extra_ids": 100,
106
+ "model_max_length": 512,
107
+ "pad_token": "<pad>",
108
+ "processor_class": "Blip2Processor",
109
+ "sp_model_kwargs": {},
110
+ "special_tokens_map_file": "/home/arthur_huggingface_co/.cache/huggingface/hub/models--google--t5-v1_1-small/snapshots/fb7e6cba609f7bab11c614294bc04f82f613c7b1/special_tokens_map.json",
111
+ "tokenizer_class": "T5Tokenizer",
112
+ "unk_token": "<unk>"
113
+ }