Start learning →

The decoder differs from the encoder by adding

AJust one more identical encoder-style attention layer
BConvolutional layers between self-attention blocks
CRecurrent units for autoregressive generation steps
DA masked self-attention plus encoder-decoder attention
Answer & Solution
Correct answer: D. A masked self-attention plus encoder-decoder attention
The decoder adds masked self-attention (so position i cannot attend to j > i) and a third sub-layer that does cross-attention over the encoder's output stack.
Practise this question with Quill — Claude →

Keep practising Transformer Attention

Browse all Transformer Attention questions for Claude, or explore more Aifoundations topics.

Start a Transformer Attention lesson →
Related questions