export OMP_NUM_THREADS=12 | |
EXAMPLES=/media/dn/work2/nlpu/transformers/examples | |
SQUAD=${EXAMPLES}/scripts/squad2.0 | |
MODEL_PATH=${EXAMPLES}/scripts/runs/albert_xxlargev1_squad2_512_bs48_3ep_fp16 | |
python ${EXAMPLES}/question-answering/run_squad.py \ | |
--model_type albert \ | |
--model_name_or_path albert-xxlarge-v1 \ | |
--do_train \ | |
--do_eval \ | |
--train_file ${SQUAD}/train-v2.0.json \ | |
--predict_file ${SQUAD}/dev-v2.0.json \ | |
--version_2_with_negative \ | |
--do_lower_case \ | |
--num_train_epochs 3 \ | |
--max_steps 8144 \ | |
--warmup_steps 814 \ | |
--learning_rate 3e-5 \ | |
--max_seq_length 512 \ | |
--doc_stride 128 \ | |
--per_gpu_train_batch_size 6 \ | |
--gradient_accumulation_steps 8 \ | |
--per_gpu_eval_batch_size 48 \ | |
--fp16 \ | |
--fp16_opt_level O1 \ | |
--threads 12 \ | |
--logging_steps 50 \ | |
--save_steps 3000 \ | |
--overwrite_output_dir \ | |
--output_dir ${MODEL_PATH} | |
$@ | |