Translation playground
Type a short English sentence and the paper's model, in miniature, translates it into German, then shows where each German word looked in the English while it was written.
Examples
The model's German
Anna hat einen kleinen Hund . Sie mag ihn .
The model writes one German word at a time and keeps the four best beginnings at every step, as the paper's beam search does; the finished translations are ranked by their score.
The beam's finished translations
| # | Translation | Score |
|---|---|---|
| 1 | Anna hat einen kleinen Hund . Sie mag ihn . chosen |
−0.4465 |
| 2 | Anna hat einen öffnen einen kleinen Hund . Sie mag ihn . | −4.1055 |
| 3 | Anna hat einen kleinen Hund . Sie mag ihn . Lampe . | −4.3437 |
| 4 | Anna hat einen kleinen Hund . Sie mag ihn . Auto . | −4.3635 |
| 5 | Anna hat einen kleinen Mann . Sie mag ihn . | −4.4198 |
| 6 | Anna hat einen Eine Hund . Sie mag ihn . | −4.4627 |
The log-probability adds up how sure the model was of each word (0 would be certain). The score divides it by the paper's length penalty, so a longer sentence is not punished just for having more words.
Where each German word looked
Each row is a German word as the decoder wrote it; each column an English word it could look at. The darker the cell, the more of that word went into the decision. This is the encoder–decoder attention of the paper's section 3.2.3.
The strongest link of each German word:
- Anna → Anna (100 %)
- hat → has (100 %)
- einen → a (73 %)
- kleinen → small (100 %)
- Hund → dog (100 %)
- . → . (51 %)
- Sie → She (75 %)
- mag → likes (100 %)
- ihn → it (46 %)
- . → . (51 %)
- </s> → </s> (50 %)
The model reads English and writes German, the paper's own task, whatever language this page is in. It is about a quarter of a million weights, trained in minutes on a laptop; the paper's base model had 65 million.