Parallel training over the whole sequence (RNNs are sequential), which scales well on GPUs.
Direct long-range connections between any two tokens, instead of passing information through many steps.
Scale well with data and parameters, and transfer well via pretraining.
Costs: quadratic attention memory, large data and compute needs, and weaker built-in locality bias than CNNs (so vision transformers need more data or augmentation).
Loading…