phonghoccode commited on
Commit
60763f3
·
verified ·
1 Parent(s): 073d7cd

Fine-tuned BLIP-VQA on TIFA-QA (model + processor + meta)

Browse files
config.json ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BlipForQuestionAnswering"
4
+ ],
5
+ "dtype": "float32",
6
+ "image_text_hidden_size": 256,
7
+ "initializer_factor": 1.0,
8
+ "initializer_range": 0.02,
9
+ "label_smoothing": 0.0,
10
+ "logit_scale_init_value": 2.6592,
11
+ "model_type": "blip",
12
+ "projection_dim": 512,
13
+ "text_config": {
14
+ "add_cross_attention": false,
15
+ "attention_probs_dropout_prob": 0.0,
16
+ "bos_token_id": 30522,
17
+ "cross_attention_hidden_size": null,
18
+ "decoder_start_token_id": null,
19
+ "dtype": "float32",
20
+ "encoder_hidden_size": 768,
21
+ "eos_token_id": 2,
22
+ "finetuning_task": null,
23
+ "hidden_act": "gelu",
24
+ "hidden_dropout_prob": 0.0,
25
+ "hidden_size": 768,
26
+ "initializer_factor": 1.0,
27
+ "initializer_range": 0.02,
28
+ "intermediate_size": 3072,
29
+ "is_decoder": true,
30
+ "label_smoothing": 0.0,
31
+ "layer_norm_eps": 1e-12,
32
+ "max_position_embeddings": 512,
33
+ "model_type": "blip_text_model",
34
+ "num_attention_heads": 12,
35
+ "num_hidden_layers": 12,
36
+ "pad_token_id": 0,
37
+ "prefix": null,
38
+ "projection_dim": 768,
39
+ "pruned_heads": {},
40
+ "sep_token_id": 102,
41
+ "task_specific_params": null,
42
+ "tf_legacy_loss": false,
43
+ "tie_encoder_decoder": false,
44
+ "tie_word_embeddings": true,
45
+ "tokenizer_class": null,
46
+ "torchscript": false,
47
+ "use_bfloat16": false,
48
+ "use_cache": true,
49
+ "vocab_size": 30524
50
+ },
51
+ "tie_word_embeddings": true,
52
+ "transformers_version": "5.0.0",
53
+ "use_cache": false,
54
+ "vision_config": {
55
+ "add_cross_attention": false,
56
+ "attention_dropout": 0.0,
57
+ "bos_token_id": null,
58
+ "cross_attention_hidden_size": null,
59
+ "decoder_start_token_id": null,
60
+ "dropout": 0.0,
61
+ "dtype": "float32",
62
+ "eos_token_id": null,
63
+ "finetuning_task": null,
64
+ "hidden_act": "gelu",
65
+ "hidden_size": 768,
66
+ "image_size": 384,
67
+ "initializer_factor": 1.0,
68
+ "initializer_range": 0.02,
69
+ "intermediate_size": 3072,
70
+ "is_decoder": false,
71
+ "layer_norm_eps": 1e-05,
72
+ "model_type": "blip_vision_model",
73
+ "num_attention_heads": 12,
74
+ "num_channels": 3,
75
+ "num_hidden_layers": 12,
76
+ "pad_token_id": null,
77
+ "patch_size": 16,
78
+ "prefix": null,
79
+ "projection_dim": 512,
80
+ "pruned_heads": {},
81
+ "sep_token_id": null,
82
+ "task_specific_params": null,
83
+ "tf_legacy_loss": false,
84
+ "tie_encoder_decoder": false,
85
+ "tie_word_embeddings": true,
86
+ "tokenizer_class": null,
87
+ "torchscript": false,
88
+ "use_bfloat16": false
89
+ }
90
+ }
generation_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 30522,
4
+ "diversity_penalty": 0.0,
5
+ "do_sample": false,
6
+ "early_stopping": false,
7
+ "encoder_no_repeat_ngram_size": 0,
8
+ "eos_token_id": 2,
9
+ "length_penalty": 1.0,
10
+ "max_length": 20,
11
+ "min_length": 0,
12
+ "no_repeat_ngram_size": 0,
13
+ "num_beam_groups": 1,
14
+ "num_beams": 1,
15
+ "num_return_sequences": 1,
16
+ "output_attentions": false,
17
+ "output_hidden_states": false,
18
+ "output_scores": false,
19
+ "pad_token_id": 0,
20
+ "remove_invalid_values": false,
21
+ "repetition_penalty": 1.0,
22
+ "return_dict_in_generate": false,
23
+ "temperature": 1.0,
24
+ "top_k": 50,
25
+ "top_p": 1.0,
26
+ "transformers_version": "5.0.0",
27
+ "typical_p": 1.0,
28
+ "use_cache": true
29
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:588cda1fec9c5ca043e24b8f8b6e3d237ad6e64c023d0650ee1d77567a148436
3
+ size 1538792112
processor_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_pad": true,
7
+ "do_rescale": true,
8
+ "do_resize": true,
9
+ "image_mean": [
10
+ 0.48145466,
11
+ 0.4578275,
12
+ 0.40821073
13
+ ],
14
+ "image_processor_type": "BlipImageProcessorFast",
15
+ "image_std": [
16
+ 0.26862954,
17
+ 0.26130258,
18
+ 0.27577711
19
+ ],
20
+ "resample": 3,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "height": 384,
24
+ "width": 384
25
+ },
26
+ "size_divisor": 32
27
+ },
28
+ "processor_class": "BlipProcessor"
29
+ }
tifa_blip_meta.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "Salesforce/blip-vqa-base",
3
+ "tifa_json_path": "/kaggle/input/datasets/phong2004/zimage-data/tifa_qa.json",
4
+ "image_dir": "/kaggle/input/datasets/phong2004/zimage-data/zimage_results",
5
+ "mode": "generation"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_basic_tokenize": true,
5
+ "do_lower_case": true,
6
+ "is_local": false,
7
+ "mask_token": "[MASK]",
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 512,
13
+ "never_split": null,
14
+ "pad_token": "[PAD]",
15
+ "processor_class": "BlipProcessor",
16
+ "sep_token": "[SEP]",
17
+ "strip_accents": null,
18
+ "tokenize_chinese_chars": true,
19
+ "tokenizer_class": "BertTokenizer",
20
+ "unk_token": "[UNK]"
21
+ }