diff --git a/.gitignore b/.gitignore index 56a5f0d38ab351..7e160a1c77fd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -119,4 +119,7 @@ dmypy.json .vscode # TF code -tensorflow_code \ No newline at end of file +tensorflow_code + +# MacOS temp files +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index cd8d04a24099b7..ba7c7d70fd1007 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ python run_squad.py \ --init_checkpoint $BERT_PYTORCH_DIR/pytorch_model.bin \ --do_train \ --do_predict \ - --do_lower_case + --do_lower_case \ --train_file $SQUAD_DIR/train-v1.1.json \ --predict_file $SQUAD_DIR/dev-v1.1.json \ --train_batch_size 12 \ diff --git a/run_squad.sh b/run_squad.sh new file mode 100644 index 00000000000000..cd0d1872959b2e --- /dev/null +++ b/run_squad.sh @@ -0,0 +1,19 @@ +export BERT_BASE_DIR=./bert/uncased_L-12_H-768_A-12 +export BERT_PYTORCH_DIR=./bert_pytorch +export SQUAD_DIR=./squad + +python run_squad.py \ + --vocab_file $BERT_BASE_DIR/vocab.txt \ + --bert_config_file $BERT_BASE_DIR/bert_config.json \ + --init_checkpoint $BERT_PYTORCH_DIR/pytorch_model.bin \ + --do_train \ + --do_predict \ + --do_lower_case \ + --train_file $SQUAD_DIR/train-v1.1.json \ + --predict_file $SQUAD_DIR/dev-v1.1.json \ + --train_batch_size 12 \ + --learning_rate 3e-5 \ + --num_train_epochs 2.0 \ + --max_seq_length 384 \ + --doc_stride 128 \ + --output_dir ../debug_squad/ \ No newline at end of file