Skip to content

Commit

Permalink
squad training running cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalkraj committed Nov 5, 2019
1 parent cab7561 commit 6db4d13
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,25 @@ python create_finetuning_data.py \
--max_seq_length=384
```

### Running Model
```bash

python run_squad.py \
--mode=train_and_predict \
--input_meta_data_path=${SQUAD_DIR}/squad_${SQUAD_VERSION}_meta_data \
--train_data_path=${SQUAD_DIR}/squad_${SQUAD_VERSION}_train.tf_record \
--predict_file=${SQUAD_DIR}/dev-${SQUAD_VERSION}.json \
--albert_config_file=${ALBERT_DIR}/config.json \
--init_checkpoint=${ALBERT_DIR}/tf2_model.h5 \
--spm_model_file=${ALBERT_DIR}/vocab/30k-clean.model
--train_batch_size=48 \
--predict_batch_size=48 \
--learning_rate=1e-5 \
--num_train_epochs=3 \
--model_dir=${MODEL_DIR} \
--strategy_type=mirror
```



### Multi-GPU training
Expand Down
7 changes: 1 addition & 6 deletions run_squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@
flags.DEFINE_integer('predict_batch_size', 8,
'Total batch size for predicting.')

flags.DEFINE_bool(
'verbose_logging', False,
'If true, all of the warnings related to data processing will be printed. '
'A number of warnings are expected for a normal SQuAD evaluation.')

flags.DEFINE_integer('predict_batch_size', 8,
'Total batch size for prediction.')
flags.DEFINE_integer(
Expand All @@ -83,7 +78,7 @@
"The model file for sentence piece tokenization.")

flags.DEFINE_string(
"output_dir", None,
"model_dir", None,
"The output directory where the model checkpoints will be written.")

flags.DEFINE_enum(
Expand Down

0 comments on commit 6db4d13

Please sign in to comment.