Giter Club home page Giter Club logo

msmarco's Introduction

MSMARCO with S-NET Extraction (Extraction-net)

Requirements

Here are some required libraries for training and evaluations.

General

  • python3.6
  • cuda-9.0 (CNTK required)
  • openmpi-1.10 (CNTK required)
  • gcc >= 6 (CNTK required)

Python

  • Please refer requirements.txt

Evaluate with pretrained model

This repo provides pretrained model and pre-processed validation dataset for testing the performance

Please download pretrained model and pre-processed data and put them on the MSMARCO/data and MSMARCO root directory respectively, then decompress them at the right places.

The code structure should be like

MSMARCO
├── data
│   ├── elmo_embedding.bin
│   ├── test.tsv
│   ├── vocabs.pkl
│   ├── data.tar.gz
│   └── ... others
├── model
│   ├── pm.model
│   ├── pm.model.ckp
│   └── pm.model_out.json
└── ... others

After decompressing,

cd Evaluation
sh eval.sh

then you should get the generated answer and rough-l score.

Usage

Preprocess

MSMARCO V1

Download MSMARCO v1 dataset, GloVe embedding.

cd data
python3.6 download.py v1

Convert raw data to tsv format

python3.6 convert_msmarco.py v1 --threads=`nproc` 

Convert tsv format to ctf(CNTK input) format and build vocabs dictionary

python3.6 tsv2ctf.py

Generate elmo embedding

sh elmo.sh

MSMARCO V2

Download MSMARCO v2 dataset, GloVe embedding.

cd data
python3.6 download.py v2

Convert raw data to tsv format

python3.6 convert_msmarco.py v2 --threads=`nproc`

Convert tsv format to ctf(CNTK input) format and build vocabs dictionary

python3.6 tsv2ctf.py

Generate elmo embedding

sh elmo.sh

Train (Same for V1 and V2)

cd ../script
mkdir log
sh run.sh

Evaluate develop dataset

MSMARCO V1

cd Evaluation
sh eval.sh v1

MSMARCO v2

cd Evaluation
sh eval.sh v2

Performance

Paper

rouge-l bleu_1
S-Net (Extraction) 41.45 44.08
S-Net (Extraction, Ensemble) 42.92 44.97

This implementation

rouge-l bleu_1
MSMARCO v1 w/o elmo 38.43 39.14
MSMARCO v1 w/ elmo 39.42 39.47
MSMARCO v2 w/ elmo 43.66 44.44

TODO

  • Multi-threads preprocessing
  • Elmo-Embedding
  • Evaluation script
  • MSMARCO v2 support
  • Reasonable metrics

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.