Introduction

tf-seq2seq is a general-purpose encoder-decoder framework for Tensorflow that can be used for Machine Translation, Text Summarization, Conversational Modeling, Image Captioning, and more.

Machine Translation Model

Design Goals

We built tf-seq2seq with the following goals in mind:

  • General Purpose: We initially built this framework for Machine Translation, but have since used it for a variety of other tasks, including Summarization, Conversational Modeling, and Image Captioning. As long as your problem can be phrased as encoding input data in one format and decoding it into another format, you should be able to use or extend this framework.

  • Usability: You can train a model with a single command. Several types of input data are supported, including standard raw text.

  • Reproducibility: Training pipelines and models are configured using YAML files. This allows other to run your exact same model configurations.

  • Extensibility: Code is structured in a modular way and that easy to build upon. For example, adding a new type of attention mechanism or encoder architecture requires only minimal code changes.

  • Documentation: All code is documented using standard Python docstrings, and we have written guides to help you get started with common tasks.

  • Good Performance: For the sake of code simplicity, we did not try to squeeze out every last bit of performance, but the implementation is fast enough to cover almost all production and research use cases. tf-seq2seq also supports distributed training to trade off computational power and training time.

FAQ

1. How does this framework compare to the Google Neural Machine Translation system? Is this the official open-source implementation?

No, this is not an official open-source implementation of the GNMT system. This framework was built from the bottom up to cover a wider range of tasks, Neural Machine Translation being one of them. We have not replicated the exact GNMT architecture in this framework, but we welcome contributions in that direction.

The following frameworks offer functionality similar to that of tf-seq2seq. We hope to collaborate with the authors of these frameworks so that we can learn from each other.