Attention helps sequence-to-sequence models handle long inputs by focusing on the parts most relevant to each output. It improved machine translation, where an encoder represents the input and a decoder generates the translation. Transformer models extend this idea with self-attention in both encoder and decoder. section 1.3.1
Machine translation
When translating a source sentence, attention lets the model focus on the input parts most relevant to the output it is producing. section 1.3.1




























