Giter Club home page Giter Club logo

better_mmt's Introduction

Introduction

This multilingual machine translation model is trained on 12 layers with 4 experts and total 73 million parallel dataset. One can download mmodel from google drive: https://drive.google.com/file/d/1pDH3zueCK9t4lHEvWsqjEPzh34PbISZY/view?usp=sharing or from our local machine if you have access: /brtx/601-nvme1/haoranxu/BETTER_MMT/models/m6_moe_eom_4_xxl/

Environment:

conda create -n better-moe python=3.8
git clone https://github.com/facebookresearch/fairscale.git
cd fairscale
git checkout origin/experts_lt_gpus_moe_reload_fix
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=10.2 -c pytorch
pip install -e ./

Translate from xxx<->eng

To translate from any languauge from or to English, run the command (Note that you should have at least 2^n(n>1) GPUs to use the model to translate, e.g., 2, 4, 8, 16....):

bash translate.sh ${INPUT} ${OUTPUT} ${SRC_LANG} ${TGT_LANG} ${MODEL_PATH}

Five inputs should be:

  • ${INPUT}: input file that is needed to be translated
  • ${OUTPUT}: output file
  • ${SRC_LANG}: source language id
  • ${TGT_LANG}: target language id
  • ${MODEL_PATH}: Model path, now located at /brtx/601-nvme1/haoranxu/BETTER_MMT/models/m6_moe_eom_4_xxl/

Note that language id only supports languages that used in BETTER:

  • fas: Farsi
  • zho_Hans: Chinese (Simplified)
  • rus: Russian
  • kor: Korean
  • ara_Arab: Arabic
  • eng: English

better_mmt's People

Contributors

myleott avatar alexeib avatar edunov avatar kahne avatar cndn avatar tangyuq avatar colesbury avatar sshleifer avatar jhcross avatar liuchen9494 avatar huihuifan avatar louismartin avatar michaelauli avatar theweiho avatar liezl200 avatar vedanuj avatar freewym avatar annasun28 avatar xutaima avatar pipibjc avatar maigoakisame avatar xu-song avatar joshim5 avatar mortimerp9 avatar sravyapopuri388 avatar lematt1991 avatar jingfeidu avatar multipath avatar elbayadm avatar erip avatar

Stargazers

Ramraj Chandradevan avatar

Watchers

 avatar Haoran Xu avatar

Forkers

cramraj8

better_mmt's Issues

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.