Pytorch Implementation of "Learning Natural Language Inference with LSTM", 2016, S. Wang et al. (https://arxiv.org/pdf/1512.08849.pdf)
- Download snli_1.0.zip (90.2 MB) and decompress snli_1.0_train.txt, snli_1.0_dev.txt and snli_1.0_test.txt to data/
- More information can be found at https://nlp.stanford.edu/projects/snli/
- Download glove.840B.300d.zip (2.0 GB) and decompress glove.840B.300d.txt to $HOME/common/
# Create a pickle file: data/snli.pkl
$ python3 dataset.py
# Run
$ python3 main.py
- 156 minutes per training epoch w/ a NVIDIA Titan Xp GPU
- I plan to reduce the training time soon. (Work in progress)
- Epoch 6
- Training loss: 0.361281, accuracy: 86.1% (mLSTM train accuracy: 92.0%)
- Dev loss: 0.392275, accuracy: 85.8% (mLSTM dev accuracy: 86.9%)
- Test loss: 0.397926, accuracy: 85.5% (mLSTM test accuracy: 86.1%)