SemSup-XC / cleaned_code /configs /eurlex4.3k_baseline.yml
Pranjal2041's picture
Initial Commit
4014562
raw
history blame
3.24 kB
EXP_NAME: "semsup_descs_100ep_newds_cosine"
EXP_DESC: "SemSup Descriptions ran for 100 epochs"
DATA:
task_name: eurlex57k
dataset_name: eurlex
dataset_config_name: null
max_seq_length: 512
overwrite_output_dir: true
overwrite_cache: false
pad_to_max_length: true
load_from_local: true
max_train_samples: null
max_eval_samples: null
max_predict_samples: null
# train_file: ../training/datasets/eurlex4.3k/train_hr.jsonl
# train_file: ../training/datasets/eurlex4.3k/train.jsonl
# validation_file: ../training/datasets/eurlex4.3k/test_unseen.jsonl
# test_file: ../training/datasets/eurlex4.3k/test_unseen.jsonl
# validation_file: ../training/datasets/eurlex4.3k/test.jsonl
# test_file: ../training/datasets/eurlex4.3k/test.jsonl
train_file: ../training/datasets/eurlex4.3k/train_split1057_1000highfreq.jsonl
validation_file: ../training/datasets/eurlex4.3k/test_unseen_split1057.jsonl
test_file: ../training/datasets/eurlex4.3k/test_unseen_split1057.jsonl
# validation_file: ../training/datasets/eurlex4.3k/test_unseen_hr.jsonl
# test_file: ../training/datasets/eurlex4.3k/test_unseen_hr.jsonl
label_max_seq_length: 96
descriptions_file: ../training/datasets/eurlex4.3k/heir_withdescriptions_4.3k_v1.json
# descriptions_file: ../training/datasets/eurlex4.3k/heir_descriptions_4.3k_v1.json
# descriptions_file: ../training/datasets/eurlex4.3k/curie_descriptions_4.3k_v1.json
all_labels : ../training/datasets/eurlex4.3k/all_labels.txt
test_labels: ../training/datasets/eurlex4.3k/unseen_labels_split1057.txt
# test_labels: ../training/datasets/eurlex4.3k/unseen_labels.txt
max_descs_per_label: 5
# contrastive_learning_samples: 1500
# cl_min_positive_descs: 1
# bm_short_file: ../training/datasets/eurlex4.3k/train_bmshort.txt
MODEL:
model_name_or_path: bert-base-uncased
config_name: null
tokenizer_name: null
cache_dir: null
use_fast_tokenizer: true
model_revision: main
use_auth_token: false
ignore_mismatched_sizes: false
negative_sampling: "none"
semsup: true
# label_model_name_or_path: prajjwal1/bert-small
label_model_name_or_path: bert-base-uncased
# label_model_name_or_path: prajjwal1/bert-tiny
encoder_model_type: bert
use_custom_optimizer: adamw
output_learning_rate: 1.e-4
arch_type : 2
add_label_name: false
normalize_embeddings: false
tie_weights: true
coil: true
# use_precomputed_embeddings: ../training/datasets/eurlex4.3k/heir_withdescriptions_4.3k_v1_embs_bert_9_96.npy
token_dim: 16
num_frozen_layers: 9
TRAINING:
do_train: true
do_eval: true
per_device_train_batch_size: 1
gradient_accumulation_steps: 4
per_device_eval_batch_size: 1
learning_rate: 5.e-5 # Will point to input encoder lr, if user_custom_optimizer is False
num_train_epochs: 10
save_steps: 10000
evaluation_strategy: steps
eval_steps: 500
fp16: true
fp16_opt_level: O1
lr_scheduler_type: "linear" # defaults to 'linear'
dataloader_num_workers: 8
label_names: [labels]
scenario: "unseen_labels"
ddp_find_unused_parameters: false