Issue in training BERT base model, steps/sec very low
I am trying to train BERT base model using SQUAD 1.1 as:
python run_squad.py
--vocab_file=uncased_L-12_H-768_A-12/vocab.txt
--bert_config_file=uncased_L-12_H-768_A-12/bert_config.json
--init_checkpoint=uncased_L-12_H-768_A-12/bert_model.ckpt
--do_train=True
--train_file=squad/train-v1.1.json
--do_predict=True
--predict_file=squad/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=/tmp/squad_base/
It's been 22hrs training. Output stats produced in the terminal ->
INFO:tensorflow:global_step/sec: 0.0359769 INFO:tensorflow:examples/sec: 0.431723
I can't figure out the problem. Any leads would be appreciated.
This is similar to the rate for run_classifier.py I see on 2GHz CPU (no GPU) with 60GB RAM, using base model uncased, 512 max tokens. The process takes most of the RAM. It is not actively swapping, but seems much slower than the GPU numbers (like 1hr) that I had heard about.
what is the standard rate of global_step/sec and examples/sec when fine-tuning BERT base uncased on SQuAD v1.1 dataset in colab with GPU?