An encoder reads the input sequence into a representation and a decoder generates the output sequence step by step (translation, summarization).
Early versions squeezed the whole input into one fixed-size vector, which became a bottleneck for long sentences.
Attention lets the decoder look back at all encoder states at each step and weight them by relevance, removing the bottleneck; transformers later made attention the core of the whole model.
Loading…