Practice free →
HomeClaudeaifoundationstransformer_attention › The decoder differs from the encoder by adding

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.
Solve this in the app — Claude practice & 24k+ MCQs →
Related questions