How do Transformer models differ from RNNs in handling sequences?
Instruction: Discuss the architectural differences and the impact on performance in sequence modeling tasks.
Context: This question evaluates the candidate's understanding of advanced NLP model architectures and their suitability for different types of NLP tasks.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
RNNs carry a hidden state through sequence steps, so the recurrence constrains parallel computation across time. Transformers use attention between token representations and positional information...