run_xnli.sh 1.3 KB
Newer Older
T
tianxin04 已提交
1 2
set -eux

T
tianxin 已提交
3
export FLAGS_eager_delete_tensor_gb=0
T
tianxin04 已提交
4 5 6 7 8 9 10
export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

python -u run_classifier.py \
                   --use_cuda true \
                   --do_train true \
                   --do_val true \
T
tianxin 已提交
11
                   --do_test false \
T
tianxin04 已提交
12 13 14
                   --verbose true \
                   --batch_size 8192 \
                   --in_tokens true \
T
tianxin04 已提交
15
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
16
                   --train_set ${TASK_DATA_PATH}/xnli/train.tsv \
T
tianxin 已提交
17 18
                   --dev_set ${TASK_DATA_PATH}/xnli/dev.tsv,${TASK_DATA_PATH}/xnli/test.tsv \
                   --vocab_path ${MODEL_PATH}/vocab.txt \
T
tianxin04 已提交
19
                   --label_map ${TASK_DATA_PATH}/xnli/label_map.json \
T
tianxin 已提交
20
                   --ernie_config_path ${MODEL_PATH}/ernie_config.json \
T
tianxin04 已提交
21 22 23 24 25 26 27 28 29 30 31 32
                   --checkpoints ./checkpoints \
                   --save_steps 1000 \
                   --weight_decay  0.01 \
                   --warmup_proportion 0.0 \
                   --validation_steps 25 \
                   --epoch 3 \
                   --max_seq_len 512 \
                   --learning_rate 1e-4 \
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --num_labels 3 \
                   --random_seed 1