GithubHelp home page GithubHelp logo

tan-xu / multilingual-kd-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rayeren/multilingual-kd-pytorch

0.0 0.0 0.0 3.04 MB

ICLR2019, Multilingual Neural Machine Translation with Knowledge Distillation

License: Other

Shell 0.74% Python 98.11% C++ 0.51% Lua 0.64%

multilingual-kd-pytorch's Introduction

Multilingual NMT with Knowledge Distillation on Fairseq

The implementation of Multilingual Neural Machine Translation with Knowledge Distillation [ICLR2019] (Xu Tan*, Yi Ren*, Di He, Tao Qin, Zhou Zhao, Tie-Yan Liu)

This code is based on Fairseq

Preparation

  1. pip install -r requirements.txt
  2. cd data/iwslt/raw; bash prepare-iwslt14.sh
  3. python setup.py install

Run Multilingual NMT with Knowledge Distillation

Train Experts

  1. Run data_dir=iwslt exp_name=train_expert_LNG1 targets="LNG1" hparams=" --save-output --share-all-embeddings" bash runs/train.sh.
  2. Replace LNG1 with other languages to train all the experts(LNG2, LNG3, ...).
  3. Topk output binary files will be produced after steps 1 and 2 in $data/data-bin

Train Multilingual Student

  1. Run exp_name=train_kd_multilingual targets="LNG1,LNG2 ...(filling with all languages)" hparams=" --share-all-embeddings" bash runs/train_distill.sh to train the KD multilingual model. BLEU scores will be printed to console every 3 epochs.

multilingual-kd-pytorch's People

Contributors

myleott avatar alexeib avatar edunov avatar huihuifan avatar louismartin avatar liezl200 avatar stephenroller avatar hitvoice avatar theweiho avatar hmc-cs-mdrissi avatar pipibjc avatar michaelauli avatar jhcross avatar sai-prasanna avatar alvations avatar adamjosephjensen avatar higgsfield avatar zrachel avatar fuzihaofzh avatar ynd avatar xianxl avatar colesbury avatar rutyrinott avatar rayeren avatar maggiemeow avatar johndpope avatar asmvolatile avatar halilakin avatar dariopavllo avatar

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.