electra_large_discriminator_squad2_512 / electra_large_squad2_512.sh
system's picture
system HF staff
Update electra_large_squad2_512.sh
804426a
raw
history blame contribute delete
947 Bytes
#!/bin/bash
export OMP_NUM_THREADS=12
EXAMPLES=/media/dn/work2/nlpu/transformers/examples/question-answering
SQUAD=${EXAMPLES}/scripts/squad2.0
MODEL_PATH=${EXAMPLES}/runs/electra_large_discriminator_squad2_512
python ${EXAMPLES}/run_squad.py \
--model_type electra \
--model_name_or_path google/electra-large-discriminator \
--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 \
--warmup_steps 306 \
--weight_decay 0.01 \
--learning_rate 3e-5 \
--max_grad_norm 0.5 \
--adam_epsilon 1e-6 \
--max_seq_length 512 \
--doc_stride 128 \
--per_gpu_train_batch_size 8 \
--gradient_accumulation_steps 16 \
--per_gpu_eval_batch_size 128 \
--fp16 \
--fp16_opt_level O1 \
--threads 12 \
--logging_steps 50 \
--save_steps 1000 \
--overwrite_output_dir \
--output_dir ${MODEL_PATH}
$@