The seq2seq tutorial that predated the Transformer era
A hands-on guide to building neural machine translation systems with TensorFlow's legacy encoder-decoder APIs.

What it does
This is Google’s official hands-on tutorial for Neural Machine Translation using TensorFlow’s legacy seq2seq stack. It walks through building an encoder-decoder model from scratch—embeddings, multi-layer LSTMs, attention, beam search, and multi-GPU training—using the tf.nn.rnn_cell and dynamic_rnn APIs. The repo includes full experimental results and pretrained models for IWSLT English-Vietnamese and WMT German-English benchmarks.
The interesting bit
The tutorial doubles as the reference implementation for Google’s Neural Machine Translation (GNMT) architecture, bundling circa-2017 research tricks—bucketing, bidirectional RNNs, attention wrappers—into a pedagogical codebase. It captures the state of the art just before Transformers made this particular stack obsolete.
Key highlights
- Step-by-step progression from vanilla seq2seq to attention-based GNMT-style models
- Reproducible benchmarks and pretrained weights on public datasets (IWSLT, WMT)
- Production-oriented details: batching, bucketing, beam search, and multi-GPU scaling
- Authored by the Google Research team behind the original GNMT work
Caveats
- Hard-locked to TensorFlow 1.x; the README explicitly requires the nightly build and relies on deprecated APIs like
tf.nn.rnn_cell.BasicLSTMCell - The “latest research ideas” touted in the introduction are frozen in time; modern NMT has moved on to Transformers and Keras-native APIs
Verdict
Read this if you need to understand the mechanical underpinnings of attention-based RNN translation or are archaeology-curious about the GNMT era. Avoid if you want a modern, production-ready training framework—this is a well-preserved fossil, not a current toolkit.
Frequently asked
- What is tensorflow/nmt?
- A hands-on guide to building neural machine translation systems with TensorFlow's legacy encoder-decoder APIs.
- Is nmt open source?
- Yes — tensorflow/nmt is open source, released under the Apache-2.0 license.
- What language is nmt written in?
- tensorflow/nmt is primarily written in Python.
- How popular is nmt?
- tensorflow/nmt has 6.5k stars on GitHub.
- Where can I find nmt?
- tensorflow/nmt is on GitHub at https://github.com/tensorflow/nmt.