run_msra_ner.sh 1.3 KB
Newer Older
T
tianxin04 已提交
1 2 3 4 5 6 7 8 9 10 11
set -eux

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 已提交
12
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
13
                   --num_labels 7 \
14
                   --chunk_scheme "IOB" \
T
tianxin04 已提交
15
                   --label_map_config ${TASK_DATA_PATH}/msra_ner/label_map.json \
T
tianxin04 已提交
16
                   --train_set ${TASK_DATA_PATH}/msra_ner/train.tsv \
C
chenxuyi 已提交
17
   		   --dev_set ${TASK_DATA_PATH}/msra_ner/dev.tsv,${TASK_DATA_PATH}/msra_ner/test.tsv \
T
tianxin04 已提交
18
                   --test_set ${TASK_DATA_PATH}/msra_ner/test.tsv \
C
chenxuyi 已提交
19 20
                   --vocab_path ${MODEL_PATH}/vocab.txt \
                   --ernie_config_path ${MODEL_PATH}/ernie_config.json \
T
tianxin04 已提交
21 22 23 24 25
                   --checkpoints ./checkpoints \
                   --save_steps 100000 \
                   --weight_decay  0.01 \
                   --warmup_proportion 0.0 \
                   --validation_steps 100 \
C
chenxuyi 已提交
26
                   --use_fp16 false \
T
tianxin 已提交
27
                   --epoch 6 \
T
tianxin04 已提交
28
                   --max_seq_len 256 \
T
tianxin 已提交
29
                   --learning_rate 1e-5 \
T
tianxin04 已提交
30 31 32
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --random_seed 1