This is an experiment on using Transformers to build a Chatbot (Question-Answer System). The code is heavily commented and is more like a tutorial.
PyTorch 1.1.0 or higher, Python 3.6/3.7
Download the Cornell Movie Dialog Corpus from here and unzip the file to your directory
preprocess.py: Dataset Preproceesing
utils.py: Utilities
models.py: Transformer Models
train.py: Training Script
chat.py: Evaluation/Chatting Script