translate  by pytorch

PyTorch library for sequence-to-sequence translation

created 7 years ago
835 stars

Top 43.5% on sourcepulse

GitHubView on GitHub
Project Summary

PyTorch Translate is a deprecated library for machine translation built on PyTorch, offering sequence-to-sequence model training and export capabilities to Caffe2 via ONNX for production deployment. It targets researchers and engineers working with PyTorch-based NLP models, providing a framework for training and evaluating translation systems.

How It Works

The library leverages the fairseq framework for its core sequence-to-sequence modeling. It allows for training and evaluation of translation models, with a key feature being the export of trained models to Caffe2 graphs using ONNX. This enables deployment in C++ environments, with components like the encoder and decoder exportable separately, and beam search implemented in C++.

Quick Start & Requirements

  • Install: python setup.py install after installing PyTorch and fairseq.
  • Prerequisites: Linux, CUDA-compatible GPU, GNU C++ compiler (>= 4.9.2), CUDA (8.0 or 9.0 recommended).
  • Docker: sudo docker pull pytorch/translate followed by sudo nvidia-docker run -i -t --rm pytorch/translate /bin/bash.
  • Full Install: Detailed instructions for installing from source, including Miniconda setup, PyTorch nightly build, and ONNX installation, are provided.
  • Docs: Usage examples for training, evaluation, and ONNX export are available within the repository.

Highlighted Details

  • Supports training sequence-to-sequence models for machine translation.
  • Enables export of models to Caffe2 graphs via ONNX for C++ deployment.
  • Includes example scripts for training and evaluating on the IWSLT 2014 German-English task.
  • Offers TensorBoard integration for visualizing training statistics.

Maintenance & Community

The project is explicitly marked as deprecated, recommending users switch to fairseq. Contributions are welcomed, with a CONTRIBUTING.md file available.

Licensing & Compatibility

BSD-licensed, allowing for commercial use and integration with closed-source projects.

Limitations & Caveats

The project is deprecated and no longer actively maintained, with users advised to migrate to fairseq. Research models are explicitly noted as works in progress and unsupported.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.