Git Product home page Git Product logo

multibidaf's Introduction

Multi-BiDAF: Multiple Sentences Bi-directional Attention Flow

Multi Sentences Bi-directional Attention Flow (Multi-BiDAF) network is a model designed to fit the BiDAF model of Seo et al. (2017) for the Multi-RC dataset. This implementation is built on the AllenNLP library.

Installation

To install Multi-BiDAF, start by cloning our git repository:

$ git clone https://github.com/eitanhaimashiah/multibidaf.git

Create a Python 3.6 virtual environment, and install the necessary requirements by running:

$ ./scripts/install_requirements.sh

(The above is assuming CUDA 9 installed on a linux machine; use a different pytorch version as necessary.)

Training Multi-BiDAF

Once you've installed Multi-BiDAF, you can train our model fully by running:

$ ./scripts/train_fully.sh

When you run this it will compute an unified vocabulary for the SQuAD and MultiRC datasets, pretrain the Multi-BiDAF model on SQuAD, and eventually train the model on MultiRC. Each of these tasks can be accomplished by running separate scripts (scripts/make_unified_vocab.sh, scripts/pretrain_on_squad.sh, scripts/train_on_multirc.sh, respectively).

Moreover, you can create a prediction file (adapted to the official MultiRC evaluation script) of the development set by running:

$ ./scripts/predict_multirc_dev.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.