jialicheng commited on
Commit
4d629b5
·
verified ·
1 Parent(s): d1d4576

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: dandelin/vilt-b32-finetuned-nlvr2
5
+ tags:
6
+ - image-text-classification
7
+ - generated_from_trainer
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: '42'
12
+ results: []
13
+ ---
14
+
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
+
18
+ # 42
19
+
20
+ This model is a fine-tuned version of [dandelin/vilt-b32-finetuned-nlvr2](https://huggingface.co/dandelin/vilt-b32-finetuned-nlvr2) on the nlvr2 dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.5263
23
+ - Accuracy: 0.7355
24
+ - Dt Accuracy: 0.7355
25
+ - Df Accuracy: 0.8759
26
+ - Unlearn Overall Accuracy: 0.6218
27
+ - Unlearn Time: None
28
+
29
+ ## Model description
30
+
31
+ More information needed
32
+
33
+ ## Intended uses & limitations
34
+
35
+ More information needed
36
+
37
+ ## Training and evaluation data
38
+
39
+ More information needed
40
+
41
+ ## Training procedure
42
+
43
+ ### Training hyperparameters
44
+
45
+ The following hyperparameters were used during training:
46
+ - learning_rate: 1e-05
47
+ - train_batch_size: 32
48
+ - eval_batch_size: 64
49
+ - seed: 42
50
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 5
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Overall Accuracy | Unlearn Overall Accuracy | Time |
57
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:----------------:|:------------------------:|:----:|
58
+ | No log | 1.0 | 324 | 0.5474 | 0.9126 | 0.5881 | 0.5881 | None |
59
+ | 0.4885 | 2.0 | 648 | 0.5345 | 0.9118 | 0.5892 | 0.5892 | None |
60
+ | 0.4885 | 3.0 | 972 | 0.5297 | 0.8911 | 0.6089 | 0.6089 | None |
61
+ | 0.3043 | 4.0 | 1296 | 0.5268 | 0.8842 | 0.6147 | 0.6147 | None |
62
+ | 0.2354 | 5.0 | 1620 | 0.5263 | 0.8759 | 0.6218 | 0.6218 | None |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.48.0
68
+ - Pytorch 2.3.0+cu121
69
+ - Datasets 2.18.0
70
+ - Tokenizers 0.21.0
all_results.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "df_accuracy": 0.8758700696055685,
3
+ "df_loss": 0.45554879307746887,
4
+ "dr_accuracy": 0.9296666666666666,
5
+ "dr_loss": 0.31367406249046326,
6
+ "dt_accuracy": 0.7475240419118703,
7
+ "epoch": 5.0,
8
+ "eval_unlearn_overall_accuracy": 0.621775694795363,
9
+ "knowledge_gap": 0.526869682907966,
10
+ "ood_accuracy": 0.748493543758967,
11
+ "ood_loss": 0.5186445116996765,
12
+ "test_accuracy": 0.7475240419118703,
13
+ "test_loss": 0.5181884169578552,
14
+ "total_flos": 1004374260677568.0,
15
+ "train_loss": 0.3335036242449725,
16
+ "train_runtime": 2328.2549,
17
+ "train_samples_per_second": 22.214,
18
+ "train_steps_per_second": 0.696,
19
+ "unlearn_overall_accuracy": 0.6242314492621494,
20
+ "unlearn_time": 2328.6262109279633,
21
+ "zrf": 0.9749588523016187
22
+ }
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "dandelin/vilt-b32-finetuned-nlvr2",
3
+ "architectures": [
4
+ "ViltForImagesAndTextClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.0,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "False",
12
+ "1": "True"
13
+ },
14
+ "image_size": 384,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "False": 0,
19
+ "True": 1
20
+ },
21
+ "layer_norm_eps": 1e-12,
22
+ "max_image_length": -1,
23
+ "max_position_embeddings": 40,
24
+ "modality_type_vocab_size": 3,
25
+ "model_type": "vilt",
26
+ "num_attention_heads": 12,
27
+ "num_channels": 3,
28
+ "num_hidden_layers": 12,
29
+ "num_images": 2,
30
+ "patch_size": 32,
31
+ "qkv_bias": true,
32
+ "tie_word_embeddings": false,
33
+ "torch_dtype": "float32",
34
+ "transformers_version": "4.48.0",
35
+ "type_vocab_size": 2,
36
+ "vocab_size": 30522
37
+ }
df_results.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "df_accuracy": 0.8758700696055685,
3
+ "df_loss": 0.45554879307746887
4
+ }
dr_results.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "dr_accuracy": 0.9296666666666666,
3
+ "dr_loss": 0.31367406249046326
4
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fa1f2d5fcf973c220356c800929dceffa95c2327f6fcb1c18040a417d808f37
3
+ size 455875832
ood_results.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "ood_accuracy": 0.748493543758967,
3
+ "ood_loss": 0.5186445116996765
4
+ }
pred_logit_df.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df4e9b27afba8846adcb28e73683ab121322ddb4a0665fcdd076af38c21de281
3
+ size 41504
pred_logit_dr.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b30684be20a5ecc109e8d002ecb882dc650d66002b25ddd361b998237f73875
3
+ size 48128
pred_logit_eval.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e50698328427f806cfd69879ee7199749e697d1d3b948a63c3dab8d9f65cccc3
3
+ size 55984
pred_logit_ood.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e354ba167d09fd432afddc3b7d5637fb66940a88d61f94c63a84e9a3b99ad145
3
+ size 55888
pred_logit_test.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73684eac19abc20c5fb30c624076ac046c3ee71d2eca3381c165cc848e536fbd
3
+ size 55864
test_results.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "test_accuracy": 0.7475240419118703,
3
+ "test_loss": 0.5181884169578552
4
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 5.0,
3
+ "total_flos": 1004374260677568.0,
4
+ "train_loss": 0.3335036242449725,
5
+ "train_runtime": 2328.2549,
6
+ "train_samples_per_second": 22.214,
7
+ "train_steps_per_second": 0.696
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.621775694795363,
3
+ "best_model_checkpoint": "../../checkpoint/unlearn/nlvr2/vilt/bad_teaching/6.0/42/checkpoint-1620",
4
+ "epoch": 5.0,
5
+ "eval_steps": 500,
6
+ "global_step": 1620,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "df_accuracy": 0.9126063418406806,
13
+ "dt_accuracy": 0.7420509882555142,
14
+ "epoch": 1.0,
15
+ "eval_accuracy": 0.7420509882555142,
16
+ "eval_loss": 0.5473781228065491,
17
+ "eval_runtime": 113.5475,
18
+ "eval_samples_per_second": 61.49,
19
+ "eval_steps_per_second": 0.969,
20
+ "eval_unlearn_overall_accuracy": 0.5881464664707937,
21
+ "step": 324,
22
+ "unlearn_overall_accuracy": 0.5881464664707937,
23
+ "unlearn_time": null
24
+ },
25
+ {
26
+ "epoch": 1.5432098765432098,
27
+ "grad_norm": 2.551623582839966,
28
+ "learning_rate": 6.913580246913581e-06,
29
+ "loss": 0.4885,
30
+ "step": 500
31
+ },
32
+ {
33
+ "df_accuracy": 0.9118329466357309,
34
+ "dt_accuracy": 0.7437696934975652,
35
+ "epoch": 2.0,
36
+ "eval_accuracy": 0.7437696934975652,
37
+ "eval_loss": 0.5345158576965332,
38
+ "eval_runtime": 104.9313,
39
+ "eval_samples_per_second": 66.539,
40
+ "eval_steps_per_second": 1.048,
41
+ "eval_unlearn_overall_accuracy": 0.5892136585732513,
42
+ "step": 648,
43
+ "unlearn_overall_accuracy": 0.5892136585732513,
44
+ "unlearn_time": null
45
+ },
46
+ {
47
+ "df_accuracy": 0.8911446249033256,
48
+ "dt_accuracy": 0.7424806645660269,
49
+ "epoch": 3.0,
50
+ "eval_accuracy": 0.7424806645660269,
51
+ "eval_loss": 0.5296567678451538,
52
+ "eval_runtime": 119.9673,
53
+ "eval_samples_per_second": 58.199,
54
+ "eval_steps_per_second": 0.917,
55
+ "eval_unlearn_overall_accuracy": 0.6088830335218481,
56
+ "step": 972,
57
+ "unlearn_overall_accuracy": 0.6088830335218481,
58
+ "unlearn_time": null
59
+ },
60
+ {
61
+ "epoch": 3.0864197530864197,
62
+ "grad_norm": 2.1789159774780273,
63
+ "learning_rate": 3.827160493827161e-06,
64
+ "loss": 0.3043,
65
+ "step": 1000
66
+ },
67
+ {
68
+ "df_accuracy": 0.884184068058778,
69
+ "dt_accuracy": 0.7386135777714122,
70
+ "epoch": 4.0,
71
+ "eval_accuracy": 0.7386135777714122,
72
+ "eval_loss": 0.5267872214317322,
73
+ "eval_runtime": 95.2807,
74
+ "eval_samples_per_second": 73.278,
75
+ "eval_steps_per_second": 1.154,
76
+ "eval_unlearn_overall_accuracy": 0.6146807727893482,
77
+ "step": 1296,
78
+ "unlearn_overall_accuracy": 0.6146807727893482,
79
+ "unlearn_time": null
80
+ },
81
+ {
82
+ "epoch": 4.62962962962963,
83
+ "grad_norm": 3.276827096939087,
84
+ "learning_rate": 7.407407407407407e-07,
85
+ "loss": 0.2354,
86
+ "step": 1500
87
+ },
88
+ {
89
+ "df_accuracy": 0.8758700696055685,
90
+ "dt_accuracy": 0.7354626181609853,
91
+ "epoch": 5.0,
92
+ "eval_accuracy": 0.7354626181609853,
93
+ "eval_loss": 0.5263105630874634,
94
+ "eval_runtime": 87.2124,
95
+ "eval_samples_per_second": 80.057,
96
+ "eval_steps_per_second": 1.261,
97
+ "eval_unlearn_overall_accuracy": 0.621775694795363,
98
+ "step": 1620,
99
+ "unlearn_overall_accuracy": 0.621775694795363,
100
+ "unlearn_time": null
101
+ },
102
+ {
103
+ "epoch": 5.0,
104
+ "step": 1620,
105
+ "total_flos": 1004374260677568.0,
106
+ "train_loss": 0.3335036242449725,
107
+ "train_runtime": 2328.2549,
108
+ "train_samples_per_second": 22.214,
109
+ "train_steps_per_second": 0.696
110
+ }
111
+ ],
112
+ "logging_steps": 500,
113
+ "max_steps": 1620,
114
+ "num_input_tokens_seen": 0,
115
+ "num_train_epochs": 5,
116
+ "save_steps": 500,
117
+ "stateful_callbacks": {
118
+ "TrainerControl": {
119
+ "args": {
120
+ "should_epoch_stop": false,
121
+ "should_evaluate": false,
122
+ "should_log": false,
123
+ "should_save": true,
124
+ "should_training_stop": true
125
+ },
126
+ "attributes": {}
127
+ }
128
+ },
129
+ "total_flos": 1004374260677568.0,
130
+ "train_batch_size": 32,
131
+ "trial_name": null,
132
+ "trial_params": null
133
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c11f0bc61c040d43fe8355c9644f5ac3cbd2b5c2dd741b85880c5166906b1f7e
3
+ size 5496
unlearn_final_results.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "df_accuracy": 0.8758700696055685,
3
+ "dr_accuracy": 0.9296666666666666,
4
+ "dt_accuracy": 0.7475240419118703,
5
+ "eval_unlearn_overall_accuracy": 0.621775694795363,
6
+ "knowledge_gap": 0.526869682907966,
7
+ "ood_accuracy": 0.748493543758967,
8
+ "unlearn_overall_accuracy": 0.6242314492621494,
9
+ "unlearn_time": 2328.6262109279633,
10
+ "zrf": 0.9749588523016187
11
+ }