Skip to content

andrewschreiber/hs-math-nlp

Repository files navigation

Reproduction of 'Analysing Mathematical Reasoning Abilities of Neural Models' Saxton et. al. 2019

Setup

  1. Clone the repo

  2. Set up a Python 3.7 environment

  3. Enter the repo folder and run pip install -r requirements.txt

  4. Optional: download the full 2GB dataset (https://console.cloud.google.com/storage/browser/_details/mathematics-dataset/mathematics_dataset-v1.0.tar.gz) and unzip in the project root directory.

Usage

If you're running on a non CUDA machine (i.e. a laptop), these commands will run with reduced batch size and dataset size for faster testing/debugging.

Training

To train a model you must select from Vanilla Transformer, Simple LSTM, and Attentional LSTM. Options transformer, simLSTM, and attLSTM, respectively.

For example: python training.py -m transformer

Benchmarking

To run performance benchmarks on the Transformer run: python benchmark.py

Visualization

Tensorboard logs are saved to the runs folder.

tensorboard --logdir runs

Colaborators

  • Andrew Schreiber
  • Taylor Kulp-McDowall

Links

Relevant papers

About

Reproduction of 'Analysing Mathematical Reasoning Abilities of Neural Models' Saxton et. al. 2019

Resources

Stars

Watchers

Forks

Packages

No packages published