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

export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0

C
chenxuyi 已提交
6 7
export PYTHONPATH=./ernie:${PYTHONPATH:-}
python -u ./ernie/run_classifier.py \
T
tianxin04 已提交
8 9 10 11 12 13
                   --use_cuda true \
                   --verbose true \
                   --do_train true \
                   --do_val true \
                   --do_test true \
                   --batch_size 32 \
T
tianxin04 已提交
14
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
15
                   --train_set ${TASK_DATA_PATH}/lcqmc/train.tsv \
T
tianxin 已提交
16
                   --dev_set ${TASK_DATA_PATH}/lcqmc/dev.tsv,${TASK_DATA_PATH}/lcqmc/test.tsv \
T
tianxin04 已提交
17 18 19 20 21 22 23 24 25
                   --vocab_path config/vocab.txt \
                   --checkpoints ./checkpoints \
                   --save_steps 1000 \
                   --weight_decay  0.0 \
                   --warmup_proportion 0.0 \
                   --validation_steps 100 \
                   --epoch 3 \
                   --max_seq_len 128 \
                   --ernie_config_path config/ernie_config.json \
T
tianxin 已提交
26
                   --learning_rate 5e-6 \
T
tianxin04 已提交
27 28 29 30
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --num_labels 2 \
                   --random_seed 1