An implementation of QANet with Tensorflow and Keras.
This implementation reaches EM/F1 = 66/77 in 50k steps. (The original paper reaches EM/F1 = 73.6/82.7 in 150k steps. I think there is still room for improvement.)
- Docker
- nvidia-docker
First, clone this repository.
git clone https://github.com/p-baleine/keras-QANet.git
Then build the docker image.
docker build -t qanet .
The following instructions assume that you’ve logged in to this container. To log in to this continer, run:
docker run --runtime nvidia --rm --name qanet -it -v $(pwd):/qanet -p 6006:6006 -p 8888:8888 qanet
Download and save pre-trained Glove data in word2vec directory.
Download and save train-v1.1.json and dev-1.1.json in data directory from SQuAD.
To preprocess data, run:
make
make train
evaluation
target will calcurate exact-match score on data/dev-v1.1.json
.
make evaluate