PyTorch's forgotten translation library, now a museum piece
A deprecated wrapper around fairseq that once bridged research PyTorch models to production Caffe2 via ONNX export.

What it does PyTorch Translate was a machine translation toolkit built on top of fairseq. It trained sequence-to-sequence models and, more specifically, exported encoder/decoder components to Caffe2 graphs through ONNX for C++ production inference. Beam search stayed in C++ land, with promises of full export that never arrived.
The interesting bit The project existed mainly to solve a deployment problem: how to get PyTorch research models into Facebook’s Caffe2 production infrastructure. The README’s “near future” promises about exporting beam search and adding more model support now read as historical fiction — the entire repo was deprecated in favor of fairseq itself.
Key highlights
- Built as a thin layer over fairseq; models interoperated between both codebases
- Exported encoder and decoder separately to
.pbCaffe2 graphs via ONNX - Provided Docker images with CUDA 8/9 and elaborate conda-based install scripts
- Included IWSLT 2014 de-en pretrained model and ensemble training setup
- TensorBoard logging supported through a separate
train_with_tensorboard.pyscript
Caveats
- Explicitly deprecated; README opens with a migration notice pointing to fairseq
- Linux and CUDA-only; the install process involved manual NCCL2 downloads and library path wrangling
- Research models in
pytorch_translate/researchwere explicitly unsupported works in progress
Verdict Worth studying if you’re maintaining legacy Caffe2/ONNX export pipelines or writing software archaeology papers. Everyone else should use fairseq directly, as the maintainers themselves recommend.