The encoder reads the whole input; the decoder writes the output while looking back at it.
- EncoderReads the full source sentence in both directions.
- Cross-attentionThe decoder looks at the encoder's output while writing.
- DecoderWrites one token at a time.
- StopEnds at an end-of-sequence token.