-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
47 lines (40 loc) · 1.28 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
base:
device: 1 # set to -1 if you don't have a GPU
data:
dataset_folder: dataset
images_folder: images
all_qa_pairs_file: all_qa_pairs.txt
train_dataset: data_train.csv
eval_dataset: data_eval.csv
question_col: question
image_col: image_id
answer_col: answer
answer_space: answer_space.txt
tokenizer:
padding: longest
max_length: 24
truncation: True
return_token_type_ids: True
return_attention_mask: True
model:
name: roberta-deit # Custom name for the multimodal model
text_encoder: roberta-base # Valid transformer model for text encoding from HuggingFace eg: roberta-base, bert-base-uncased, albert-base-v2
image_encoder: facebook/deit-base-distilled-patch16-224 # Valid transformer model for image encoding from HuggingFace eg: google/vit-base-patch16-224-in21k, oogle/vit-base-patch16-224-in21k, microsoft/beit-base-patch16-224-pt22k-ft22k
intermediate_dims: 512
dropout: 0.5
trainer:
devices: [0,1] # set to -1 if you don't have a GPU
max_epochs: 200
log_every_n_steps: 100
precision: 32 # set to 16 for mixed precision training
training:
checkpoint: checkpoints
early_stop_patience: 50
save_top_k: 3
lr: 5.0e-5
batch_size: 32
num_workers: 8
metrics:
metrics_folder: metrics
inference:
checkpoint: checkpoint-epoch=23