Classic 2017: Encoder-Decoder & Cross-Attention Alignment
The original 2017 *"Attention Is All You Need"* paper was built for machine translation using **two stacks**: a bidirectional **Encoder** reads the full English sentence (`The black cat sleeps quietly`) and exports rich **Keys & Values**; an autoregressive **Decoder** generates French word by word.
Between them sits the **Cross-Attention Bridge**: the Decoder supplies Queries (`Q_dec`) that attend over the Encoder’s Keys/Values (`K_enc, V_enc`). Click **`"chat"`** and then **`"noir"`** on the stage to watch the orange bridge cross over seamlessly to handle French adjective-noun inversion!
idea:Cross-Attention lets source and target sequences have completely different lengths and word orders—without any fixed positional lockstep.