Skip to content

VarunB-17/QAFormer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


QAFormer

An extractive question-answering model for SQuAD 1.1

screenshot

Features

  • This model was built for my bachelor's thesis for the study Artificial Intelligence at Vrije Universiteit Amsterdam.
  • The QAFormer is based on QAnet which was published by Google in 2018.
  • Training the model will take around ~9 hours for 3 epochs.
  • Downloading necessary files and pre-processing may take up to ~1.5 hours
  • Check out the config.py files to modify hyperparameters to what your machine can handle.

How To Use

Create a weights and biases account before running all files
# Clone this repository
$ git clone https://github.com/VarunFuego17/thesisqat.git

# Install dependencies (latest versions)
$ pip install pytorch 
$ pip install pyarrow
$ pip install wandb
$ pip install torchtext
$ pip install datasets
$ pip install spacy
$ pip install pandas
$ pip install numpy

# Go into the repository
$ cd dataloader
# Run the following file
$ python3 dataloader.py

# This should create the following files in the dataloader folder:
image
bash
# Go into the repository
$ cd model
# Run the following command for creating the model:
$ python3 train.py --debug=1
# This should create the file -> "qaf_128_8_4.pt"
# Run the following command for testing the model on the created dataset:
$ python3 train.py --debug=2
# Run the following command if you want to see if any errors appear:
$ python3 train.py --debug=0

License

MIT


Releases

No releases published

Packages

No packages published

Languages