p-baleine / QANet-Tensorflow

An implementation of QANet with Tensorflow and Keras.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QANet-Tensorflow

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.)

Requirements

Usage

Build container

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 data

Glove

Download and save pre-trained Glove data in word2vec directory.

SQuAD

Download and save train-v1.1.json and dev-1.1.json in data directory from SQuAD.

Preprocessing data

To preprocess data, run:

make

Training

make train

Evaluation

evaluation target will calcurate exact-match score on data/dev-v1.1.json.

make evaluate

About

An implementation of QANet with Tensorflow and Keras.


Languages

Language:Jupyter Notebook 85.3%Language:Python 14.3%Language:Makefile 0.3%Language:Shell 0.1%Language:Dockerfile 0.1%