Switch Attention: Towards Dynamic and Fine-grained Hybrid Transformers
SwiAttn is a novel hybrid transformer that enables dynamic and fine-grained routing between full attention and sliding window attention, and dynamically routes the computation to either a full-attention branch for global information aggregation or a sliding-window branch for efficient local pattern matching.