malper commited on
Commit
565cc51
·
verified ·
1 Parent(s): 48d2ab0

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: t5-base
4
+ tags:
5
+ - summarization
6
+ - t5
7
+ ---
8
+
9
+ # HHI caption summarization model
10
+
11
+ This is the summarization model from **"Learning Human-Human Interactions in Images from Weak Textual Supervision" (ICCV 2023)**: a [T5-base](https://huggingface.co/t5-base) model fine-tuned to summarize captions into short human-human interaction (HHI) descriptions. It is used to generate the pseudo-labels (pHHI) for the Who's Waldo dataset used to train the main HHI understanding model.
12
+
13
+ - **Paper:** [arXiv:2304.14104](https://arxiv.org/abs/2304.14104)
14
+ - **Code:** [github.com/tau-vailab/learning-interactions](https://github.com/tau-vailab/learning-interactions)
15
+ - **Project page:** https://learning-interactions.github.io/
16
+
17
+ ## Training data
18
+
19
+ Fine-tuned on synthetic caption data (`synthetic_captions.csv`, available in the [GitHub repo](https://github.com/tau-vailab/learning-interactions/blob/main/data/synthetic_captions.csv)), mapping full captions to their corresponding HHI descriptions.
20
+
21
+ ## Usage
22
+
23
+ Can be loaded directly with `transformers`:
24
+
25
+ ```python
26
+ from transformers import pipeline
27
+ pipe = pipeline('summarization', model='malper/learning-interactions-summarization', device=0)
28
+ pipe('summarize: ' + caption)
29
+ ```
30
+
31
+ Or used with the pseudo-labeling code in the repo above (`pseudo-labeling/create_pseudolabels.py`, pass via `-m malper/learning-interactions-summarization` or after downloading locally with `hf download malper/learning-interactions-summarization --local-dir output/summarization_model`).
32
+
33
+ ## Training hyperparameters
34
+
35
+ - learning_rate: 5e-05
36
+ - train_batch_size: 8
37
+ - eval_batch_size: 8
38
+ - seed: 42
39
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
40
+ - lr_scheduler_type: linear
41
+ - num_epochs: 3.0
42
+
43
+ ### Framework versions
44
+
45
+ - Transformers 4.18.0
46
+ - PyTorch 1.13.0a0+d0d6b1f
47
+ - Datasets 2.8.0
48
+ - Tokenizers 0.12.1
49
+
50
+ ## Context
51
+
52
+ This is research code from 2023, prior to the widespread availability of general-purpose vision-language models (VLMs). It is provided as-is for reproducibility of the paper's results.
53
+
54
+ ## Citation
55
+
56
+ ```bibtex
57
+ @InProceedings{alper2023learning,
58
+ author = {Morris Alper and Hadar Averbuch-Elor},
59
+ title = {Learning Human-Human Interactions in Images from Weak Textual Supervision},
60
+ booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
61
+ year = {2023}
62
+ }
63
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "train_loss": 0.36091021529403833,
4
+ "train_runtime": 3139.6723,
5
+ "train_samples": 58895,
6
+ "train_samples_per_second": 56.275,
7
+ "train_steps_per_second": 7.034
8
+ }
config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "t5-base",
3
+ "architectures": [
4
+ "T5ForConditionalGeneration"
5
+ ],
6
+ "d_ff": 3072,
7
+ "d_kv": 64,
8
+ "d_model": 768,
9
+ "decoder_start_token_id": 0,
10
+ "dropout_rate": 0.1,
11
+ "eos_token_id": 1,
12
+ "feed_forward_proj": "relu",
13
+ "initializer_factor": 1.0,
14
+ "is_encoder_decoder": true,
15
+ "layer_norm_epsilon": 1e-06,
16
+ "model_type": "t5",
17
+ "n_positions": 512,
18
+ "num_decoder_layers": 12,
19
+ "num_heads": 12,
20
+ "num_layers": 12,
21
+ "output_past": true,
22
+ "pad_token_id": 0,
23
+ "relative_attention_max_distance": 128,
24
+ "relative_attention_num_buckets": 32,
25
+ "task_specific_params": {
26
+ "summarization": {
27
+ "early_stopping": true,
28
+ "length_penalty": 2.0,
29
+ "max_length": 200,
30
+ "min_length": 30,
31
+ "no_repeat_ngram_size": 3,
32
+ "num_beams": 4,
33
+ "prefix": "summarize: "
34
+ },
35
+ "translation_en_to_de": {
36
+ "early_stopping": true,
37
+ "max_length": 300,
38
+ "num_beams": 4,
39
+ "prefix": "translate English to German: "
40
+ },
41
+ "translation_en_to_fr": {
42
+ "early_stopping": true,
43
+ "max_length": 300,
44
+ "num_beams": 4,
45
+ "prefix": "translate English to French: "
46
+ },
47
+ "translation_en_to_ro": {
48
+ "early_stopping": true,
49
+ "max_length": 300,
50
+ "num_beams": 4,
51
+ "prefix": "translate English to Romanian: "
52
+ }
53
+ },
54
+ "torch_dtype": "float32",
55
+ "transformers_version": "4.18.0",
56
+ "use_cache": true,
57
+ "vocab_size": 32100
58
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:196bddb03c00374fdb885ce919c511f7e8491e7496c7c75047a9d28143072575
3
+ size 891616913
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "additional_special_tokens": ["<extra_id_0>", "<extra_id_1>", "<extra_id_2>", "<extra_id_3>", "<extra_id_4>", "<extra_id_5>", "<extra_id_6>", "<extra_id_7>", "<extra_id_8>", "<extra_id_9>", "<extra_id_10>", "<extra_id_11>", "<extra_id_12>", "<extra_id_13>", "<extra_id_14>", "<extra_id_15>", "<extra_id_16>", "<extra_id_17>", "<extra_id_18>", "<extra_id_19>", "<extra_id_20>", "<extra_id_21>", "<extra_id_22>", "<extra_id_23>", "<extra_id_24>", "<extra_id_25>", "<extra_id_26>", "<extra_id_27>", "<extra_id_28>", "<extra_id_29>", "<extra_id_30>", "<extra_id_31>", "<extra_id_32>", "<extra_id_33>", "<extra_id_34>", "<extra_id_35>", "<extra_id_36>", "<extra_id_37>", "<extra_id_38>", "<extra_id_39>", "<extra_id_40>", "<extra_id_41>", "<extra_id_42>", "<extra_id_43>", "<extra_id_44>", "<extra_id_45>", "<extra_id_46>", "<extra_id_47>", "<extra_id_48>", "<extra_id_49>", "<extra_id_50>", "<extra_id_51>", "<extra_id_52>", "<extra_id_53>", "<extra_id_54>", "<extra_id_55>", "<extra_id_56>", "<extra_id_57>", "<extra_id_58>", "<extra_id_59>", "<extra_id_60>", "<extra_id_61>", "<extra_id_62>", "<extra_id_63>", "<extra_id_64>", "<extra_id_65>", "<extra_id_66>", "<extra_id_67>", "<extra_id_68>", "<extra_id_69>", "<extra_id_70>", "<extra_id_71>", "<extra_id_72>", "<extra_id_73>", "<extra_id_74>", "<extra_id_75>", "<extra_id_76>", "<extra_id_77>", "<extra_id_78>", "<extra_id_79>", "<extra_id_80>", "<extra_id_81>", "<extra_id_82>", "<extra_id_83>", "<extra_id_84>", "<extra_id_85>", "<extra_id_86>", "<extra_id_87>", "<extra_id_88>", "<extra_id_89>", "<extra_id_90>", "<extra_id_91>", "<extra_id_92>", "<extra_id_93>", "<extra_id_94>", "<extra_id_95>", "<extra_id_96>", "<extra_id_97>", "<extra_id_98>", "<extra_id_99>"]}
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 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "extra_ids": 100, "additional_special_tokens": ["<extra_id_0>", "<extra_id_1>", "<extra_id_2>", "<extra_id_3>", "<extra_id_4>", "<extra_id_5>", "<extra_id_6>", "<extra_id_7>", "<extra_id_8>", "<extra_id_9>", "<extra_id_10>", "<extra_id_11>", "<extra_id_12>", "<extra_id_13>", "<extra_id_14>", "<extra_id_15>", "<extra_id_16>", "<extra_id_17>", "<extra_id_18>", "<extra_id_19>", "<extra_id_20>", "<extra_id_21>", "<extra_id_22>", "<extra_id_23>", "<extra_id_24>", "<extra_id_25>", "<extra_id_26>", "<extra_id_27>", "<extra_id_28>", "<extra_id_29>", "<extra_id_30>", "<extra_id_31>", "<extra_id_32>", "<extra_id_33>", "<extra_id_34>", "<extra_id_35>", "<extra_id_36>", "<extra_id_37>", "<extra_id_38>", "<extra_id_39>", "<extra_id_40>", "<extra_id_41>", "<extra_id_42>", "<extra_id_43>", "<extra_id_44>", "<extra_id_45>", "<extra_id_46>", "<extra_id_47>", "<extra_id_48>", "<extra_id_49>", "<extra_id_50>", "<extra_id_51>", "<extra_id_52>", "<extra_id_53>", "<extra_id_54>", "<extra_id_55>", "<extra_id_56>", "<extra_id_57>", "<extra_id_58>", "<extra_id_59>", "<extra_id_60>", "<extra_id_61>", "<extra_id_62>", "<extra_id_63>", "<extra_id_64>", "<extra_id_65>", "<extra_id_66>", "<extra_id_67>", "<extra_id_68>", "<extra_id_69>", "<extra_id_70>", "<extra_id_71>", "<extra_id_72>", "<extra_id_73>", "<extra_id_74>", "<extra_id_75>", "<extra_id_76>", "<extra_id_77>", "<extra_id_78>", "<extra_id_79>", "<extra_id_80>", "<extra_id_81>", "<extra_id_82>", "<extra_id_83>", "<extra_id_84>", "<extra_id_85>", "<extra_id_86>", "<extra_id_87>", "<extra_id_88>", "<extra_id_89>", "<extra_id_90>", "<extra_id_91>", "<extra_id_92>", "<extra_id_93>", "<extra_id_94>", "<extra_id_95>", "<extra_id_96>", "<extra_id_97>", "<extra_id_98>", "<extra_id_99>"], "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "t5-base", "tokenizer_class": "T5Tokenizer"}
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "train_loss": 0.36091021529403833,
4
+ "train_runtime": 3139.6723,
5
+ "train_samples": 58895,
6
+ "train_samples_per_second": 56.275,
7
+ "train_steps_per_second": 7.034
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.0,
5
+ "global_step": 22086,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.07,
12
+ "learning_rate": 4.8868061215249484e-05,
13
+ "loss": 0.6807,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 0.14,
18
+ "learning_rate": 4.773612243049896e-05,
19
+ "loss": 0.4855,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 0.2,
24
+ "learning_rate": 4.660418364574844e-05,
25
+ "loss": 0.4476,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 0.27,
30
+ "learning_rate": 4.547224486099792e-05,
31
+ "loss": 0.4386,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 0.34,
36
+ "learning_rate": 4.43403060762474e-05,
37
+ "loss": 0.4359,
38
+ "step": 2500
39
+ },
40
+ {
41
+ "epoch": 0.41,
42
+ "learning_rate": 4.3208367291496876e-05,
43
+ "loss": 0.4146,
44
+ "step": 3000
45
+ },
46
+ {
47
+ "epoch": 0.48,
48
+ "learning_rate": 4.207642850674636e-05,
49
+ "loss": 0.4143,
50
+ "step": 3500
51
+ },
52
+ {
53
+ "epoch": 0.54,
54
+ "learning_rate": 4.094448972199584e-05,
55
+ "loss": 0.3972,
56
+ "step": 4000
57
+ },
58
+ {
59
+ "epoch": 0.61,
60
+ "learning_rate": 3.981255093724531e-05,
61
+ "loss": 0.4009,
62
+ "step": 4500
63
+ },
64
+ {
65
+ "epoch": 0.68,
66
+ "learning_rate": 3.8680612152494794e-05,
67
+ "loss": 0.4085,
68
+ "step": 5000
69
+ },
70
+ {
71
+ "epoch": 0.75,
72
+ "learning_rate": 3.7548673367744275e-05,
73
+ "loss": 0.3819,
74
+ "step": 5500
75
+ },
76
+ {
77
+ "epoch": 0.81,
78
+ "learning_rate": 3.6416734582993756e-05,
79
+ "loss": 0.394,
80
+ "step": 6000
81
+ },
82
+ {
83
+ "epoch": 0.88,
84
+ "learning_rate": 3.528479579824323e-05,
85
+ "loss": 0.3901,
86
+ "step": 6500
87
+ },
88
+ {
89
+ "epoch": 0.95,
90
+ "learning_rate": 3.415285701349271e-05,
91
+ "loss": 0.3975,
92
+ "step": 7000
93
+ },
94
+ {
95
+ "epoch": 1.02,
96
+ "learning_rate": 3.302091822874219e-05,
97
+ "loss": 0.3761,
98
+ "step": 7500
99
+ },
100
+ {
101
+ "epoch": 1.09,
102
+ "learning_rate": 3.188897944399167e-05,
103
+ "loss": 0.3519,
104
+ "step": 8000
105
+ },
106
+ {
107
+ "epoch": 1.15,
108
+ "learning_rate": 3.075704065924115e-05,
109
+ "loss": 0.3385,
110
+ "step": 8500
111
+ },
112
+ {
113
+ "epoch": 1.22,
114
+ "learning_rate": 2.962510187449063e-05,
115
+ "loss": 0.3505,
116
+ "step": 9000
117
+ },
118
+ {
119
+ "epoch": 1.29,
120
+ "learning_rate": 2.849316308974011e-05,
121
+ "loss": 0.3364,
122
+ "step": 9500
123
+ },
124
+ {
125
+ "epoch": 1.36,
126
+ "learning_rate": 2.7361224304989585e-05,
127
+ "loss": 0.347,
128
+ "step": 10000
129
+ },
130
+ {
131
+ "epoch": 1.43,
132
+ "learning_rate": 2.6229285520239066e-05,
133
+ "loss": 0.3378,
134
+ "step": 10500
135
+ },
136
+ {
137
+ "epoch": 1.49,
138
+ "learning_rate": 2.5097346735488547e-05,
139
+ "loss": 0.3523,
140
+ "step": 11000
141
+ },
142
+ {
143
+ "epoch": 1.56,
144
+ "learning_rate": 2.3965407950738025e-05,
145
+ "loss": 0.3441,
146
+ "step": 11500
147
+ },
148
+ {
149
+ "epoch": 1.63,
150
+ "learning_rate": 2.2833469165987503e-05,
151
+ "loss": 0.3493,
152
+ "step": 12000
153
+ },
154
+ {
155
+ "epoch": 1.7,
156
+ "learning_rate": 2.1701530381236984e-05,
157
+ "loss": 0.3416,
158
+ "step": 12500
159
+ },
160
+ {
161
+ "epoch": 1.77,
162
+ "learning_rate": 2.0569591596486462e-05,
163
+ "loss": 0.3364,
164
+ "step": 13000
165
+ },
166
+ {
167
+ "epoch": 1.83,
168
+ "learning_rate": 1.9437652811735943e-05,
169
+ "loss": 0.3401,
170
+ "step": 13500
171
+ },
172
+ {
173
+ "epoch": 1.9,
174
+ "learning_rate": 1.830571402698542e-05,
175
+ "loss": 0.3543,
176
+ "step": 14000
177
+ },
178
+ {
179
+ "epoch": 1.97,
180
+ "learning_rate": 1.7173775242234902e-05,
181
+ "loss": 0.3269,
182
+ "step": 14500
183
+ },
184
+ {
185
+ "epoch": 2.04,
186
+ "learning_rate": 1.604183645748438e-05,
187
+ "loss": 0.3228,
188
+ "step": 15000
189
+ },
190
+ {
191
+ "epoch": 2.11,
192
+ "learning_rate": 1.4909897672733858e-05,
193
+ "loss": 0.3102,
194
+ "step": 15500
195
+ },
196
+ {
197
+ "epoch": 2.17,
198
+ "learning_rate": 1.3777958887983339e-05,
199
+ "loss": 0.3203,
200
+ "step": 16000
201
+ },
202
+ {
203
+ "epoch": 2.24,
204
+ "learning_rate": 1.2646020103232817e-05,
205
+ "loss": 0.2996,
206
+ "step": 16500
207
+ },
208
+ {
209
+ "epoch": 2.31,
210
+ "learning_rate": 1.1514081318482298e-05,
211
+ "loss": 0.3019,
212
+ "step": 17000
213
+ },
214
+ {
215
+ "epoch": 2.38,
216
+ "learning_rate": 1.0382142533731776e-05,
217
+ "loss": 0.3116,
218
+ "step": 17500
219
+ },
220
+ {
221
+ "epoch": 2.44,
222
+ "learning_rate": 9.250203748981255e-06,
223
+ "loss": 0.2996,
224
+ "step": 18000
225
+ },
226
+ {
227
+ "epoch": 2.51,
228
+ "learning_rate": 8.118264964230735e-06,
229
+ "loss": 0.3065,
230
+ "step": 18500
231
+ },
232
+ {
233
+ "epoch": 2.58,
234
+ "learning_rate": 6.986326179480214e-06,
235
+ "loss": 0.3168,
236
+ "step": 19000
237
+ },
238
+ {
239
+ "epoch": 2.65,
240
+ "learning_rate": 5.8543873947296935e-06,
241
+ "loss": 0.3124,
242
+ "step": 19500
243
+ },
244
+ {
245
+ "epoch": 2.72,
246
+ "learning_rate": 4.722448609979173e-06,
247
+ "loss": 0.2943,
248
+ "step": 20000
249
+ },
250
+ {
251
+ "epoch": 2.78,
252
+ "learning_rate": 3.5905098252286516e-06,
253
+ "loss": 0.3034,
254
+ "step": 20500
255
+ },
256
+ {
257
+ "epoch": 2.85,
258
+ "learning_rate": 2.458571040478131e-06,
259
+ "loss": 0.2954,
260
+ "step": 21000
261
+ },
262
+ {
263
+ "epoch": 2.92,
264
+ "learning_rate": 1.3266322557276103e-06,
265
+ "loss": 0.3102,
266
+ "step": 21500
267
+ },
268
+ {
269
+ "epoch": 2.99,
270
+ "learning_rate": 1.9469347097708958e-07,
271
+ "loss": 0.3105,
272
+ "step": 22000
273
+ },
274
+ {
275
+ "epoch": 3.0,
276
+ "step": 22086,
277
+ "total_flos": 1.617792737439744e+16,
278
+ "train_loss": 0.36091021529403833,
279
+ "train_runtime": 3139.6723,
280
+ "train_samples_per_second": 56.275,
281
+ "train_steps_per_second": 7.034
282
+ }
283
+ ],
284
+ "max_steps": 22086,
285
+ "num_train_epochs": 3,
286
+ "total_flos": 1.617792737439744e+16,
287
+ "trial_name": null,
288
+ "trial_params": null
289
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2893115af2a83bf104b73befa037acbcc1f97bd339deae8d2ac3cb3f0a8c6faf
3
+ size 3195