run_msra_ner.sh 1.4 KB
Newer Older
T
tianxin04 已提交
1 2
set -eux

T
tianxin 已提交
3
export FLAGS_eager_delete_tensor_gb=0
T
tianxin04 已提交
4
export FLAGS_sync_nccl_allreduce=1
C
chenxuyi 已提交
5
export CUDA_VISIBLDE_DEVICES=0
T
tianxin04 已提交
6 7 8 9 10 11 12

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
                   --train_set ${TASK_DATA_PATH}/msra_ner/train.tsv \
C
chenxuyi 已提交
18
   		   --dev_set ${TASK_DATA_PATH}/msra_ner/dev.tsv,${TASK_DATA_PATH}/msra_ner/test.tsv \
T
tianxin04 已提交
19
                   --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 \
C
chenxuyi 已提交
27
                   --use_fp16 false \
T
tianxin 已提交
28
                   --epoch 6 \
T
tianxin04 已提交
29 30 31 32 33
                   --max_seq_len 256 \
                   --learning_rate 5e-5 \
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --random_seed 1