run_msra_ner.sh 1.4 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_sequence_labeling.py \
T
tianxin04 已提交
8 9 10 11 12
                   --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 \
C
chenxuyi 已提交
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
                   --max_seq_len 256 \
T
tianxin 已提交
30
                   --learning_rate 1e-5 \
T
tianxin04 已提交
31 32 33
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --random_seed 1