← 开源

Official PyTorch Implementation of Long-Short Transformer (NeurIPS 2021).

Python
增长势头
+024 小时新增 Star0.0%
228
Star
37
Fork
2
贡献者
创建于 2021-07-22 · 更新于 2026-07-21 · 今日第 25976 名
主要开发者
wpingnettma15
README

Long-Short Transformer (Transformer-LS)

This repository hosts the code and models for the paper:

Long-Short Transformer: Efficient Transformers for Language and Vision

Updates

Architecture

Long-short Transformer substitutes the full self attention of the original Transformer models with an efficient attention that considers both long-range and short-term correlations. Each query attends to tokens from the segment-wise sliding window to capture short-term correlations, and the dynamically projected features to capture long-range correlations. To align the norms of the original and projected feature vectors and improve the efficacy of the aggregation, we normalize the original and project feature vectors with two sets of Layer Normalizations.

Tasks

排名相邻

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载