-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_classifier.sh
44 lines (42 loc) · 1.3 KB
/
run_classifier.sh
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
#!/bin/bash
#SBATCH --job-name=eurlex-lexlm-base
#SBATCH --cpus-per-task=8 --mem=8000M
#SBATCH -p gpu --gres=gpu:a100:1
#SBATCH --output=/home/rwg642/RetrievalAugmentedClassification/eurlex-lexlm-base.txt
#SBATCH --time=8:00:00
module load miniconda/4.12.0
conda activate kiddothe2b
echo $SLURMD_NODENAME
echo $CUDA_VISIBLE_DEVICES
MODEL_PATH='lexlms/roberta-base-cased'
DATASET_NAME='eurlex-l2'
export PYTHONPATH=.
export TOKENIZERS_PARALLELISM=false
rm -rf ../.cache/huggingface/datasets/kiddothe2b___multilabel_bench/${DATASET_NAME}
python classifier/train_classifier.py \
--model_name_or_path ${MODEL_PATH} \
--dataset_name ${DATASET_NAME} \
--use_auth_key '' \
--output_dir data/${DATASET_NAME}/${MODEL_PATH} \
--do_train \
--do_eval \
--do_pred \
--overwrite_output_dir \
--load_best_model_at_end \
--metric_for_best_model micro-f1 \
--greater_is_better True \
--max_seq_length 512 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 5 \
--learning_rate 3e-5 \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 32 \
--seed 42 \
--num_train_epochs 20 \
--max_train_samples 10000 \
--warmup_ratio 0.05 \
--weight_decay 0.01 \
--fp16 \
--fp16_full_eval \
--lr_scheduler_type cosine