Skip to content

jhcross/translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Translate - a PyTorch Language Library

Translate is a library for machine translation written in PyTorch. It provides training for sequence-to-sequence models. These models can be exported to Caffe2 graphs via ONNX, loaded and run from C++ for production purposes. Translate relies on fairseq, a general sequence-to-sequence library.

Requirements and Installation

Translate requires

To install Translate, please refer to the install.sh script. In short, run bash install.sh.

Training

We provide a example script to train a model for the IWSLT 2014 German-English task. We used this command to obtain a pretrained model:

bash fbtranslate/examples/train_iwslt14.sh

The pretrained model actually contains two checkpoints that correspond to training twice with random initialization of the parameters. This is useful to obtain ensembles.

Pretrained Model

A pretrained model for IWSLT 2014 can be evaluated by running the example script:

bash fbtranslate/examples/generate_iwslt14.sh

Note the improvement in performance when using an ensemble of size 2 instead of a single model.

Exporting Models

TODO

Join the Translate community

We welcome contributions! See the CONTRIBUTING.md file for how to help out.

License

Translate is BSD-licensed, as found in the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published