This is a repo for natural language inference using Match-LSTM and pre-trained BERT.
SNLI 1.0 dataset will be automatically downloaded to data/ and unzipped if it doesn't exist.
Train the model with default parameters.
python main.py
Train the model on GPU 0. Multi-GPU training is currently not supported. We will add this in the near future.
python main.py --gpu=0
Train the model on GPU 0 and finetune Bert.
python main.py --gpu=0 --train_bert
Recommended training command:
python main.py --batch_size=512 --log_interval=30 --gpu=0
If you want to fine-tune Bert which increases the number of parameters significantly, you'd better reduce the batch size.
python main.py --batch_size=32 --log_interval=60 --gpu=0