-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
45 lines (43 loc) · 1.29 KB
/
run.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
45
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7,8,9
torchrun --nproc_per_node=10 --nnodes=1 --start_method=spawn run.py \
--model_name_or_path hfl/chinese-roberta-wwm-ext \
--do_train \
--do_eval \
--train_file ./data/train_data.json \
--validation_file ./data/dev_data.json \
--test_file ./data/test_data.json \
--metric_for_best_model eval_accuracy \
--load_best_model_at_end \
--learning_rate 5e-5 \
--evaluation_strategy epoch \
--num_train_epochs 5 \
--logging_steps 100 \
--output_dir ./tmp \
--per_device_eval_batch_size 8 \
--per_device_train_batch_size 8 \
--seed 42 \
--max_seq_length 512 \
--warmup_ratio 0.1 \
--save_strategy epoch \
--overwrite_output
# torchrun --nproc_per_node=8 --nnodes=1 --start_method=spawn run.py \
# --model_name_or_path hfl/chinese-roberta-wwm-ext \
# --do_train \
# --do_eval \
# --train_file ./data/train_data_10w.json \
# --validation_file ./data/dev_data.json \
# --test_file ./data/test_data.json \
# --metric_for_best_model eval_accuracy \
# --load_best_model_at_end \
# --learning_rate 5e-5 \
# --evaluation_strategy epoch \
# --num_train_epochs 5 \
# --logging_steps 100 \
# --output_dir ./tmp \
# --per_device_eval_batch_size 8 \
# --per_device_train_batch_size 8 \
# --seed 42 \
# --max_seq_length 512 \
# --warmup_ratio 0.1 \
# --save_strategy epoch \
# --overwrite_output