Watch a translation, step by step

Your English sentence goes into the paper's transformer and comes out in German. Step through it: the architecture of the paper's Figure 1 lights up where the sentence is, and beside it, or below it on a phone, you see the calculation of that step with the model's real numbers.

English sentence
Up to 12 words and punctuation marks.

The model's German appears word by word as you play. · 211 steps

Playback speed
The paper's Figure 1 redrawn: the encoder on the left and the decoder on the right, each box a button that shows its numbers.The paper's Figure 1, redrawn: the encoder on the left reads the English, the decoder on the right writes the German, both from the bottom up. The box of the current step is lit, and the arrow into it moves. N× ×N N = 2 N = 2 Inputs Input Embedding + Positional Encoding Multi-Head Attention Add & Norm Feed Forward Add & Norm Outputs (shifted right) Output Embedding + Positional Encoding Masked Multi-Head Attention Add & Norm Multi-Head Attention Add & Norm Feed Forward Add & Norm Linear Softmax Output Probabilities
After Figure 1 of Vaswani et al. (2017), redrawn.
All 211 steps: jump to any of them

An unhandled error has occurred. Reload 🗙

Reconnecting…

Your connection to the Transformers and Attention Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.