Learn how encoder-decoder seq2seq models work through annotated, runnable code
Build a German-to-English neural machine translation system step by step
Understand and implement attention mechanisms for sequence generation tasks
Run interactive ML tutorials in-browser without any local setup via Google Colab
Can run immediately in-browser via Google Colab with no install. Local setup requires Python dependencies and two language tokenization models.
This repository contains a series of tutorials for learning how to build sequence-to-sequence models using PyTorch, a popular machine learning library. Sequence-to-sequence (seq2seq) models are systems that take a sequence of inputs, such as words in one language, and produce a sequence of outputs, such as the same words in a different language. The tutorials use German-to-English translation as the running example throughout. There are three main tutorials, each implemented as a Jupyter Notebook (an interactive document that mixes explanatory text with runnable code). The first covers the foundational architecture: an encoder reads the input sentence and compresses it, then a decoder uses that compressed representation to produce the output sentence. The second tutorial introduces an improvement that helps the model handle longer sentences where important information can get lost in the compression step. The third adds an attention mechanism, which allows the decoder to look back at specific parts of the input rather than relying on a single compressed summary. Each tutorial is linked to a Google Colab badge, meaning you can open and run the code directly in a browser without installing anything locally. For local use, setup requires installing Python dependencies and two language models for tokenization. The tutorials are meant for people who already know some Python and want to understand how neural machine translation works step by step. The author encourages readers to file issues if they spot errors or have questions. Some older tutorial versions are preserved in a legacy folder for historical reference.
← bentrevett on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.