Original diagram of embedding, attention and feed-forward blocks; not model output or a performance result.
I used English and Spanish sentence pairs to follow a translation through the model. The tokenizer turns words into integers. The encoder reads the English sentence, and the decoder learns to predict the next Spanish token using the translation so far. I wrote the attention layers in TensorFlow.js to see where information passes between the two sides.
Read the transformer implementation
See how the translation experiment is set up
