run_dbqa.sh 1.4 KB
Newer Older
T
tianxin04 已提交
1 2 3 4 5
set -eux

export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

C
chenxuyi 已提交
6 7 8 9 10 11
python ./finetune_launch.py  \
    --nproc_per_node 8 \
    --selected_gpus 0,1,2,3,4,5,6,7 \
    --node_ips $(hostname -i) \
    --node_id 0 \
run_classifier.py \
T
tianxin04 已提交
12 13 14 15 16 17
                   --use_cuda true \
                   --verbose true \
                   --do_train true \
                   --do_val true \
                   --do_test true \
                   --batch_size 8 \
T
tianxin 已提交
18
                   --metric "acc_and_f1_and_mrr" \
T
tianxin04 已提交
19
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
20
                   --train_set ${TASK_DATA_PATH}/nlpcc-dbqa/train.tsv \
T
tianxin 已提交
21 22
                   --dev_set ${TASK_DATA_PATH}/nlpcc-dbqa/dev.tsv,${TASK_DATA_PATH}/nlpcc-dbqa/test.tsv \
                   --use_multi_gpu_test true \
T
tianxin04 已提交
23 24 25 26 27 28 29 30 31
                   --vocab_path config/vocab.txt \
                   --ernie_config_path config/ernie_config.json \
                   --checkpoints "./checkpoints" \
                   --save_steps 1000 \
                   --weight_decay  0.01 \
                   --warmup_proportion 0.0 \
                   --validation_steps 1000 \
                   --epoch 3 \
                   --max_seq_len 512 \
T
tianxin 已提交
32
                   --learning_rate 1e-5 \
T
tianxin04 已提交
33 34 35 36
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --num_labels 2 \
                   --random_seed 1