Lesson 3 of 12 · 2 min
Why Transformers Beat RNNs
| Aspect | RNN/LSTM | Transformer |
|---|---|---|
| Processing | Sequential (step by step) | Parallel (all tokens at once) |
| Long-range dependencies | Struggles (vanishing gradient) | Excellent (attention) |
| Training speed | Slow (can’t parallelise) | Fast (GPU-friendly) |
| Context window | Typically 100–500 tokens | 4k to 2M tokens |
| Memory | Fixed hidden state | Full attention over all tokens |
