run_msra_ner.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 11 12
export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0

python -u run_sequence_labeling.py \
                   --use_cuda true \
                   --do_train true \
                   --do_val true \
                   --do_test true \
                   --batch_size 16 \
T
tianxin04 已提交
13
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
14
                   --num_labels 7 \
15
                   --chunk_scheme "IOB" \
T
tianxin04 已提交
16
                   --label_map_config ${TASK_DATA_PATH}/msra_ner/label_map.json \
T
tianxin04 已提交
17 18 19
                   --train_set ${TASK_DATA_PATH}/msra_ner/train.tsv \
                   --dev_set ${TASK_DATA_PATH}/msra_ner/dev.tsv \
                   --test_set ${TASK_DATA_PATH}/msra_ner/test.tsv \
T
tianxin 已提交
20 21
                   --vocab_path ${MODEL_PATH}/vocab.txt \
                   --ernie_config_path ${MODEL_PATH}/ernie_config.json \
T
tianxin04 已提交
22 23 24 25 26
                   --checkpoints ./checkpoints \
                   --save_steps 100000 \
                   --weight_decay  0.01 \
                   --warmup_proportion 0.0 \
                   --validation_steps 100 \
T
tianxin 已提交
27
                   --epoch 6 \
T
tianxin04 已提交
28 29 30 31 32
                   --max_seq_len 256 \
                   --learning_rate 5e-5 \
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --random_seed 1